Why Infra as a Code?
Disclaimer: – This note was written by me (Mayank Nauni) in my personal capacity. The opinions expressed in this article are solely my own and do not reflect the view of my employer or my preference towards any of the OEMs.
Deploying changes in the IT infrastructure has always been repetitive and tedious work, infra engineers usually hate this kind of monotonous work which is thousand miles apart from creativity. Infra as a Code, is the way of addressing repetitive tasks efficiently, the direct benefits are: –
1. Fast and Fearless
Automating tasks helps to deploy them faster and in a reliable manner as the tasks have been tested in the past and free from inconsistency induced by manual errors.
2. Easy validation of changes
Codes are easy to be tested in virtualized environment ( I use EVE-NG for the same), you can perform a code review, run a series of automated tests, to ensure that the code does not break the production environment.
3. Promotes documentation
Old infrastructure has lot of dependency on the administrator for they have the knowledge of dependencies and challenges associated with the infra they manage but sadly in most of the organizations it is not documented, when the administrator leaves the organization along goes the knowledge with him. The fundamental benefit or IaaC is documentation, everything is in the source file.
The validated test codes can be deployed in different environments without major effort involved in re-coding the parameters from zero.
5. Self-Service Capability
After the codes are tested thoroughly and hit maturity phase, they can be passed on to the developers to self-provision ( and delete) infra as and when needed.
6. Version Control
This is my personal favorite; version control using Git ( or any other similar tool for that matter) brings a lot of agility and reliability. All changes in your code is tracked actively in the commit logs and whenever you hit upon a configuration induced issue it can be tracked and rolled-back efficiently.
What are the tools which can help you start your IaaC journey:-
Config Management Tools
2. OpenStack Heat
3. Cloud Formation (AWS)
I shall be writing an article on both tool category soon.