Table of contents
Understanding Infrastructure as Code and Configuration Management
As times change, tools change. As tools change, the purpose of the tools change.
There's a constant question that comes up about when to incorporate Infrastructure-as-Code (IaC) and when to utilize Configuration Management (ConfigMgmt). Not only is that question coming up for engineers, but it's also coming up for the companies that have created the Infrastructure-as-Code and Configuration Management platforms.
What's the right decision and which direction should you go in? In this blog post, you'll learn the differences between Infrastructure as Code and Config Mgmt, along with what platforms and tools are most commonly used.
What is Infrastructure as Code (IaC)?
Infrastructure-as-Code is used to automatically create any service or system in the cloud or on-prem with code.
The code is typically a provisioning language, like JSON or YAML. However, that's changing rapidly with HashiCorp Configuration Language (HCL), which is a much easier and human-readable language compared to JSON and YAML to write infrastructure code.
What is Configuration Management?
Configuration could consist of starting services, installing dependencies, installing applications, running updates, and much more, so it was a lot of manual effort. A few companies saw this problem and decided to make a type of tool to automate these tasks. The tool was Configuration Management.
Configuration Management is a way to configure servers.
The configuration could be:
Installing applications
Ensuring services are stopped or started
Installing updates
Opening up ports
Infrastructure as Code VS Configuration Management with suitable examples
The main difference between Infrastructure as Code (IaC) and Configuration Management (CM) is that IaC focuses on managing and provisioning infrastructure through code, while CM focuses on automating the configuration and management of software applications, operating systems, and servers.
Infrastructure provisioning tool Terraform is responsible for providing the network and servers
Configuration management tool Ansible configures applications inside servers provisioned by Terraform.
Let's say you're a startup and you're primarily using Serverless and Container technologies to deploy apps. Realistically, you don't need Configuration Management. You just need an automated way to create the Serverless service or the containers. Maybe you use an IaC tool to create a Lambda Function, for example.
On the flip side, maybe you're an organization like AWS that has a pretty important job; provisioning and configuring servers. Behind the AWS UI is a server running on a virtualized platform, and that server needs to be configured with the dependencies that are needed to run AWS. If you're at a company where bare metal or virtualized servers are still very much the way business is done, ConfigMgmt makes sense.
Most commonly used IaC and Config Management Tools:
IaC Tools:
a) Terraform: A most popular tool that supports multiple cloud providers and enables infrastructure provisioning using declarative code.
b) AWS CloudFormation: Specific to Amazon Web Services (AWS), it allows infrastructure provisioning using JSON or YAML templates.
c) Azure Resource Manager: Microsoft Azure's native IaC tool that uses JSON templates for infrastructure provisioning.
Configuration Management Tools:
a) Ansible: An open-source automation tool that uses a simple, human-readable language to manage configurations across servers.
b) Puppet: A powerful tool for managing complex infrastructures, allowing centralized management and configuration enforcement.
c) Chef: Another popular configuration management tool that automates infrastructure management using a domain-specific language (DSL).
Happy learning :)
Day 54 task is complete!
90DaysOfDevOps Tasks👇