Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing (Multiple) Environments With Puppet

Managing (Multiple) Environments With Puppet

A slide deck accompanying a presentation given at PuppetCamp Chicago 2015. This presentation discusses a few tips on managing Puppet environments, along with a discussion of some useful tools (r10k, hiera, hiera-redis)

Avatar for Chad Thompson

Chad Thompson

May 26, 2015
Tweet

More Decks by Chad Thompson

Other Decks in Technology

Transcript

  1. I wrote a book. I recorded a few videos. I

    have a website. http://chadthompson.me ABOUT ME certification{‘puppet’: ensure => 2014, }
  2. exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”:

    } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } -> exec{“”: } ->
  3. ENVIRONMENTS (Use Directory Based Environments!) 1) Configure Environments in puppet.conf

    2) Create separate directories for environments [main] … environmentpath=/etc/puppet/environments
  4. R10K! • A tool for managing environments • Allows you

    to add environments dynamically • Managing environments is as simple as managing source. https://github.com/puppetlabs/r10k
  5. HIERA… • … is a great tool for separating ‘data’

    from ‘code’. • … can be configured per environment. • … has a flexible backend system. (e.g. hiera-redis) :yaml: :datadir: '/etc/puppet/environments/%{environment}/ hieradata/'
  6. THE PIECES IN PLACE… • r10k to manage environment configurations

    • hiera / hiera-redis to manage data seperation • What next?
  7. ORCHESTRATING • MCollective (mco) to run commands on nodes mco

    puppet runonce …. • Jenkins as a ‘client’ application modify hiera variables -> execute MCollective