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

Puppet: a (very) brief introduction

Puppet: a (very) brief introduction

Presented to @CodeCumbria
2013-04-24

David Murphy

April 24, 2013
Tweet

More Decks by David Murphy

Other Decks in Technology

Transcript

  1. Once upon a time... ...there was server. It was a

    good little server. It only had one application to serve, and a nice sysadmin who cared for it. He'd configured it from bare metal, had hand-crafted each config file, and installed every package by hand.
  2. An unhappy ending That nice sysadmin got a job at

    Google... ...and that one application made the front page of Hacker News. The server broke.
  3. What is Puppet? Configuration Management of course! ...and much more...

    • Provisioning • Configuration • Automation • Deployment
  4. How does it work? Standalone A local manifest is manually

    applied to the local server Locally :) Client/Server The client sends it's information to the server The server sends back the configuration The client applies it
  5. Resource Describes a "thing" There are many types of things...

    user, group, file, package, service... http://docs.puppetlabs. com/references/latest/type.html
  6. Example resource user { 'dave': ensure => present, uid =>

    '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }
  7. Manifests Describe many "things" i.e. resources Use a .pp file

    extension Can be nested Can be combined
  8. Example manifest # ~/example.pp file {'testfile': path => '/tmp/testfile', ensure

    => present, mode => 0640, content => "I'm a test file.", }
  9. Applying manifests $ puppet apply example.pp notice: /Stage[main]//File[testfile]/ensure: created $

    cat /tmp/testfile I'm a test file. $ ls -lah /tmp/testfile -rw-r----- 1 root root 16 Feb 23 13:15 /tmp/testfile