16. What’s wrong with
Administration Today?
• Too many computers/services
• Too many different operating systems
• Not enough time
• Mostly a manual process
17. What’s wrong with
Administration Today?
• Too many computers/services
• Too many different operating systems
• Not enough time
• Mostly a manual process
• No feedback loop - (work and boss)
18. What’s wrong with
Administration Today?
• Too many computers/services
• Too many different operating systems
• Not enough time
• Mostly a manual process
• No feedback loop - (work and boss)
• Best practices are not shared
19. What’s wrong with
Administration Today?
• Too many computers/services
• Too many different operating systems
• Not enough time
• Mostly a manual process
• No feedback loop - (work and boss)
• Best practices are not shared
• Too much money lost when they fail
20. What’s wrong with
Administration Today?
• Too many computers/services
• Too many different operating systems
• Not enough time
• Mostly a manual process
• No feedback loop - (work and boss)
• Best practices are not shared
• Too much money lost when they fail
30. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
31. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
• Few if any built-in feedback loops
32. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
• Few if any built-in feedback loops
• Each tool is an independent
33. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
• Few if any built-in feedback loops
• Each tool is an independent
• All failures lead directly to human
intervention
34. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
• Few if any built-in feedback loops
• Each tool is an independent
• All failures lead directly to human
intervention
• No sharing of best practices and a manual
process prone to errors
35. What’s Wrong With
Existing Tools?
• Monitoring is immature and requires far too
much effort
• Few if any built-in feedback loops
• Each tool is an independent
• All failures lead directly to human
intervention
• No sharing of best practices and a manual
process prone to errors
• Security policies via documentation files
37. What is Puppet?
• Puppet is a programming language that
automates system administration
38. What is Puppet?
• Puppet is a programming language that
automates system administration
• It’s the glue between resources and
configuration files
39. What is Puppet?
• Puppet is a programming language that
automates system administration
• It’s the glue between resources and
configuration files
• Allows for repeatable sysadmin best
practices
40. Net Result
• Servers are configured exactly how you
specify
• Code once, deploy many
• Self documenting code
• Allow for repeatable built machines
• Allows for a constantly updated
infrastructure
43. Puppet Features
• Open Source GPL license
• Developed in Ruby language
44. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
45. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
46. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
47. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
• Platform independent (supports many *nixes)
48. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
• Platform independent (supports many *nixes)
• Relationships and execution order
49. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
• Platform independent (supports many *nixes)
• Relationships and execution order
• Can be used with servers and desktops
50. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
• Platform independent (supports many *nixes)
• Relationships and execution order
• Can be used with servers and desktops
• Recipes “make it so” - ensures correctness and
repeatable
51. Puppet Features
• Open Source GPL license
• Developed in Ruby language
• Declarative language
• Resource abstraction
• client/server model - centralized management with
downloadable resources
• Platform independent (supports many *nixes)
• Relationships and execution order
• Can be used with servers and desktops
• Recipes “make it so” - ensures correctness and
repeatable
• Not only for installs but to maintain and upgrade
59. The Configuration
Process
1. Retrieve resource catalog from central
server
60. The Configuration
Process
1. Retrieve resource catalog from central
server
2. Determine resource order
61. The Configuration
Process
1. Retrieve resource catalog from central
server
2. Determine resource order
3. Check each resource in turn, fixing if
necessary
62. The Configuration
Process
1. Retrieve resource catalog from central
server
2. Determine resource order
3. Check each resource in turn, fixing if
necessary
4. Rinse and repeat, every 30 minutes
64. Transactions (for each
resource)
1. Retrieve current state (e.g., by querying dpkg
db or doing a stat)
65. Transactions (for each
resource)
1. Retrieve current state (e.g., by querying dpkg
db or doing a stat)
2. Compare to desired state
66. Transactions (for each
resource)
1. Retrieve current state (e.g., by querying dpkg
db or doing a stat)
2. Compare to desired state
3. Fix, if necessary (or just log)
78. What can you manage?
• 40+ resource types
• Users in NetInfo, useradd, pw and LDAP
• Support for Debian, Ubuntu, Red Hat,
Solaris, OS X, Gentoo, SuSE, FreeBSD,
AIX, HP-UX and more (currently not
Windows)
88. Relationships matter
but are often implicit
Configuration should get
Package modifed after package
installation
Configuration
89. Relationships matter
but are often implicit
Configuration should get
Package modifed after package
installation
Service should restart
when
Configuration
configuration changes
Service
95. What is Facter?
• Collects and display facts about the
host
• Integrated into puppet. Variables are
inserted into Puppet recipes
96. What is Facter?
• Collects and display facts about the
host
• Integrated into puppet. Variables are
inserted into Puppet recipes
• Can create custom facts
97. What is Facter?
• Collects and display facts about the
host
• Integrated into puppet. Variables are
inserted into Puppet recipes
• Can create custom facts
• Detects changes and updates variables
114. Pros
• Forever changes the way you think about
administration. Administration now follows a
development lifecycle
• Relationships
• Make a consistent configuration that always works
• External Node classification - (LDAP or external app)
• Good open source community
115. Cons
• Weak with complex configuration files (Augeas
should help)
• Scalability issues out of box (uses webrick by
default)
• Documentation is slightly lacking and wiki needs
improvement
• Memory pig (especially with 64 bit OSes)
• Administration becomes system programming
• Test test test!
• Bad code, can have massive ripple effects
117. Puppet vs. Capistrano
• Primarily used for app deployment lifecycle
(mostly RoR)
• On top of SSH
• No resource abstraction
• similar to existing scripting
118. Puppet vs. Cfengine
• Closed sourced
• No resource abstraction
• No ordering
• No code reuse
• Cfengine 3 is a much needed improvement
119. Puppet vs. Chef
• Puppet uses an external DSL while Chef is
Ruby based
• Imperative (since is Ruby language)
• Chef’s relationship ordering is top down
(order of code matters)
• No true dependency graph
120. Resources
• http://puppet.reductivelabs.com/
• Source Code
• Recipes
• Wiki
• Documentation
• Bug Tracker
• http://groups.google.com/group/puppet-users
• “Pulling Strings with Puppet: Configuration Management Made
Easy” - James Turnbull
• ERB templates - http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/
121. NYC Puppet Group
• http://groups.google.com/group/puppet-nyc
• If demand supports it - monthly
• A.D.D. Moment: Don’t forget about
marketing research question
123. After NYLUG
TGI Fridays 8:30 PM
677 Lexington Avenue and 56th Street
Second floor, Northeast corner.
124. Larry Ludwig
Available for Puppet consulting services and best
practices. In and out of the cloud
Larry Ludwig
Email: larry@brandorr.com
Twitter: @lludwig
Web: brandorr.com
Editor's Notes
admin 15 years, using puppet for almost 2 years.
Originally called “What it is and how can it make system administration less painful”
Conveys a better image and what immediately comes to mind is no other than:
This is not a sales pitch
I will ask a marketing some marketing research at the end
Like to know my audience
Like to know my audience
Like to know my audience
Like to know my audience
Stone Age
Modernize Administration like programming has in the past 20 years.
Mention my story
One server relative easy to manage
- one OS
- mostly custom developed applications, few commercial or OSS apps to maintain and upgrade
- monolith mainframe
Even worse, cloud based instances that only last a few hours
Like a blacksmith
no complex images
repeatable installations
Puppet make administration a process than a manual task
puppetd run as a daemon or cron
one puppetmaster
each server is called a node
* You can change the runinterval
* You can trigger runs through puppetrun, SIGUSR1, or puppetd --test
* You can change the runinterval
* You can trigger runs through puppetrun, SIGUSR1, or puppetd --test
* You can change the runinterval
* You can trigger runs through puppetrun, SIGUSR1, or puppetd --test
* You can change the runinterval
* You can trigger runs through puppetrun, SIGUSR1, or puppetd --test
Idempotency is what allows us to manage a machine through its whole lifecycle
term idempotent is used to describe methods or subroutine calls that can safely be called multiple times, as invoking the procedure a single time or multiple times results in the system maintaining the same state; i.e., after the method call all variables have the same value as they did before.
add/remove more resources as needed
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
resources
title
attributes
ensures correctness (self healing)
Can develop your own custom Types
We’re doing the same thing with different commands on different platforms
resources
unique name for each resource
We’ll come back to abstraction
This is shareable, releasable code.
Classes are analogous with tags
modules
OO
inherits
includes
external nodes ie (LDAP)
And you don’t even need to centralize it.
* 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
use syslog-ng
development lifecycle
developed by one person, not active development, not client/server environment