top of page
Search

IAC and Terrform

  • OordaMage
  • Mar 19
  • 2 min read

What is IAC?

The idea behind IAC is that you write and execute code to define, deploy update and destory your infrastructure.


There are 5 broad categories of IAC tools

1. Ad hoc scripts

2. Configuration management tools

3. Server templating tools

4. Orchestration tools

5. Provisioning tools


Configuration Management tools:

Configuration management stools are designed to  install and manage software on existing servers. They are idempotent.

Eg: Chef, Puppet and Ansible.

Server Templating tools:

The idea behind server templating tools is to create an image of a server that captures a fully self-contained “snapshot” of the operating system, the software, the files and all other relevant details. Eg: Docker, Vagrant, Packer from Hashicorp

Orchestration tools

Orchestration tools, in short,  are responsible for managing the actual VMs/Containers.

Provisioning tools

Provisioning tools are responding for creating the servers/infrastructures.

Eg: Terraform/Cloudformation


What are the benefits of IAC?

When your infrastructure is defined as a code, you are able to use a wide variety of software engineering practices to dramatically improve your software delivery process.


Self-service: If your infra is defined in code, the entire deployment process can be automated, and developers can kick off their own deployment wherever necessary.


Speed and Safety:If the deployment process is automated, it will be significantly faster, since a computer can carry ou the deployment steps far faster than a person, and safer, given that an autoamtes process will be more consistent, more repeatable and not prone to manual error.


Documentation:If the infra is defined as a code, then the sate of your infra is in source files that anyone can read.

Version Control:You can store your IAC source files in version control, which means that the entire history of your infra is now capture in commit log.


Validation:

If your infra is defined in code, for every single change, you can perform a code review, run a suite of automated tests, and pass the code through static analysis tools.

Ad hoc scripts:The Most straightforward approach to automating anything is to write an adhoc script. You take whatever task you were doing manually, break it down into discrete steps, use your favourite scripting language to define each of those steps in code and execute that script on your server. 

Eg, Bash,Python


What is terraform

Terraform is an open-source IAC software tool that enables you to safely and predictably create, change, and improve infrastructure.Terraform creates and manages resources on cloud platforms and other services through their application programming interfaces (APIs). Providers enable Terraform to work with virtually any platform or service with an accessible API.


Comments


bottom of page