官术网_书友最值得收藏!

Continuous integration and delivery

Let's see how continuous integration (CI) and life cycle of our automation code will be managed by the following categories of tools:

  • System Management Tool Artifact (SMTA): This can be any IT automation tool such as Chef cookbook, Puppet manifest, Ansible playbook, or juju charms.
  • Version Control System (VCS): This tracks changes to our infrastructure deployment code. Any version control system, such as CVS, Subversion, or Bazaar, that you are most familiar with can be used for this purpose. Git can be a good outfit for our VCS.
  • Jenkins: This is a perfect tool that monitors to changes in version control system and  does the continuous integration testing and reporting of results.
  • Gerrit: This is a Git review system designed to review code changes at every Git push. It creates patch sets for each change and allows the review of code lines based on rating score.

Take a look at the model in the following figure:

The life cycle for infrastructure as code consists of infrastructure configuration files (for example, Ansible playbooks and Vagrant files) that are recorded in a VCS and are built continuously by the means of a continuous integration (CI) server (Jenkins, in our case).

Infrastructure configuration files can be used to set up a unit test environment (a virtual environment using Vagrant, for example) and makes use of any system management tool to provision the infrastructure (Ansible, Chef, Puppet, and so on).

Within every added patch, Gerrit triggers an event in the CI server to perform test and build before publishing results for reviewing.

The CI server keeps listening to changes in version control and automatically propagates any new versions to be tested, and then it listens to target environments in production.

Vagrant allows you to build a virtual environment very easily; it is available at https://www.virtualbox.org/ and can run virtual machines, so you will need these before moving on with the installation in your test environment.

The proposed life cycle for infrastructure code highlights the importance of a test environment before moving on to production. You should give a lot of importance to the testing stage, although this might be a very time-consuming task.

Especially in our case, with infrastructure code for deploying OpenStack that are complicated and have multiple dependencies on other systems the importance of testing cannot be overemphasized. This makes it imperative to ensure effort is made for an automated and consistent testing of the infrastructure code.an automated and consistent testing of the infrastructure code.

The best way to do this is to keep testing thoroughly in a repeated way till you gain confidence in your code.

主站蜘蛛池模板: 象山县| 平安县| 彭水| 酒泉市| 家居| 民勤县| 清徐县| 永吉县| 措美县| 台山市| 平陆县| 青海省| 肇庆市| 临海市| 大名县| 普安县| 泾阳县| 克东县| 山丹县| 伊春市| 郁南县| 宁晋县| 和顺县| 福建省| 沛县| 潢川县| 鲜城| 长海县| 清徐县| 扎鲁特旗| 象州县| 遵义县| 东阳市| 卫辉市| 菏泽市| 忻城县| 贵港市| 凤翔县| 额敏县| 嵩明县| 汝南县|