Infrastructure-as-code
Infrastructure as code (IaC) is simply means a programmable infrastructure. We can write code to create the deployments and manage configurations on servers. This means we simply codify the infrastructure. It may just to run a simple script to create the whole cloud deployment as well to destroy the deployment. Just using a piece of code you can control anything in your infrastructure including IT resources, storage, databases, networks, DNS, scaling: in a few words you are able to manage everything.
It is essential to identify the advantages of IaC in the modern clouds. It doesn’t matter if we are looking to deploy the servers in AWS, Azure, Google Cloud Platform or any other provider, we can have a scripted infrastructure depends on our use case.
With IaC, we can reproduce the same environment easily. It just a matter of running a script. we can use the same automation scripts to deploy the same environment to production, development and test environments. We don’t want to run the dev and test environment all the time. If we want to work on those environment, we can run the environment creating script and create exact the same environment. You can determine when to run dev and test deployments and simply destroy the dev and test environment in every night if there is no one working on those environments. Because when you’re in the cloud, you pay for every hour, minute, and even second the server is on.
If we encounter a major problem in the deployment, we can use the same automated deployment scripts to create a working copy o the environment and point the traffic to newly created deployment.
And always IaC will be the best solution for the typical problem “Production environments are way different than development environments”. You can replicate exact the same version of the production deployment to the development environment with small instances sizes.
Folowing are the IaC tools which you can use to automate your deployment in cloud:
- Terraform
2. AWS Cloud Formation
3. Google cloud deployment manager
4. Puppet
5. Ansible
6. Docker