You are currently viewing Infrastructure as Code (IaC)

Infrastructure as Code (IaC)

Infrastructure as Code is a trending topic in the IT industry. The aim of this article is to simplify what IaC is and why it became a trending topic, in a way that even non-technical parson can understand.

Traditionally, setting up and managing infrastructure like servers, networks, and storage was done manually. This approach had several issues.

Manually setting up infrastructure often leads to mistakes like misconfiguring a server or forgetting a step. Additionally, it is time-consuming because each server or resource needs individual attention. Apart from that, inconsistency, scalability issues, high cost were common problems with this approach.

Imagine setting up 100 servers for a new app launch. Doing it manually would take weeks and likely have errors, causing delays or failures.

Infrastructure as Code (IaC) came to picture to solve those problems.

What is Infrastructure as Code (IaC)?

IaC is the practice of managing and provisioning infrastructure using code, rather than manually configuring hardware or software.

This like a writing a recipe for a dish. Once the recipe is written, you can use it to prepare the same dish perfectly every time. Similarly, with IaC, you write a “script” that describes your infrastructure, and the script can set it up automatically.

For example, Instead of manually creating 100 servers, you write a script that defines what the servers should look like, and a tool like Terraform or Ansible will create them for you.

IaC is often associated with virtual resources like cloud servers, storage, or networking components. But it can also be used to configure, manage, and maintain physical servers or existing infrastructure. As examples,

  • Provisioning the Operating System
  • Installing and configuring software (e.g., web servers, databases).
  • Setting up firewalls and security policies.
  • Managing users and permissions
  • Application Deployment, many more.

This method is cost efficient, because infrastructure is defined in code, every server or resource is set up the same way every time. Additionally, these scripts can be stored in version control systems (like Git), So changes can be tracked and rolled back. Adding or removing resources is also easy. You just need to update the script.

Popular Tools for IaC

  • Terraform: A widely used tool for multi-cloud infrastructure provisioning. (Supports all major cloud platforms.)
  • Ansible: Focuses on configuration management. Typically use to configure applications in already provisioned environments.
  • AWS CloudFormation: Use and only support in AWS cloud.
  • Azure Resource Manager (ARM): Use and only support in Azure cloud.

If you are an IT undergraduate and are looking to step into DevOps engineering or platform engineering, kowning the concept of IaC is important. IaC is a massive subject, so feel free to explore more.

Leave a Reply