Infrastructure as a Code
Infrastructure As Code(IaC) is a practice in which infrastructure is provided and managed using code and software development techniques, such as versioning control and continuous integration and delivery.
Why IaC is important?¶
Before the automation era, the IT admin/engineer needs to look after the installation and configuration of software, the configuration of networking, setting up of servers in place all by themselves. This was all fine till they need to look after two or three servers and their maintenance and updates.
Things started spinning after cloud technology came into existence. Now, IT engineers can spin thousands of virtual machines/servers with one click. But how will they manage all of them? Keep different servers in different regions in sync?
Infrastructure as code came as a savior. Now, using a machine-readable definition file, the whole infrastructure can be managed and configured rather than physically configuring them individually.
Any other available IaC tools in the market?¶
Yes, Every IaC tool is not complete in itself. So, we end up using two or more of these depending upon the requirement and features. Depending upon the infrastructure paradigm they follow, the tools are categorized into mutable and immutable.
Immutable Infrastructure Paradigm - These tools do not modify already provisioned infrastructure but deploy a new server. For example services offered by Terraform.
Mutable Infrastructure Paradigm - These tools can modify the existing resources. Such as services from:
-
Ansible
-
Chef
-
Puppet
-
Saltstack
What are the advantages of IaC?¶
- It provided a reusable, maintainable, extensible, and testable infrastructure.
- Easy to codify and iterate on designs.
- Easy to maintain.
- Easy to add company security best practices, and thus more efficient.
- Provided Version control, so if any error occurs we can go back to the previous version.
- Provided deployment flexibility.