SlideShare a Scribd company logo
1 of 82
Puppet for
    Dummies
    ZendCon - October 2011
    Santa Clara - United States




http://joind.in/3781
Who am I?


   Joshua Thijssen
   Senior Software Engineer @ Enrise (Netherlands)

   Development in PHP, Python, Perl, C, Java,
   and System & DB admin.


   Blog:    http://adayinthelifeof.nl
   Email:   joshua@enrise.com
   Twitter: @jaytaph




http://www.flickr.com/photos/akrabat/5422369749/in/photostream/
Joind.in




‣ http://joind.in/3781
The question of the day
The question of the day




  What is puppet and why should I care?
Why should I care?




 “People are finally figuring out puppet
 and how it gets you to the pub by 4pm.

 Note that I’ve been at this pub since
 2pm.”
                                 - Jorge Castro
Why should I care (really)?
What is puppet?




     Puppet is a (not necessarily the)
    solution for the following problem:

 How do we setup, manage, synchronize,
  and upgrade our internal and external
            infrastructure?
But isn’t that a sysadmin problem?



                             Sysadmin!
                        Y U no fix problem!
But isn’t that a sysadmin problem?



                             Sysadmin!
                        Y U no fix problem!




                             NO
What is puppet?




                  LAMP-stack
What is puppet?




                    Linux
                                    PHP
                  LAMP-stack
   Apache

                            MySQL
What is puppet?




       LAMPGMVNMCSTRAH-stack
What is puppet?



Hadoop                        MongoDB
                                          ActiveMQ
         Gearman      Linux
                              Varnish
Tika                                        PHP
         LAMPGMVNMCSTRAH-stack
                   Solr
        Apache            Ngnix         CouchDB
Redis     Memcache              MySQL
How do we manage our infrastructure?
How do we manage our infrastructure?




 ‣ Solution 1: We don’t,
How do we manage our infrastructure?




 ‣ Solution 1: We don’t,
 ‣ Solution 2: We outsource,
How do we manage our infrastructure?




 ‣ Solution 1: We don’t,
 ‣ Solution 2: We outsource,
 ‣ Solution 3: We automate the process.
How do we manage our infrastructure? (1)




‣ Solution 1: we don’t
How do we manage our infrastructure? (1)


   ‣ It’s not funny: you find it more often
     than not. Especially inside small
     development companies.




‣ Solution 1: we don’t
How do we manage our infrastructure? (1)


   ‣ It’s not funny: you find it more often
     than not. Especially inside small
     development companies.
   ‣ Internal sysadmin, but he’s too busy
     with development to do sysadmin.




‣ Solution 1: we don’t
How do we manage our infrastructure? (1)


   ‣ It’s not funny: you find it more often
     than not. Especially inside small
     development companies.
   ‣ Internal sysadmin, but he’s too busy
     with development to do sysadmin.
   ‣ We only act on escalation



‣ Solution 1: we don’t
How do we manage our infrastructure? (1)


   ‣ It’s not funny: you find it more often
     than not. Especially inside small
     development companies.
   ‣ Internal sysadmin, but he’s too busy
     with development to do sysadmin.
   ‣ We only act on escalation
   ‣ reactive, not proactive

‣ Solution 1: we don’t
How do we manage our infrastructure? (2)




‣ Solution 2: we outsource
How do we manage our infrastructure? (2)



   ‣ Expensive $LA’s.




‣ Solution 2: we outsource
How do we manage our infrastructure? (2)



   ‣ Expensive $LA’s.
   ‣ What about INTERNAL servers like
     your development systems and
     infrastructure?




‣ Solution 2: we outsource
How do we manage our infrastructure? (2)



   ‣ Expensive $LA’s.
   ‣ What about INTERNAL servers like
     your development systems and
     infrastructure?
   ‣ Fight between stability and agility.




‣ Solution 2: we outsource
How do we manage our infrastructure? (2)



   ‣ Expensive $LA’s.
   ‣ What about INTERNAL servers like
     your development systems and
     infrastructure?
   ‣ Fight between stability and agility.
   ‣ Does your hosting company decide
     on whether you can use PHP5.3???

‣ Solution 2: we outsource
How do we manage our infrastructure? (3)




‣ Solution 3: we do it ourselves and automate
How do we manage our infrastructure? (3)




   ‣ We are in charge.




‣ Solution 3: we do it ourselves and automate
How do we manage our infrastructure? (3)




   ‣ We are in charge.
   ‣ You can do what you like




‣ Solution 3: we do it ourselves and automate
How do we manage our infrastructure? (3)




   ‣ We are in charge.
   ‣ You can do what you like
   ‣ Use: cfEngine, chef, puppet.




‣ Solution 3: we do it ourselves and automate
How do we manage our infrastructure? (3)




   ‣ We are in charge.
   ‣ You can do what you like
   ‣ Use: cfEngine, chef, puppet.
   ‣ When done right, maintenance
     should not be difficult.


‣ Solution 3: we do it ourselves and automate
What is puppet?




‣ PUPPET TO THE RESCUE
What is puppet?


 ‣ Open source configuration
   management tool.
 ‣ Written in Ruby
 ‣ Open source:
   https://github.com/puppetlabs
 ‣ Commercial version available
   (puppet enterprise)
What is puppet?




                                                       ¹
             ‣ Don’t tell HOW to do stuff.
             ‣ Tell WHAT to do.




¹ It’s not actually true, but good enough for now...
What is puppet?



                                                         “yum install httpd”
                                                       “apt-get install apache2”
                                                                 ¹
             ‣ Don’t tell HOW to do stuff.
             ‣ Tell WHAT to do.

    “install and run the apache webserver”



¹ It’s not actually true, but good enough for now...
Architectural overview
Architectural overview




                     Puppet
Architectural overview



                              Puppet
         Puppet CA
                              Master

                     https

                     Puppet
                     Agent
Architectural overview



                              Puppet
         Puppet CA
                              Master

                     https

     Puppet          Puppet            Puppet
     Agent           Agent             Agent
How does it work




  Puppet           Puppet
  master            client
How does it work




             Check credentials
  Puppet                         Puppet
  master                          client
How does it work




             Check credentials
  Puppet           Send facts    Puppet
  master                          client
How does it work




             Check credentials
  Puppet           Send facts    Puppet
  master     Returns “catalog”    client
How does it work




             Check credentials
  Puppet           Send facts    Puppet
  master     Returns “catalog”    client

              Report results
Puppet manifests



  ‣ Manifests are puppet definitions
  ‣ <filename>.pp
  ‣ Puppet DSL
  ‣ De-cla-ra-tive language
  ‣ Version your manifests! (git/svn)
Puppet manifests



   package { “strace” :
     ensure => present,
   }

   file { “/home/jaytaph/secret-ingredient.txt” :
     ensure => present,
     mode => 0600,
     user => ‘jaytaph’,
     group => ‘noxlogic’,
     source => “puppet:///secret.txt”,
   }
Puppet manifests




      package { “httpd” :
        ensure => present,
      }

      service { “httpd”:
        running => true,
        enable => true,
        require => Package[“httpd”],
      }




‣ Spot the problem....
Puppet manifests


     Centos / Redhat
     service: httpd
     package: httpd
     config: /etc/httpd/conf/httpd.conf
     vhosts: /etc/httpd/conf.d/*.conf

     Debian / Ubuntu
     service: apache2
     package: apache2
     config: /etc/apache2/httpd.conf
     vhosts: /etc/apache2/sites-available


‣ Different distributions, different names
Puppet manifests




      package { “webserver”:
        case $operatingsystem {
          centos, redhat { $apache = “httpd” }
          debian, ubuntu { $apache = “apache2” }
          default : { fail(‘I don’t know this OS/distro’) }
        }

         name => $apache,
         ensure => installed,
     }




‣ $operatingsystem is a FACT
Facter


[root@puppetnode1 ~]# facter --puppet
architecture => x86_64
fqdn => puppetnode1.noxlogic.local
interfaces => eth1,eth2,lo
ipaddress_eth1 => 192.168.1.114
ipaddress_eth2 => 192.168.56.200
kernel => Linux
kernelmajversion => 2.6
operatingsystem => CentOS
operatingsystemrelease => 6.0
processor0 => Intel(R) Core(TM)2 Duo CPU             T7500   @ 2.20GHz
puppetversion => 2.6.9




‣ A simple list with info (also useable in your own tools)
Puppet manifests



  /etc/puppet/manifests/site.pp:
  node default {
    $def_packages = [ “mc”, “strace”, “sysstat” ]
    package { $def_packages :
      ensure => latest,
    }
  }




‣ “Main” manifest
Puppet manifests



   node /^webd+.example.local$/ {
     package { “httpd” :
       ensure => latest,
     }
   }
   node /^dbd+.example.local$/ {
     package { “mysql-server” :
       ensure => installed,
     }
   }




‣ Defining nodes - regular expressions
Puppet manifests


   node basenode {
     user { “jaytaph” :
       ensure => present,
       gid => 1000,
       uid => 1000,
       home => “/home/jaytaph”,
       shell => “/bin/sh”,
       password => “supersecrethashedpassword”,
       managehome => true,
     }
   }
   node /^.+.example.local/ inherits basenode {
     ...
   }



‣ Node inheritance
Puppet manifests




‣ Group together into a class
Puppet manifests


      class webserver {
        service { “apache”:
          ensure => running,
          require => Package[“apache”],
       }
       package { “apache” :
          ensure => installed,
       }




      }



‣ Group together into a class
Puppet manifests


      class webserver {
        service { “apache”:
          ensure => running,
          require => Package[“apache”],
       }
       package { “apache” :
          ensure => installed,
       }
          file { “vhost_${webserver_name}” :
            path => “/etc/httpd/conf/10-vhost.conf”,
            content => template(“vhost.template.erb”),
            notify => Service[“httpd”],
          }
      }



‣ Group together into a class
Puppet manifests


 vhost.template.erb
       <virtualHost <%= ipaddress %>:80>
         ServerName <%= webserver_name %>
         ServerAlias <%= webserver_alias %>
         DocumentRoot <%= webserver_docroot %>
      </virtualHost>




‣ ERB Templates can use custom variables and facts
Puppet manifests


 node “web01.example.local” inherits base {
   $webserver_name = “web01.example.local”
   $webserver_alias = “www.example.local”
   $webserver_docroot = “/var/www/web01”
   import webserver
 }
 node “web02.example.local” inherits base {
   $webserver_name = “web02.example.local”
   $webserver_alias = “crm.example.local”
   $webserver_docroot = “/var/www/web02”
   import webserver
 }
Puppet modules




  ‣ A puppet module is a collection of
    resources, classes, templates.
  ‣ Used for easy distribution and
    code-reuse.
  ‣ Self-contained, run out-of-the-box
Puppet modules



  ‣ puppetforge / github
  ‣ Create your own (and share!).
  ‣ Use the ones from puppet
    enterprise edition.
  ‣ Use the standard layout / best
    practices
Puppet modules
 class ntp::install {
     package{"ntpd":
         ensure => latest
     }
 }
 class ntp::config {
     File{
         require => Class["ntp::install"],
         notify => Class["ntp::service"],
         owner    => "root",
         group    => "root",
         mode     => 644
     }
     file{"/etc/ntp.conf":
              source => "puppet:///ntp/ntp.conf";
           "/etc/ntp/step-tickers":
              source => "puppet:///ntp/step-tickers";
     }
 }
 class ntp::service {
     service{"ntp":
         ensure => running,
         enable => true,
         require => Class["ntp::config"],
     }
 }
 class ntp {
     include ntp::install, ntp::config, ntp::service
 }
Test your modules




  ‣ (Unit)test your modules
  ‣ Test them with:
    puppet apply --noop
  ‣ More advanced testing: cucumber /
    cucumber-puppet (BDD)
What can puppet manage



     ‣ Almost everything.
     ‣ standard 48 different resource types
     ‣ Ranging from “file” to “cron” to
       “ssh_key” to “user” to “selinux”.
     ‣ Can control your Cisco routers and
       windows machines too (sortakinda)


‣ http://docs.puppetlabs.com/references/stable/type.html
Confusing puppet things
Confusing puppet things



 ‣ Puppet went from v0.25 to v2.6.
 ‣ REST interface since 2.6. XMLRPC
   before that.
 ‣ One binary to rule them all (puppet).
 ‣ Puppet v2.7 switched from GPLv2 to
   apache2.0 license.
Confusing puppet things




 ‣ --test does not mean dry-run!
   (--noop does).
 ‣ It’s not object oriented. (puppet
   class != php class)
 ‣ It’s a declarative language.
Puppet dashboards




http://media.techtarget.com/digitalguide/images/Misc/puppetDashboard.gif
Puppet dashboards




http://media.techtarget.com/digitalguide/images/Misc/puppetDashboard.gif
Live demo | MCollective?
MCollective




‣ Puppet agent “calls” the master every 30
  minutes.
‣ But what about realtime command & control?
‣ “Puppet kick”... (meh)
‣ MCollective (Marionette Collective)
MCollective



     ‣ Which systems running a database
       and have 16GB or less?
     ‣ Which systems are using <50% of
       available memory?
     ‣ Restart all apache services in
       timezone GMT+5.


‣ How do we handle large number of nodes?
MCollective



      Client           Middleware          Node
                                           MCollective
                                            Server




                                           MCollective
        Client             ACTIVEMQ
                                            Server




                                           MCollective
                                            Server
  Collective

‣ Middleware takes care of distribution,
‣ queued, broadcast etc..
MCollective




      ‣ The collective

http://docs.puppetlabs.com/mcollective/reference/basic/subcollectives.html
MCollective


$ mc-facts operatingsystem
Report for fact: operatingsystem

     CentOS         found 3 times
     Debian         found 14 times
     Solaris        found 4 times


$ mc-facts -W operatingsystem=Centos operatingsystemrelease
Report for fact: operatingsystemrelease

     6.0           found 1 times
     5.6           found 2 times




‣ Filter out nodes based on facts
MCollective - cool stuff



   ‣ Display all running processes
   ‣ Run or deploy software
   ‣ Restart services
   ‣ Start puppet agent
   ‣ Upgrade your systems
Recap




        -ETOOMUCHINFO

           Let’s recap
Recap (1)




 ‣ Configuration management tool.
 ‣ Focusses on “what” instead of “how”.
 ‣ Scales from 1 to 100K+ systems.
 ‣ Uses descriptive manifests.
Recap (2)




 ‣ Useful for sysadmins and developers.
 ‣ Keeps your infrastructure in sync.
 ‣ Keeps your infrastructure versioned.
 ‣ MCollective controls your hosts
   based on facts, not names.
Any questions?




http://farm1.static.flickr.com/73/163450213_18478d3aa6_d.jpg
to remove this comic sans font, please rate my talk on:
                http://joind.in/3781

More Related Content

What's hot

Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Łukasz Proszek
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe BookTim Riley
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102APNIC
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollectivePuppet
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REXSaewoong Lee
 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnAppWalter Heck
 
Scalable Systems Management with Puppet
Scalable Systems Management with PuppetScalable Systems Management with Puppet
Scalable Systems Management with PuppetPuppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetWalter Heck
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Soshi Nemoto
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with AugeasPuppet
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 

What's hot (20)

Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe Book
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
Puppet_training
Puppet_trainingPuppet_training
Puppet_training
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnApp
 
Scalable Systems Management with Puppet
Scalable Systems Management with PuppetScalable Systems Management with Puppet
Scalable Systems Management with Puppet
 
Apache Cassandra and Go
Apache Cassandra and GoApache Cassandra and Go
Apache Cassandra and Go
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 

Similar to Puppet for dummies - ZendCon 2011 Edition

Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys AdminsPuppet
 
Automating MySQL operations with Puppet
Automating MySQL operations with PuppetAutomating MySQL operations with Puppet
Automating MySQL operations with PuppetKris Buytaert
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 
Gearman and CodeIgniter
Gearman and CodeIgniterGearman and CodeIgniter
Gearman and CodeIgniterErik Giberti
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Work Queues
Work QueuesWork Queues
Work Queuesciconf
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkPatrick LaRoche
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and ChefDavid Benjamin
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsJoe Ferguson
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsJoe Ferguson
 
Using Puppet - Real World Configuration Management
Using Puppet - Real World Configuration ManagementUsing Puppet - Real World Configuration Management
Using Puppet - Real World Configuration ManagementJames Turnbull
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreJulien Pivotto
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItPuppet
 
Puppet Camp Chicago 2014: Puppet at backstop another year of lessons
Puppet Camp Chicago 2014: Puppet at backstop another year of lessonsPuppet Camp Chicago 2014: Puppet at backstop another year of lessons
Puppet Camp Chicago 2014: Puppet at backstop another year of lessonsPuppet
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small TeamsJoe Ferguson
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13kylog
 

Similar to Puppet for dummies - ZendCon 2011 Edition (20)

Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys Admins
 
Automating MySQL operations with Puppet
Automating MySQL operations with PuppetAutomating MySQL operations with Puppet
Automating MySQL operations with Puppet
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
Gearman and CodeIgniter
Gearman and CodeIgniterGearman and CodeIgniter
Gearman and CodeIgniter
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Work Queues
Work QueuesWork Queues
Work Queues
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM Talk
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and Chef
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
 
Using Puppet - Real World Configuration Management
Using Puppet - Real World Configuration ManagementUsing Puppet - Real World Configuration Management
Using Puppet - Real World Configuration Management
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymore
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
 
Puppet Camp Chicago 2014: Puppet at backstop another year of lessons
Puppet Camp Chicago 2014: Puppet at backstop another year of lessonsPuppet Camp Chicago 2014: Puppet at backstop another year of lessons
Puppet Camp Chicago 2014: Puppet at backstop another year of lessons
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13
 

More from Joshua Thijssen

15 protips for mysql users pfz
15 protips for mysql users   pfz15 protips for mysql users   pfz
15 protips for mysql users pfzJoshua Thijssen
 
Alice & bob public key cryptography 101 - uncon dpc
Alice & bob  public key cryptography 101 - uncon dpcAlice & bob  public key cryptography 101 - uncon dpc
Alice & bob public key cryptography 101 - uncon dpcJoshua Thijssen
 
Representation state transfer and some other important stuff
Representation state transfer and some other important stuffRepresentation state transfer and some other important stuff
Representation state transfer and some other important stuffJoshua Thijssen
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTJoshua Thijssen
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101Joshua Thijssen
 
15 protips for mysql users
15 protips for mysql users15 protips for mysql users
15 protips for mysql usersJoshua Thijssen
 
Sed & awk the dynamic duo
Sed & awk   the dynamic duoSed & awk   the dynamic duo
Sed & awk the dynamic duoJoshua Thijssen
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101Joshua Thijssen
 
PFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedPFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedJoshua Thijssen
 
PFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicPFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicJoshua Thijssen
 

More from Joshua Thijssen (13)

Moved 301
Moved 301Moved 301
Moved 301
 
Cipher block modes
Cipher block modesCipher block modes
Cipher block modes
 
15 protips for mysql users pfz
15 protips for mysql users   pfz15 protips for mysql users   pfz
15 protips for mysql users pfz
 
Alice & bob public key cryptography 101 - uncon dpc
Alice & bob  public key cryptography 101 - uncon dpcAlice & bob  public key cryptography 101 - uncon dpc
Alice & bob public key cryptography 101 - uncon dpc
 
Representation state transfer and some other important stuff
Representation state transfer and some other important stuffRepresentation state transfer and some other important stuff
Representation state transfer and some other important stuff
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101
 
15 protips for mysql users
15 protips for mysql users15 protips for mysql users
15 protips for mysql users
 
Workshop unittesting
Workshop unittestingWorkshop unittesting
Workshop unittesting
 
Sed & awk the dynamic duo
Sed & awk   the dynamic duoSed & awk   the dynamic duo
Sed & awk the dynamic duo
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101
 
PFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedPFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - Advanced
 
PFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicPFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - Basic
 

Recently uploaded

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Puppet for dummies - ZendCon 2011 Edition

  • 1. Puppet for Dummies ZendCon - October 2011 Santa Clara - United States http://joind.in/3781
  • 2. Who am I? Joshua Thijssen Senior Software Engineer @ Enrise (Netherlands) Development in PHP, Python, Perl, C, Java, and System & DB admin. Blog: http://adayinthelifeof.nl Email: joshua@enrise.com Twitter: @jaytaph http://www.flickr.com/photos/akrabat/5422369749/in/photostream/
  • 4. The question of the day
  • 5. The question of the day What is puppet and why should I care?
  • 6. Why should I care? “People are finally figuring out puppet and how it gets you to the pub by 4pm. Note that I’ve been at this pub since 2pm.” - Jorge Castro
  • 7. Why should I care (really)?
  • 8. What is puppet? Puppet is a (not necessarily the) solution for the following problem: How do we setup, manage, synchronize, and upgrade our internal and external infrastructure?
  • 9. But isn’t that a sysadmin problem? Sysadmin! Y U no fix problem!
  • 10. But isn’t that a sysadmin problem? Sysadmin! Y U no fix problem! NO
  • 11. What is puppet? LAMP-stack
  • 12. What is puppet? Linux PHP LAMP-stack Apache MySQL
  • 13. What is puppet? LAMPGMVNMCSTRAH-stack
  • 14. What is puppet? Hadoop MongoDB ActiveMQ Gearman Linux Varnish Tika PHP LAMPGMVNMCSTRAH-stack Solr Apache Ngnix CouchDB Redis Memcache MySQL
  • 15. How do we manage our infrastructure?
  • 16. How do we manage our infrastructure? ‣ Solution 1: We don’t,
  • 17. How do we manage our infrastructure? ‣ Solution 1: We don’t, ‣ Solution 2: We outsource,
  • 18. How do we manage our infrastructure? ‣ Solution 1: We don’t, ‣ Solution 2: We outsource, ‣ Solution 3: We automate the process.
  • 19. How do we manage our infrastructure? (1) ‣ Solution 1: we don’t
  • 20. How do we manage our infrastructure? (1) ‣ It’s not funny: you find it more often than not. Especially inside small development companies. ‣ Solution 1: we don’t
  • 21. How do we manage our infrastructure? (1) ‣ It’s not funny: you find it more often than not. Especially inside small development companies. ‣ Internal sysadmin, but he’s too busy with development to do sysadmin. ‣ Solution 1: we don’t
  • 22. How do we manage our infrastructure? (1) ‣ It’s not funny: you find it more often than not. Especially inside small development companies. ‣ Internal sysadmin, but he’s too busy with development to do sysadmin. ‣ We only act on escalation ‣ Solution 1: we don’t
  • 23. How do we manage our infrastructure? (1) ‣ It’s not funny: you find it more often than not. Especially inside small development companies. ‣ Internal sysadmin, but he’s too busy with development to do sysadmin. ‣ We only act on escalation ‣ reactive, not proactive ‣ Solution 1: we don’t
  • 24. How do we manage our infrastructure? (2) ‣ Solution 2: we outsource
  • 25. How do we manage our infrastructure? (2) ‣ Expensive $LA’s. ‣ Solution 2: we outsource
  • 26. How do we manage our infrastructure? (2) ‣ Expensive $LA’s. ‣ What about INTERNAL servers like your development systems and infrastructure? ‣ Solution 2: we outsource
  • 27. How do we manage our infrastructure? (2) ‣ Expensive $LA’s. ‣ What about INTERNAL servers like your development systems and infrastructure? ‣ Fight between stability and agility. ‣ Solution 2: we outsource
  • 28. How do we manage our infrastructure? (2) ‣ Expensive $LA’s. ‣ What about INTERNAL servers like your development systems and infrastructure? ‣ Fight between stability and agility. ‣ Does your hosting company decide on whether you can use PHP5.3??? ‣ Solution 2: we outsource
  • 29. How do we manage our infrastructure? (3) ‣ Solution 3: we do it ourselves and automate
  • 30. How do we manage our infrastructure? (3) ‣ We are in charge. ‣ Solution 3: we do it ourselves and automate
  • 31. How do we manage our infrastructure? (3) ‣ We are in charge. ‣ You can do what you like ‣ Solution 3: we do it ourselves and automate
  • 32. How do we manage our infrastructure? (3) ‣ We are in charge. ‣ You can do what you like ‣ Use: cfEngine, chef, puppet. ‣ Solution 3: we do it ourselves and automate
  • 33. How do we manage our infrastructure? (3) ‣ We are in charge. ‣ You can do what you like ‣ Use: cfEngine, chef, puppet. ‣ When done right, maintenance should not be difficult. ‣ Solution 3: we do it ourselves and automate
  • 34. What is puppet? ‣ PUPPET TO THE RESCUE
  • 35. What is puppet? ‣ Open source configuration management tool. ‣ Written in Ruby ‣ Open source: https://github.com/puppetlabs ‣ Commercial version available (puppet enterprise)
  • 36. What is puppet? ¹ ‣ Don’t tell HOW to do stuff. ‣ Tell WHAT to do. ¹ It’s not actually true, but good enough for now...
  • 37. What is puppet? “yum install httpd” “apt-get install apache2” ¹ ‣ Don’t tell HOW to do stuff. ‣ Tell WHAT to do. “install and run the apache webserver” ¹ It’s not actually true, but good enough for now...
  • 40. Architectural overview Puppet Puppet CA Master https Puppet Agent
  • 41. Architectural overview Puppet Puppet CA Master https Puppet Puppet Puppet Agent Agent Agent
  • 42. How does it work Puppet Puppet master client
  • 43. How does it work Check credentials Puppet Puppet master client
  • 44. How does it work Check credentials Puppet Send facts Puppet master client
  • 45. How does it work Check credentials Puppet Send facts Puppet master Returns “catalog” client
  • 46. How does it work Check credentials Puppet Send facts Puppet master Returns “catalog” client Report results
  • 47. Puppet manifests ‣ Manifests are puppet definitions ‣ <filename>.pp ‣ Puppet DSL ‣ De-cla-ra-tive language ‣ Version your manifests! (git/svn)
  • 48. Puppet manifests package { “strace” : ensure => present, } file { “/home/jaytaph/secret-ingredient.txt” : ensure => present, mode => 0600, user => ‘jaytaph’, group => ‘noxlogic’, source => “puppet:///secret.txt”, }
  • 49. Puppet manifests package { “httpd” : ensure => present, } service { “httpd”: running => true, enable => true, require => Package[“httpd”], } ‣ Spot the problem....
  • 50. Puppet manifests Centos / Redhat service: httpd package: httpd config: /etc/httpd/conf/httpd.conf vhosts: /etc/httpd/conf.d/*.conf Debian / Ubuntu service: apache2 package: apache2 config: /etc/apache2/httpd.conf vhosts: /etc/apache2/sites-available ‣ Different distributions, different names
  • 51. Puppet manifests package { “webserver”: case $operatingsystem { centos, redhat { $apache = “httpd” } debian, ubuntu { $apache = “apache2” } default : { fail(‘I don’t know this OS/distro’) } } name => $apache, ensure => installed, } ‣ $operatingsystem is a FACT
  • 52. Facter [root@puppetnode1 ~]# facter --puppet architecture => x86_64 fqdn => puppetnode1.noxlogic.local interfaces => eth1,eth2,lo ipaddress_eth1 => 192.168.1.114 ipaddress_eth2 => 192.168.56.200 kernel => Linux kernelmajversion => 2.6 operatingsystem => CentOS operatingsystemrelease => 6.0 processor0 => Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz puppetversion => 2.6.9 ‣ A simple list with info (also useable in your own tools)
  • 53. Puppet manifests /etc/puppet/manifests/site.pp: node default { $def_packages = [ “mc”, “strace”, “sysstat” ] package { $def_packages : ensure => latest, } } ‣ “Main” manifest
  • 54. Puppet manifests node /^webd+.example.local$/ { package { “httpd” : ensure => latest, } } node /^dbd+.example.local$/ { package { “mysql-server” : ensure => installed, } } ‣ Defining nodes - regular expressions
  • 55. Puppet manifests node basenode { user { “jaytaph” : ensure => present, gid => 1000, uid => 1000, home => “/home/jaytaph”, shell => “/bin/sh”, password => “supersecrethashedpassword”, managehome => true, } } node /^.+.example.local/ inherits basenode { ... } ‣ Node inheritance
  • 56. Puppet manifests ‣ Group together into a class
  • 57. Puppet manifests class webserver { service { “apache”: ensure => running, require => Package[“apache”], } package { “apache” : ensure => installed, } } ‣ Group together into a class
  • 58. Puppet manifests class webserver { service { “apache”: ensure => running, require => Package[“apache”], } package { “apache” : ensure => installed, } file { “vhost_${webserver_name}” : path => “/etc/httpd/conf/10-vhost.conf”, content => template(“vhost.template.erb”), notify => Service[“httpd”], } } ‣ Group together into a class
  • 59. Puppet manifests vhost.template.erb <virtualHost <%= ipaddress %>:80> ServerName <%= webserver_name %> ServerAlias <%= webserver_alias %> DocumentRoot <%= webserver_docroot %> </virtualHost> ‣ ERB Templates can use custom variables and facts
  • 60. Puppet manifests node “web01.example.local” inherits base { $webserver_name = “web01.example.local” $webserver_alias = “www.example.local” $webserver_docroot = “/var/www/web01” import webserver } node “web02.example.local” inherits base { $webserver_name = “web02.example.local” $webserver_alias = “crm.example.local” $webserver_docroot = “/var/www/web02” import webserver }
  • 61. Puppet modules ‣ A puppet module is a collection of resources, classes, templates. ‣ Used for easy distribution and code-reuse. ‣ Self-contained, run out-of-the-box
  • 62. Puppet modules ‣ puppetforge / github ‣ Create your own (and share!). ‣ Use the ones from puppet enterprise edition. ‣ Use the standard layout / best practices
  • 63. Puppet modules class ntp::install { package{"ntpd": ensure => latest } } class ntp::config { File{ require => Class["ntp::install"], notify => Class["ntp::service"], owner => "root", group => "root", mode => 644 } file{"/etc/ntp.conf": source => "puppet:///ntp/ntp.conf"; "/etc/ntp/step-tickers": source => "puppet:///ntp/step-tickers"; } } class ntp::service { service{"ntp": ensure => running, enable => true, require => Class["ntp::config"], } } class ntp { include ntp::install, ntp::config, ntp::service }
  • 64. Test your modules ‣ (Unit)test your modules ‣ Test them with: puppet apply --noop ‣ More advanced testing: cucumber / cucumber-puppet (BDD)
  • 65. What can puppet manage ‣ Almost everything. ‣ standard 48 different resource types ‣ Ranging from “file” to “cron” to “ssh_key” to “user” to “selinux”. ‣ Can control your Cisco routers and windows machines too (sortakinda) ‣ http://docs.puppetlabs.com/references/stable/type.html
  • 67. Confusing puppet things ‣ Puppet went from v0.25 to v2.6. ‣ REST interface since 2.6. XMLRPC before that. ‣ One binary to rule them all (puppet). ‣ Puppet v2.7 switched from GPLv2 to apache2.0 license.
  • 68. Confusing puppet things ‣ --test does not mean dry-run! (--noop does). ‣ It’s not object oriented. (puppet class != php class) ‣ It’s a declarative language.
  • 71. Live demo | MCollective?
  • 72. MCollective ‣ Puppet agent “calls” the master every 30 minutes. ‣ But what about realtime command & control? ‣ “Puppet kick”... (meh) ‣ MCollective (Marionette Collective)
  • 73. MCollective ‣ Which systems running a database and have 16GB or less? ‣ Which systems are using <50% of available memory? ‣ Restart all apache services in timezone GMT+5. ‣ How do we handle large number of nodes?
  • 74. MCollective Client Middleware Node MCollective Server MCollective Client ACTIVEMQ Server MCollective Server Collective ‣ Middleware takes care of distribution, ‣ queued, broadcast etc..
  • 75. MCollective ‣ The collective http://docs.puppetlabs.com/mcollective/reference/basic/subcollectives.html
  • 76. MCollective $ mc-facts operatingsystem Report for fact: operatingsystem CentOS found 3 times Debian found 14 times Solaris found 4 times $ mc-facts -W operatingsystem=Centos operatingsystemrelease Report for fact: operatingsystemrelease 6.0 found 1 times 5.6 found 2 times ‣ Filter out nodes based on facts
  • 77. MCollective - cool stuff ‣ Display all running processes ‣ Run or deploy software ‣ Restart services ‣ Start puppet agent ‣ Upgrade your systems
  • 78. Recap -ETOOMUCHINFO Let’s recap
  • 79. Recap (1) ‣ Configuration management tool. ‣ Focusses on “what” instead of “how”. ‣ Scales from 1 to 100K+ systems. ‣ Uses descriptive manifests.
  • 80. Recap (2) ‣ Useful for sysadmins and developers. ‣ Keeps your infrastructure in sync. ‣ Keeps your infrastructure versioned. ‣ MCollective controls your hosts based on facts, not names.
  • 82. to remove this comic sans font, please rate my talk on: http://joind.in/3781

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. anagram\n
  14. anagram\n
  15. anagram\n
  16. anagram\n
  17. anagram\n
  18. anagram\n
  19. anagram\n
  20. anagram\n
  21. anagram\n
  22. anagram\n
  23. anagram\n
  24. anagram\n
  25. anagram\n
  26. anagram\n
  27. anagram\n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n