What is Configuration Management?

In the context of software development and CI/CD, configuration management refers to recording the details of a particular infrastructure setup so that you can identify when changes were introduced.

A CI/CD pipeline includes several environments for testing and staging software before release. For the pipeline and tests to operate effectively, pre-production environments need to replicate production as closely as possible and remain consistent between test runs.

To achieve this you might set up a series of physical or virtual machines to host these environments. Over time, however, as patches are applied, new packages installed, or network settings modified to troubleshoot specific issues, those servers start to drift from the original configuration in different ways.

The result is a succession of snowflake servers. Worse, suppose the details of every single change are not recorded somewhere. In that case, it becomes much harder to recreate the same environment when a server fails or needs to be replicated to scale your testing operations. Configuration management seeks to address this problem.

Storing configuration details in your version control system provides visibility of any changes, making it easier to undo them if something goes wrong and apply the same changes to other machines, maintaining consistency.

If those configuration details are stored in a structured format, such as a YAML or XML file, you can take configuration management a step further and automate the configuration of servers. After changes are committed to version control, they are automatically applied to the relevant environments.

Taking an infrastructure-as-code approach makes it possible to tear down and recreate virtual machines automatically, so that you can set up your CI/CD pipeline to refresh environments between deployments. This makes it possible to deal with large numbers of machines and allows you to replicate environments easily when demand for testing increases.

If you’re using containers to deploy your software, some configuration elements, such as software dependencies, will move to the container image. However, the need to configure the servers hosting your containers remains. There are still many benefits to be had from codifying and automating the creation of those environments.