- Mastering OpenStack(Second Edition)
- Omar Khedher Chandan Dutta Chowdhury
- 351字
- 2021-07-02 23:52:45
Working with the infrastructure deployment code
While dealing with infrastructure as code, the code that abstracts, models, and builds the OpenStack infrastructure must be committed to source code management. This is required for tracking changes in our automation code and reproducible of results. Eventually, we must reach a point where we shift our OpenStack infrastructure from a code base to a deployed system while following the latest software development best practices.
At this stage, you should be aware of the quality of your OpenStack infrastructure deployment, which roughly depends on the quality of the code that describes it.
It is important to highlight a critical point that you should keep in mind during all deployment stages: Automated systems are not able to understand human error. You'll have to go through an ensemble of phases and cycles using agile methodologies to end up with a release that is largely bug free and then promoted to the production environment.
On the other hand, if mistakes cannot be totally eradicated, you should plan for the continuous development and testing of code. The code's life cycle management is shown in the following figure:

Changes can be scary! To handle changes, it is recommended that you do the following:
- Keep track of and monitor the changes at every stage
- Build flexibility into the code and make it easy to change
- Refactor the code when it becomes difficult to manage
- Test, test, and retest your code
Keep checking every point that has been described previously till you start to get more confident that your OpenStack infrastructure is being managed by code that won't break. By treating the infrastructure as code, operators will be able to overcome the challenges presented by any dynamic infrastructure. Systems can be redeployed at ease by ensuring the consistency throughout the entire fleet of servers or the same infrastructure elements. Bear in mind that system design also keeps changing as new package release comes to an update with different configuration requirements. A streamlined change management process will facilitate to deliver an anti-fragile infrastructure that can be changed safely with minimum degree of complexity.