Saltar al contenido ForoHackers

Configuration management: start here

Gestión de configuración
#3199 · · Citar · Denunciar

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

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder