Skip to main content

Configuration Management

Updated 3 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/configuration-management

In short

Configuration management is the practice of defining the desired state of servers and software in code and using tools to apply and keep it automatically.

What is configuration management?

In DevOps, configuration management means describing how systems should be set up, including which packages are installed, which files and settings they contain, and which services run, and then letting a tool make every machine match that description. Instead of an administrator connecting to each server and running commands by hand, the desired state is kept in version-controlled files and applied automatically to one server or thousands. Well-known open-source tools for this include Ansible, Puppet, Chef, and Salt.

Most tools are declarative: you state the result, such as nginx is installed and running, and the tool works out which steps are needed. A key property is idempotency, meaning that applying the same configuration twice changes nothing the second time, so it is safe to run repeatedly. Some tools push changes from a control machine over SSH, while others run an agent on each server that regularly pulls its configuration and corrects any drift from the desired state.

It is like a detailed recipe that a kitchen follows exactly every time, so every dish comes out the same no matter who cooks it. Configuration management is widely used for fleets of long-lived servers, on-premises data centers, and preparing base images, and it keeps environments such as staging and production consistent. The term also has an older, broader meaning in software engineering: tracking and controlling changes to every artifact of a project, from source code to documents.

Configuration management is often confused with infrastructure as code. Infrastructure as code usually refers to provisioning, which means creating resources such as networks, virtual machines, and databases, while configuration management sets up the software inside machines that already exist; in practice the two overlap, and many teams use both. With immutable infrastructure, configuration management runs once while an image is built rather than repeatedly on live servers.

Key takeaways

  • Configuration management keeps the desired state of systems in version-controlled code.
  • Tools apply that state automatically and correct drift on existing machines.
  • Idempotency makes it safe to apply the same configuration many times.
  • Infrastructure as code creates resources; configuration management configures what runs on them.
  • It keeps many servers and environments consistent and reproducible.

Example

An Ansible playbook describing a desired stateyaml
# Describe the result you want, not the steps to get there
- name: Configure web servers
  hosts: web
  become: true
  tasks:
    - name: Ensure nginx is installed
      ansible.builtin.apt:
        name: nginx
        state: present

    - name: Ensure nginx is running and starts on boot
      ansible.builtin.service:
        name: nginx
        state: started
        enabled: true

Readers ask

What is the difference between configuration management and infrastructure as code?

Infrastructure as code usually creates and changes infrastructure resources, such as networks, virtual machines, and load balancers. Configuration management installs and configures software on machines that already exist, and many teams use one tool for each job.

What does idempotent mean in configuration management?

It means that running the same configuration again leaves a system unchanged if it is already in the desired state. A task that says a package must be installed does nothing on a machine where it is already installed, so runs can be repeated safely.

Is configuration management still needed with containers?

Less of it runs on live servers, because container images are built once and replaced rather than updated. Teams still use configuration management for the hosts that run containers, for virtual machine images, and for systems that can't be containerized.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings