Luke Kanies luke@reductivelabs.com Founder, Reductive Labs Nashville, Tennessee USA
Puppet: How and Why
Why it exists, how it works, and why it works this way
Puppet: How and Why Luke Kanies luke@reductivelabs.com Founder, - - PowerPoint PPT Presentation
Puppet: How and Why Luke Kanies luke@reductivelabs.com Founder, Reductive Labs Nashville, Tennessee USA Why it exists, how it works, and why it works this way Automation tools in general Not exactly modern Image from
Luke Kanies luke@reductivelabs.com Founder, Reductive Labs Nashville, Tennessee USA
Puppet: How and Why
Why it exists, how it works, and why it works this wayAutomation tools in general
Not exactly modern
Image from http://flickr.com/photos/silverwood/593965547/In fact, they kinda suck
Image from http://flickr.com/photos/jefframone/1426716646/ Why?Developer Sysadmin
* How many of you have written software to manage computers? * How many have published this software?Developer Sysadmin Three people
* How many of you have written software to manage computers? * How many have published this software?Somebody has to do something, and it's just incredibly pathetic that it has to be us.
But that’s still not enough
What is a sysadmin?
Image from http://flickr.com/photos/shirleytwofeathers/2068713495/ Firefighter? Architect? Developer? Tape-changer? All of the above?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.
Either you can manage many machines with little effort
Either you can manage many machines with little effort Or you can’t
How do we create that tool?
Programming SysAdmin Low-level, non- portable Assembly commands and files Abstract, portable C* Resources
An Analogy
* For small values of abstract
* 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 few people, it’s about higher quality and productivity * Are there more or fewer programmers today than in the days of assembly?Infrastructure 2.0
This is a joke, kind of. Talk about going to Web 2.0. We’re stealing their ideas and using them to make our infrastructure better. In general, we need to steal more ideas.Abstraction
Portable Resources
This:
Portable Resources
Becomes: This:
Portable Resources
Becomes: This:
Portable Resources
Becomes: This:
Portable Resources
Becomes: This:
Portable Resources
Becomes: This:
Resource Providers
23 package types Users in NetInfo, useradd, pw Support for Debian, Ubuntu, Red Hat, Solaris, OS X, Gentoo, SuSE, FreeBSD, and more
Your infrastructure can use µf, too
Hang out on this slide, make the pointReuse
“...we’ve just switched from CVS to SVN, and it’s awesome”
Your Infrastructure is a program
Same concept, different code
Debian
We’re doing the same thing with different commands on different platformsSame concept, different code
Debian Red Hat
We’re doing the same thing with different commands on different platformsSame concept, different code
Debian Red Hat
We’re doing the same thing with different commands on different platformsPortability and Naming
One solution per problem
Network Effects
Completeness
Relationships matter but are often implicit
Relationships matter but are often implicit
Package
Relationships matter but are often implicit
Package Configuration
Configuration should get modifed after package installation
Relationships matter but are often implicit
Package Service
Service should restart when configuration changes
Configuration
Configuration should get modifed after package installation
Relationships matter
We’ll come back to abstractionClasses provide Intent
This is shareable, releasable code. Classes are analogous with tagsPuppet as a tool
Centralized Management
puppetd in the cloud Puppetmasterd puppetd OS X puppetd Linux CodeEach host gets a Resource Catalog
Node Classification
Node Classification
Node Classification
SSH Resources
We’ll come back to abstractionSo You’ve Got a Resource Catalog
The Configuration Process
* You can change the runinterval * You can trigger runs through puppetrun, SIGUSR1, or puppetd --testThe Configuration Process
server
* You can change the runinterval * You can trigger runs through puppetrun, SIGUSR1, or puppetd --testThe Configuration Process
server
The Configuration Process
server
necessary
* You can change the runinterval * You can trigger runs through puppetrun, SIGUSR1, or puppetd --testThe Configuration Process
server
necessary
Transactions (for each resource)
Transactions (for each resource)
db or doing a stat)
Transactions (for each resource)
db or doing a stat)
Transactions (for each resource)
db or doing a stat)
Configurations are idempotent
Idempotency is what allows us to manage a machine through its whole lifecycleConfigurations are idempotent
Idempotency is what allows us to manage a machine through its whole lifecycleIdempotency allows management through the lifecycle
Resource sorting is done via dependencies
In this context, I sometimes call the Resource Catalog the ‘Resource Graph’
A Simple Transaction
A Simple Transaction
A Simple Transaction
Client Reporting
Who’s using Puppet?
“...at Google we're currently using Puppet to manage close to 6,000 Macs, and it's likely our deployment will expand dramatically beyond that....”
Testimonials . . .at Google we're currently using it to manage close to 6,000 Macs, and it's likely our deployment will expand dramatically beyond that. . . Nigel Kersten MacOpsPuppet vs. Capistrano
Puppet vs. Cfengine
It scales like HTTPS
And you don’t even need to centralize it.All communication is via XMLRPC over HTTPS
And moving to REST
Uses SSL, and provides a Certificate Authority
* 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 itLogs go to syslog (by default)
Written in Ruby
coverage)
types, providers, reports, etc.)
Language and Library
C was a language and a library, Puppet is a framework and a toolAn api
* Discovery * Replace webmin in 20 mins * etc.ralsh - a thin API wrapper
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.Virtualization
Image from http://flickr.com/photos/pingnews/132543603/Bad product, hungry Luke
Full time since March 2005
Support, Consulting, Training, and more
Other Software
An Irony
Puppet exposes Your Next Big Problem
Puppet is plumbing
We’re producing software to take more advantage of it. We’re beginning to build a Puppet ecosystem.In the Future