Introduction to Configuration Management

Get an introduction to configuration management and discover its benefits.

What is configuration management?

Configuration management involves the maintenance of system configuration in an automated way. With the help of configuration management, we can install software packages or manage configuration on remote hosts.

Press + to interact
Configuration management with Ansible
Configuration management with Ansible

For example, when we need to install the docker or docker-compose packages to manage a container at runtime, we can use a configuration management tool, e.g., Ansible, to install these packages and even update them to a required version.

Benefits of configuration management

  • Reusability: Infrastructure configuration with a configuration management tool is easily reusable, thereby reducing duplication of effort.
  • Accurate reporting of activities: Because we use version control systems like git to store configuration files, it’s easier to log the changes made to the environment, the details of who made them, and what was changed.
  • Collaboration and communication: With version control, teams can effectively collaborate before deploying configuration changes.
  • Auditing: Configuration management tools like Ansible help access current configurations and can be used to show the differences between the desired state and the current state.
  • Recoverability: Recoverability is guaranteed because the configuration can be recovered easily in case of a disaster to a company’s IT infrastructure.

Now, we’ll walk through the following example of configuration management to easily install the docker and docker-compose packages on a remote host.

Installing the docker and docker-compose packages

We’ll follow the steps given below to install the two packages. A sample playbook has been prepared for our use, which targets installation against our workspace so we can explore the package installations.

  1. We can check the packages that will be installed by executing the ansible-playbook command in check mode:
    ansible-playbook -D -C install_docker.yml
    
  2. We can execute the following command to actually install the packages:
    ansible-playbook -D install_docker.yml
    
  3. We can verify installations by checking the versions of the installed packages using the following commands:
    docker --version
    
    docker-compose --version
    

Playground

Terminal 1
Terminal
Loading...