Skip main navigation

Configuration Management

.

Configuration Management is one of the primary disciplines that help you truly grasp the DevOps concept.

In this step, we’ll explain what configuration management is, the benefits of configuration management and how to effectively use Infrastructure as Code (IaC) and Configuration as Code.

Configuration Management

Configuration management refers to the management of the configuration of all environments for an application, and encompasses the following:

  • Typically, it occurs in the form of scripts that are version-controlled.
  • Configuration management in the DevOps world is less formal than traditional configuration management.
  • It emphasises encapsulation of configuration in code over formal documentation.
  • It means lighter-weight, executable configurations that allow us to have configuration and environments as code.

Both IaC and Configuration as Code fall under configuration management and both relate to defining or scripting for environments.

Infrastructure as Code: Defines your environments to include networks, servers, and other compute resources as a text file (script or definition) that’s checked into version control and is used as the base source for creating or updating those environments. For instance, adding a new server should be done by editing a text file and running the release pipeline, not by remoting into the environment and spinning up one manually.

Configuration as Code: Defines the configuration of your servers, code, and other resources as a text file (script or definition) that’s checked into version control and is used as the base source for creating or updating those configurations. For example, adding a new port to a firewall should be done by editing a text file and running the release pipeline, not by remoting into the environment and spinning one up manually.

The benefits of Configuration Management:

  • Allowing configuration to be version-controlled.
  • Detecting and correcting configuration drift.
  • Providing the ability to code-review and unit-test your infrastructure changes.
  • Treating infrastructure as a flexible resource.
  • Facilitating automation.
  • Enabling automated scale-up and scale-out.
  • Providing environment consistency.

Environment Deployment

The following table lists the major differences between manual deployment and IaC:

Table showing major differences between manual deployment and Infrastructure as Code; Manual deployment list: snowflake servers, deployment steps vary by environment, more verification steps and more elaborate manual processes, increased documentation to account for differences, deployment on weekends to allow time to recover from errors, slower release cadence to minimise pain and long weekends

Environment Configuration

The following table lists the major differences between manual configuration and Configuration as Code:

Table showing manual configuration: Configuration bugs difficult to ID, Error-prone, More verification steps and more elaborate manual processes, increased documentation, deployment on weekends to allow time to recover from errors, slower release cadence to minimise pain and long weekends

Effectively Using Infrastructure as Code and Configuration as Code

When you design scripts or definitions for IaC, it’s important to make sure that the code and tools are set up to be idempotent, or able to run multiple times without error and with consistency.

IaC may also be set up with help from developers because many tools offer code to be written in familiar programming languages, even as simple as JSON definitions.

Some examples of tools for working with IaC are Vagrant, Ansible, Puppet, Chef, Docker, PowerShell Desired State Configuration (DSC), as well as cloud-provided tools such as Azure Resource Management templates.

When you decide on using IaC and Configuration as Code, there doesn’t necessarily need to be a decision for one or the other as mutually exclusive processes.

Instead, the two processes complement each other and can be used in tandem. The term ‘Configuration as Code’ is not used as widely, and in some cases, IaC is used to describe both provisioning and configuring machines. IaC can also be Configuration as Code, but not vice versa.

Despite this, if you are using the two processes as separate, a simple rule of thumb is that IaC refers to creating and provisioning machines, while Configuration as Code refers to configuring components and software on the machines (such as opening ports and installing software).

There are two types of approaches to Infrastructure as Code:

  • Declarative (functional): The declarative approach states what the final state should be. When run, the script or definition will initialise or configure the machine to have the finished state that was declared.
  • Imperative (procedural): In the imperative approach, the script states the how for the final state of the machine by executing through the steps to get to the finished state.

There are also two types of methods in IaC:

  • Pull methods: In the pull method, the machines configured will pull the configuration from a controlling server, such as a master server.
  • Push methods: In the push method, the controlling or master server will push the configuration to the target machines. Some organisations may benefit from IaC frameworks such as PowerShell DSC.
This article is from the free online

Microsoft Future Ready: DevOps Development, Implementation and Azure Automation

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education