Puppet

Puppet

  • is a configuration management tool
  • has it's own language
  • ships with multiple utilities (reports, logs, web interfaces, etc...)
  • Core is Open Source
  • Some utilities aren't (and are included in the payed version)
  • Works for Linux, Unix, even windows to some degree
  • Is used by Sony, RedHat, Intel, Github, Cisco...

Basic idea of configuration management tools:

  • Infrastructure as Code: Track, Test, Deploy, Reproduce, Scale
  • Reproducible setups: Do once, repeat forever
  • Scale quickly: Done for one, use on many
  • Coherent and consistent server setups
  • Continuous integration is usually implied

Puppet setup (basic)

  • Create a puppet manifest (aka configuration file)
  • Get it to the server somehow (Git, rsync, usb)
  • Run the configuration (assuming you have puppet installed on the server)

Puppet setup (master - slave)

  • A "master" containing the configuration files
  • Clients which ask the master periodically (cron) or wait for updates (daemonization)
  • All config files are @ one place

A minimal configuration file

user { 'zlatin':
  ensure     => present,
  uid        => '1000',
  gid        => '1000',
  shell      => '/bin/zsh',
  home       => '/home/zlatin'
}

There's a lot of gritty details to setting up puppet!

Example CI setup

Git

puppet master

Node

Node

On every push request:

  • run tests /compile (fail if they don't pass)

After push request:

  • update puppet master repo
  • send update to daemons

Questions?

Puppet

By Zlatin Stanimirov

Puppet

  • 832