DC 5.6 Configuration Management

The sections below describes configuration management in detail and includes the following sections

What is configuration management?

Configuration management is a declarative language for defining configuration. In short configuration management has two important concepts

  • The actual configuration

  • The desired configuration - often referred to as State

Configuration management as a concept is about taking the system from the actual configuration of the system to the desired configuration.

The configuration management consists of a set of configuration layers that are compiled into a State which is applied to the system.

In its simplest form the State consists of one configuration layer, however, it can consist of multiple. In the drawing above there two layers a Base configuration layer and a Customer configuration layer. The engine uses a top-down approach when compiling the State, which means the higher level configuration layers can overwrite things in the lower level layers. Specifically properties in the Base configuration layer can be overwritten by making a reference to it in the Customer configuration layer.

The State is the desired configuration state in which the system should be in once it has been applied, hence this is a declarative programming language for defining the final configuration.

How does configuration management work?

As described above the State is compiled of a set of configuration layers. These layers are defined in a Domain specific language (DSL) which is described in greater details here.

Once all the configuration layers has been defined then the State can be compiled by combining all the layers and then the configuration can be applied to system.

The way this is done is as follows

Calculate difference

The first step calculates the difference between the actual configuration and the desired configuration, which corresponds to how the system actually is configured and the State.

The outcome of this is a set of actions that must be applied to take the system from the actual configuration to the desired configuration. These actions are split into three categories

  1. Create actions

  2. Update actions

  3. Delete actions

Apply

Once the difference and the actions has been calculated the state can be applied by to the system. This action carries out the actions calculated in the previous step in parallel and thereby takes the system to the desired configuration state.

Why configuration management?

Configuration management and the concepts around it brings a lot of advantages that can be utilized

  • Import & Export of configuration

  • Drift detection

  • Version control

Ā 

Import & Export of configuration

While configuration management it self does not implicitly imply import and export, then everything is defined by in a DSL (domain specific language) which is just a text file.

Therefore configuration can be exported from one system and into another system.

This makes moving configuration between systems - for instance between TEST and PRODUCTION much more simple and safe.

Imagine doing a configuration which involves a series of complex steps. Usually this is done in a TEST environment first and only when the configuration has been approved can it be moved to PRODUCTION. Without configuration management this task requires the series of complex steps to be carried out twice and therefore also tested twice. With configuration management this task only requires the series of complex steps to be conducted once after when they can exported and imported in Production. This both reduces the time for deployment, but also reduces the risk significantly.

Ā 

Drift detection

In short, drift detection means detecting how much the actual configuration has drifted away from the desired configuration.

This is best explained by a simple use case.

A problem is reported on a system and it looks related to configuration. Simple troubleshooting involves investigating the problems and the log files. Quickly the problem is identified as a configuration issue and the configuration is changed accordingly. The configuration adjustment may involve multiple steps and if these are applied as part of an iterative troubleshooting process it can sometimes be hard to remember what steps was taken.

The above use-case is a very good example of what drift detection is and how it can be utilized. Large enterprise systems often has a lot of complex configuration and remembering everything can be hard, specially if the corrections are time critical.

With configuration management it is possible to calculate exactly what was done to the system as it can calculate the difference between the actual configuration and the desired configuration. The difference between the two must be exactly what was changed - assuming the State was up-to-date when the configuration assignment was initiated.

Ā 

Version control

Since the configuration is text based it can also be uploaded into source control tools like Github. This inherently has the benefit of version control.

Furthermore, the changes to the Configuration layers are audited which means all configuration changes that has been done to the system can be found and potentially reverted.

Ā 

Ā