Infrastructure as Code (IaC) for Dummies
Infrastructure as Code (IaC) is also called as programmable infrastructure. It means writing code to provision infrastructure (Servers, Storage, Network & database etc) and deploying applications automatically. Really cool right, no more manual provisioning and deployments. You might have question why we need it and what is so special about it and its benefits. They are many benefits about it. I may not be able to cover all of them here but definitely will cover the most important ones. For that, let’s see the below examples.
In an on premises environment, just imagine how much time it would take to plan, deploy and implement a three tier web application. This time may vary as so many factors involved in it such as planning, PO approval, budget allocation, infrastructure procurement and shipping to the Data Center, provisioning, testing etc. This process may take anytime between 20 to 90 days or more. But Imagine the same scenario in the cloud, as everything is almost instantaneous, deployment of the three tier web application could be done in a day or even in hours. The same deployment could also be done in the matter of minutes in the cloud using Infrastructure as code (IaC).Now see how special and powerful it is.
Just think that we have deployed the web application in the on premises environment in 30 days and after a certain time the load on the web servers have increased and you wanted to add more web servers to reduce the load. Then you have to go through the whole process again (Plan-Procure-Provision), which would take a lot of time again. But with the Infrastructure as code (IaC), all it requires multiple lines of code added to the current code. See this is the beauty of the Infrastructure as code (IaC).
Now imagine you want to have the same kind of setup in a DR site for the disaster recovery or in a Test or Development environment. It would take almost same amount of time to deploy as the current one. However with the Infrastructure as code( IaC), just copy the code and paste it in any environment (Test or Prod) you want and run it (In the real time all you need is to change some lines of code such as region, AZs, VPC Ids etc) . Just in a matter of minutes you will have the same kind of setup.
To summarize, Infrastructure as code (IaC) is gaining a lot of momentum and eventually infrastructure would be seen as code and it is seemingly inevitable. It’s better for the people in the infrastructure world should learn about it. Otherwise, it would endanger their survival in the IT field.
Good one
Nice