Loading...

Infrastructure as code.

If you are somehow related to DevOps, system administration or somehow related to infra, you would have somewhere come across the concept 'Infrastructure as code'. In short 'Infrastructure as code' aka IaC means, managing your infrastructure by writing code. Rather than manually making configuration changes, using scripts or commands to make changes. IaC is one of the core practice of DevOps.

If we look at traditional method, lets say you are running a VM and you want to run an additional VM, you will file a ticket or run installation of VM and OS in it and lot of stuff. Then there is AWS. Now you can spin up machines and machines are ready to use.

So when you choose aws or any other cloud, you have UI, login, create machine and perform the operations. But you have done. What if someone else comes to your place tomorrow? How do they understand it? Also, if you want to spin up 100 VMs, you have to repeatedly create these also if you want to destroy, you should manually go and click on the options.

- this is where IaC comes into picture. You can bring up or down servers based on the demand by using the script, you can add these code to version control system to track who did what and to know current status, anyone can understand the infra easily. There are many advantages of it.

IaC is not just related to machine spin up or down, that's just an example. This could be applied for automated deployment, automated testing and result reporting, avoid documentations and enable collaborations.