- Effective DevOps with AWS
- Nathaniel Felsen
- 389字
- 2021-07-15 17:11:55
Adding our template to a source control system
Now that we have tested our template and know it's working, we are going to commit it to our source control system. This will allow us to keep track of changes and gives the ability to treat our infrastructure code up to the same standard as our application code. (There is more on that in Chapter 4, Adding Continuous Integration and Continuous Deployment.)
To do that, we will rely on Git. AWS has a service called AWS CodeCommit (http://amzn.to/2tKUj0n), which lets you manage Git repositories easily; however, because this service is a lot less popular than GitHub (https://github.com), we will use the latter instead. If you don't have an account for GitHub yet, start by signing up for the service (it's completely free).
Once logged in to GitHub, create a new repository for the CloudFormation template:
- In your browser, open https://github.com/new.
- Call the new repository EffectiveDevOpsTemplates.
- Check the checkbox Initialize this repository with a README.
- Finally, click the Create repository button:

- Once your repository is created, you will want to clone it into your computer. For that, you need to have Git installed. (Search on Google for instructions on how to install Git for your operating system if you don't have it yet):
$ git clone https://github.com/<your_github_username>/EffectiveDevOpsTemplates
- Now that the repository is cloned, we will go into the repository and copy the template previously created in the new GitHub repository:
$ cd EffectiveDevOpsTemplates $ cp <path_to_helloworld_template>/helloworld-cf-template.py .
- Finally, we will add and commit that new file to our project and push it to GitHub:
$ git add helloworld-cf-template.py $ git commit -m "Adding helloworld Troposphere template" $ git push
When managing your code, there are two common approaches to organizing your code repositories. You can create one repository for each project you have or decide to put your entire organization code under a single repository. We will choose the simplest option for this book, which is one repository per project but with the recent releases of several open source projects such as Bazel from Google, Buck from Facebook, or Pants from Twitter, using a mono repo becomes a very compelling option as it avoids juggling between multiple repositories when making big changes in your infrastructure and services at the same time.
- 零基礎(chǔ)學(xué)Visual C++第3版
- 無代碼編程:用云表搭建企業(yè)數(shù)字化管理平臺
- 樂高機器人設(shè)計技巧:EV3結(jié)構(gòu)設(shè)計與編程指導(dǎo)
- 區(qū)塊鏈:以太坊DApp開發(fā)實戰(zhàn)
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優(yōu)化計算
- 高級C/C++編譯技術(shù)(典藏版)
- Interactive Applications Using Matplotlib
- Getting Started with Greenplum for Big Data Analytics
- Frank Kane's Taming Big Data with Apache Spark and Python
- Learning Modular Java Programming
- Visual FoxPro 6.0程序設(shè)計
- 深入理解BootLoader
- 數(shù)據(jù)科學(xué)中的實用統(tǒng)計學(xué)(第2版)
- Qt 5.12實戰(zhàn)
- Learning Ext JS(Fourth Edition)