Skip to the content ForoHackers
Log inJoin

Configuration management: start here

Configuration management
#3199 · · Quote · Report

Configuration management is describing what a machine should look like, in files, and letting a tool make it so. Instead of logging in and typing commands, you declare packages, files, users and services, apply the description, and get the same result on one server or a thousand.

Key concepts

  • Declarative state: you state the end result, such as "this package is installed", and the tool works out the steps.
  • Idempotence: applying the same description twice changes nothing the second time.
  • Drift: machines slowly diverge from their description through manual edits; the tool detects and corrects it.
  • Inventory and variables: which machines exist, how they are grouped and what differs between them.
  • Version control and review: configuration is code, so it is committed, reviewed and tested.

Vocabulary

  • Playbook, manifest, recipe: the file that holds the desired state, named differently by each tool.
  • Agent and agentless: a tool that runs a daemon on each machine, or one that connects over SSH when needed.
  • Immutable infrastructure: replacing machines with fresh images instead of changing them in place.
  • Secret: a password or key that must be stored encrypted, never in plain text.

What to study, in order

  1. Configure one server by hand and write every command in a text file.
  2. Install one configuration management tool and reproduce that file as a declarative description.
  3. Apply it twice and confirm the second run changes nothing.
  4. Add variables and templates so two machines share a role but differ in details.
  5. Edit a file by hand on the server, run the tool again and watch the drift disappear.
  6. Keep the secrets encrypted and test the description on a throwaway virtual machine.

Related tags

#devops #sysadmin #version-control #virtualization

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply