Puppet: the Why
   and How
        Teyo Tyree
    teyo@puppetlabs.com
        Puppet Labs
      Portland, Oregon
         ...
Puppet is a system for
centrally specifying and
managing your
infrastructure
Written in Ruby
Three major pieces
Three major pieces
•A declarative, resource-
 oriented language
Three major pieces
•A declarative, resource-
 oriented language
• An   execution engine
Three major pieces
•A declarative, resource-
 oriented language
• An   execution engine
•A bunch of daemons and
 tools
1) A resource-
                  oriented language
Image from http://www.flickr.com/photos/heather/147388906/sizes/l/
Your infrastructure
                                       is code




Image from http://www.flickr.com/photos/echo_29/2582...
Resource
Abstraction Layer
      (RAL)
Do you really care
 how rpm works?
Resource Providers

• 29 package types
• Users in NetInfo, useradd, pw
• Support for Debian, Ubuntu, Red Hat, Solaris,
  O...
2) An
                                                                      engine for
                                   ...
Specifications are
   idempotent
Specifications are
   idempotent
3) Daemons and
 executables that
determine Puppet’s
   architecture
Centralized
Management
              Code




          Puppetmasterd




puppetd                   puppetd
 OS X         ...
Uses SSL, and
                  provides a Certificate
                        Authority




Image from http://www.flickr.c...
ralsh - a thin API wrapper
Puppet Is Pervasive

 Web        Entertainment   Technology




Financial
                             Defense
Community

• 2000+ people on the
 mailing lists
• 300+   people in IRC all day
• More   than 100 contributors
Shell scripts are
infrastructure assembly code
                           Programming    SysAdmin



    Low-level, non-  ...
Speciation




Image from http://flickr.com/photos/kenskritters/2128853769/
Sysadmins do
                    too much
Image from http://flickr.com/photos/shirleytwofeathers/2068713495/
Let’s talk about you
Some questions
Some questions

• How many of you have
 written software to manage
 computers?
Some questions

• How many of you have
 written software to manage
 computers?
• How  many have published
 this software?
Three
    people




Developer    Sysadmin
Puppet allows you
    to bridge that gap




Image from http://www.flickr.com/photos/patrick-smith-photography/2969769911/s...
Either you can manage
 many machines with
      little effort
Either you can manage
 many machines with
      little effort

    Or you can’t
How to use Puppet
 The strategical version
Seek the pain




Image from http://www.flickr.com/photos/pagedooley/2147718252/sizes/l/
Solve the simple
   problems
Add the infrastructure
 features you always
       wanted
How to use Puppet
  The tactical version
Think like Puppet
     thinks
Think like Puppet
      thinks
• Resources,not text snippets or
 lines added to files
Think like Puppet
      thinks
• Resources,not text snippets or
 lines added to files
• What
     resources are you
 managi...
Think like Puppet
      thinks
• Resources,not text snippets or
 lines added to files
• What
     resources are you
 managi...
Replace Shell Scripts
This:
             with Resources

Becomes:
Replace Shell Scripts
This:
             with Resources

Becomes:
Replace Shell Scripts
This:
             with Resources

Becomes:
Replace Shell Scripts
This:
             with Resources

Becomes:
Relationships
matter but are often

        Configuration should get
        modifed after package
        installation

 ...
Relationships
 matter but are often

               Configuration should get
Package        modifed after package
        ...
Relationships provide
                                                                                 ordering and
      ...
Classes document Intent
Organize files into
    modules
Provide platform
            abstraction
Debian




Red Hat
Provide platform
            abstraction
Debian




Red Hat
Portability and Naming
Class Membership
Class Membership
Puppet in the cloud
Heavily used in
EC2, VMWare, Xen,
       etc
Puppet allows you
to avoid the foil ball




 Image from http://www.flickr.com/photos/fungep/2516767121/sizes/l_
The Gory Details
Status and
          Roadmap
• In   production usage for years
• Aboutto release a new version with
 significant internal r...
Puppet and
Capistrano
 or ControlTier
It scales like HTTPS
      because it is https
Logs go to syslog
  (by default)
puppet
        labs
The people behind
     Puppet
Bad product,
hungry Luke
From 3 to 17 people
  in the last year
Support, Services,
    and more
Questions
Upcoming SlideShare
Loading in …5
×

Puppet talk at OSCON 2010.

1,983 views

Published on

Hey, what's this Puppet all about!

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,983
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
63
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide







  • And code is great because we have tooling like version control, and decades of experience with it

  • rpm/apt/etc becomes packages
    /etc/hosts becomes hosts
    useradd/netinfo, etc. becomes users
    /etc/init.d/smf/launchd/daemontools becomes services


  • Idempotency is what allows us to manage a machine through its whole lifecycle
  • client/server, cert mgmt, etc.

  • * Every connection is encrypted, and the only connection that isn’t authenticated is the one that asks for a signed cert
    * Client certs
    * Autosign, manual sign, manual certificate generation
    * You don’t even have to use it
  • This uses the same model as the rest of puppet -- it chooses the appropriate provider for the local system. You can edit resources, and it even works over the network.


  • * The assembly programmers fought the adoption of C
    * Fear for your career if you’re a bit too fond of assembly
    * It’s not about fewer people, it’s about higher quality and productivity
    * Are there more or fewer programmers today than in the days of assembly?
  • These are house finches, reminding one of the finches Darwin observed in the Galapagos. I want to cause sysadmin speciation.
  • Firefighter? Architect? Developer? Tape-changer? All of the above?
  • Do you have any computers?




















  • This is shareable, releasable code.
    Classes are analogous with tags

  • We’re doing the same thing with different commands on different platforms








  • And you don’t even need to centralize it.

  • This is all I do




  • Puppet talk at OSCON 2010.

    1. 1. Puppet: the Why and How Teyo Tyree teyo@puppetlabs.com Puppet Labs Portland, Oregon USA
    2. 2. Puppet is a system for centrally specifying and managing your infrastructure
    3. 3. Written in Ruby
    4. 4. Three major pieces
    5. 5. Three major pieces •A declarative, resource- oriented language
    6. 6. Three major pieces •A declarative, resource- oriented language • An execution engine
    7. 7. Three major pieces •A declarative, resource- oriented language • An execution engine •A bunch of daemons and tools
    8. 8. 1) A resource- oriented language Image from http://www.flickr.com/photos/heather/147388906/sizes/l/
    9. 9. Your infrastructure is code Image from http://www.flickr.com/photos/echo_29/25829591/sizes/o/
    10. 10. Resource Abstraction Layer (RAL)
    11. 11. Do you really care how rpm works?
    12. 12. Resource Providers • 29 package types • Users in NetInfo, useradd, pw • Support for Debian, Ubuntu, Red Hat, Solaris, OS X, Gentoo, SuSE, FreeBSD, and more • Windows support was announced this week
    13. 13. 2) An engine for applying specs repeatably Image from http://www.flickr.com/photos/jurvetson/480227362/sizes/l/
    14. 14. Specifications are idempotent
    15. 15. Specifications are idempotent
    16. 16. 3) Daemons and executables that determine Puppet’s architecture
    17. 17. Centralized Management Code Puppetmasterd puppetd puppetd OS X in the puppetd cloud Linux
    18. 18. Uses SSL, and provides a Certificate Authority Image from http://www.flickr.com/photos/piet_musterd/2307596484/sizes/l/
    19. 19. ralsh - a thin API wrapper
    20. 20. Puppet Is Pervasive Web Entertainment Technology Financial Defense
    21. 21. Community • 2000+ people on the mailing lists • 300+ people in IRC all day • More than 100 contributors
    22. 22. Shell scripts are infrastructure assembly code Programming SysAdmin Low-level, non- Assembly commands and portable files Abstract, C* Resources portable * For small values of abstract
    23. 23. Speciation Image from http://flickr.com/photos/kenskritters/2128853769/
    24. 24. Sysadmins do too much Image from http://flickr.com/photos/shirleytwofeathers/2068713495/
    25. 25. Let’s talk about you
    26. 26. Some questions
    27. 27. Some questions • How many of you have written software to manage computers?
    28. 28. Some questions • How many of you have written software to manage computers? • How many have published this software?
    29. 29. Three people Developer Sysadmin
    30. 30. Puppet allows you to bridge that gap Image from http://www.flickr.com/photos/patrick-smith-photography/2969769911/sizes/o/
    31. 31. Either you can manage many machines with little effort
    32. 32. Either you can manage many machines with little effort Or you can’t
    33. 33. How to use Puppet The strategical version
    34. 34. Seek the pain Image from http://www.flickr.com/photos/pagedooley/2147718252/sizes/l/
    35. 35. Solve the simple problems
    36. 36. Add the infrastructure features you always wanted
    37. 37. How to use Puppet The tactical version
    38. 38. Think like Puppet thinks
    39. 39. Think like Puppet thinks • Resources,not text snippets or lines added to files
    40. 40. Think like Puppet thinks • Resources,not text snippets or lines added to files • What resources are you managing?
    41. 41. Think like Puppet thinks • Resources,not text snippets or lines added to files • What resources are you managing? • How are they related to each other?
    42. 42. Replace Shell Scripts This: with Resources Becomes:
    43. 43. Replace Shell Scripts This: with Resources Becomes:
    44. 44. Replace Shell Scripts This: with Resources Becomes:
    45. 45. Replace Shell Scripts This: with Resources Becomes:
    46. 46. Relationships matter but are often Configuration should get modifed after package installation 30 Service should restart when Configuration configuration changes 30 Service
    47. 47. Relationships matter but are often Configuration should get Package modifed after package installation 30 Service should restart when Configuration configuration changes 30 Service
    48. 48. Relationships provide ordering and notification "Exec[createrepo-PM-RHEL5-noarch]" "Yumrepo[PM-RHEL5-x86_64]" "Package[postgresql-server]" "Postgres::Role[puppet]" "Package[thttpd]" "File[/var/www/thttpd/html/yum-PM-RHEL5-x86_64]" "File[/var/www/thttpd/html/yum-PM-RHEL5-noarch]" "Exec[rsync-rpmdir-PM-RHEL5-x86_64]" "Exec[rsync-rpmdir-PM-RHEL5-noarch]" "Exec[createrepo-PM-RHEL5-x86_64]" "Yumrepo[PM-RHEL5-noarch]"
    49. 49. Classes document Intent
    50. 50. Organize files into modules
    51. 51. Provide platform abstraction Debian Red Hat
    52. 52. Provide platform abstraction Debian Red Hat
    53. 53. Portability and Naming
    54. 54. Class Membership
    55. 55. Class Membership
    56. 56. Puppet in the cloud
    57. 57. Heavily used in EC2, VMWare, Xen, etc
    58. 58. Puppet allows you to avoid the foil ball Image from http://www.flickr.com/photos/fungep/2516767121/sizes/l_
    59. 59. The Gory Details
    60. 60. Status and Roadmap • In production usage for years • Aboutto release a new version with significant internal refactoring • Adding simple graphical tools this year
    61. 61. Puppet and Capistrano or ControlTier
    62. 62. It scales like HTTPS because it is https
    63. 63. Logs go to syslog (by default)
    64. 64. puppet labs The people behind Puppet
    65. 65. Bad product, hungry Luke
    66. 66. From 3 to 17 people in the last year
    67. 67. Support, Services, and more
    68. 68. Questions

    ×