Infrastructure as code (IaC)
Infrastructure as code (IaC) uses DevOps methodology
1 Overview
Infrastructure as code (IaC)
uses DevOps
methodology and versioning with a descriptive
model to define and deploy infrastructure, such as networks, virtual machines, load balancers, and connection topologies.
Just as the same source code always generates the same binary, an IaC model
generates the same environment every time it deploys.
2 Benefits of IaC
Provisioning infrastructure has historically been a time-consuming and costly manual process. As virtualization, containers, and cloud computing have become the norm, infrastructure management has moved away from physical hardware in data centers—providing many benefits, but also creating some new challenges.
With cloud computing, the number of infrastructure components has grown, more applications are being released to production on a daily basis, and infrastructure needs to be able to be spun up, scaled, and taken down frequently.
Without an IaC
practice in place, it becomes increasingly difficult to manage the scale of today’s infrastructure.
IaC
can help your organization manage IT infrastructure needs while also improving consistency and reducing errors and manual configuration.
Benefits:
- Cost reduction
- Increase in speed of deployments
- Reduce errors
- Improve infrastructure consistency
- Eliminate configuration drift
3 Avoid manual configuration to enforce consistency
IaC
evolved to solve the problem of environment drift in release pipelines. Without IaC
, teams must maintain deployment environment settings individually. Over time, each environment becomes a “snowflake,” a unique configuration that can’t be reproduced automatically. Inconsistency among environments can cause deployment issues. Infrastructure administration and maintenance involve manual processes that are error prone and hard to track.
IaC
avoids manual configuration and enforces consistency by representing desired environment states via well-documented code in formats such as JSON.
Infrastructure deployments with IaC
are repeatable and prevent runtime issues caused by configuration drift or missing dependencies.
Release pipelines execute the environment descriptions and version configuration models to configure target environments. To make changes, the team edits the source, not the target.
4 Tools
Using IaC config files, you can automate deployments of networks, virtual machines, servers, databases, etc. So, to orchestrate this infrastructure you wil need some tools:
- Terraform
- CloudFormation
- Ansible
- Puppet
- Pulumi
- Docker