IaC

A Quick article on Infrastructure as Code. Infrastructure as Code (IaC) is the process of managing and provisioning computer data center resources through machine-readable definition files.

IaC
Photo by Alex Knight / Unsplash

The process of managing and provisioning computer data center resources through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools, is known as Infrastructure as Code (IaC).

The IT-infrastructure managed by this process includes

  • physical equipment, such as bare-metal servers,
  • virtual machines,
  • as well as associated configuration resources.

Definitions are often stored in a version control system rather than being maintained manually. The code in the definition files can use either scripts or declarative definitions, but IaC often employs declarative methods.

From the humble beginnings of what is today known as IaC, in the -90s, to today's full array of products, this story is also about Free and Open Software. I think that we wouldn't be where we are today without the FOSS movement. Also, Linux can't be forgotten. IaC grew as a response to the difficulty posed by utility computing and the web 2.0 frameworks. Two milestones were, the launch of Amazon Web Services’ EC2 in August 2006 and Ruby on Rails just months before. They created widespread scaling difficulties in the enterprise that were previously experienced only at large, multinational companies.

📝
Initially, EC2 used Xen virtualization. But in 2017, Amazon announced the new C5 family that were based on a custom architecture around the KVM hypervisor, called Nitro. Each virtual machine, called an "instance", functions as a virtual private server.

With new tools emerging to handle this ever-growing field, the idea of IaC was born. First Puppet and then Chef ware, the tech answers to a wide range of problems. Later, Ansible (acquired by Red Hat/IBM) and Terraform (IBM has made a bid) created a billion-dollar business.

Advantages of IaC

IaC is meant to reduce the complexity that kills efficiency out of manual configuration. The value of IaC can be broken down into three measurable categories:

Cost

Cost reduction aims at not only the financial benefits, but also in terms of people and effort. By removing the manual labor component, people can focus on other, more productive tasks.

Speed

Infrastructure automation helps you configure your infrastructure faster and help other teams work faster and more efficiently.

Risk

Automation removes the risk of human error, like manual misconfiguration, leading to reduce downtime and increase reliability.

These outcomes and attributes facilitate the implementation of a culture of DevOps, the combined working of development and operations.

Methods and Approaches

There are generally two approaches to IaC: functional (what) vs. procedural (how).

The declarative (what) approach focuses on what the eventual target configuration should look like. The declarative approach defines what needs to happen to get to that state.

The imperative (how) approach tells you what commands need to be done and in which order they shall be done to get to the desired result.

There are two ways to send these configurations to servers:

  • in the push method, the system sends instructions to the server directly.
  • in he pull method, the server gets its own instructions from the control system.

Continuous configuration automation – CCA

CCA tools are like extensions of traditional IaC. They use IaC to change, set up, and automate infrastructure. They also help manage infrastructure better and faster. These additional features provide enterprise-level security and compliance.

DevOps

Thirty years ago, DevOps was not a thing, but they did exist. As early as the 80s, we saw DevOps teams popping up to accelerate development of new products. The problem at that time was slow communication and the lack of mobile devices. Even a Sat Link was slow, measured with today's standards.

With the new IT landscape and technologies, Devs (Software Developers) become more involved in setting up things, and Ops (IT operations teams) become involved earlier in the development process. IaC tools help both teams work together and to make their efforts as effective as possible. The global growth of remote working enhanced this. Now we have Devs in Europe and Ops in US or vice versa, or whatever combo. And a team member on the other side of the world.

Automation in general is about making manual processes more efficient and productive. Making better software and apps that can be changed easily, work better, and are cheaper for the company.

Automation and collaboration are considered central points in DevOps.