SlideShare a Scribd company logo
Puppetizing Your Organization
Rob Nelson
Systems Administrator
@rnelson0
http://rnelson0.com
https://github.com/puppetinabox
Puppetizing your Organization
Code Reviews
Testing
Best Practices/Patterns
Continuous Integration
and Deployment
Reporting/
Monitoring
Code/Data Separation
Bare Metal
Packaging
Puppet Ecosystem
Puppetizing Your Organization
Culture
Be a change agent
• Rome wasn’t built in a day
• Lots of learning and failure
• Communication is key
• Pace yourself, avoid culture shock
Culture
“Expert Beginners”
“I know that I’m doing it right because, as an
expert, I’m pretty much doing everything right
by definition.” - Erik Dietrich
Don’t let yourself believe you’re a rock star.
Avoid working in isolation, without feedback
loops.
Sharing is Caring
Find feedback loops
• Puppet User Group (or LUG/VMUG/etc)
• Meetup.com (DevOps, Puppet, Conf. Management)
• Puppet Labs Test Pilots
• Websites: ask.puppetlabs.com, stackoverflow
• IRC: #puppet, #puppet-community
• Podcasts, Slideshares, Blog Posts, Video Tutorials
• Industry Peers (Friends, Co-Workers, Social Media)
• Jumpstart Engagement (PL Professional Services)
Get buy-in from your family and your employer. Get permission for the time and
don’t share proprietary data!
It’s a cultural issue, not a technological issue
• Git - Distributed VCS
• Mandatory code reviews via Pull Requests (PRs)
• Small, discrete, self-contained changes
• Enable approvals
• ESPECIALLY in emergencies!
• Git hooks save time and embarrassment
• Be positive!
Code Review
What’s the minimum customization you require to be productive?
● Shell prompt shows git branch
● Dot files
● Git hooks
● Puppet module skeleton
● Install tools like GitHub / SourceTree / Gepetto, plus minimal tweaks
● Integration: Kanban, Ticketing, etc.
Help your co-workers out:
• Document a decent baseline setup
• Provide vagrant boxes/VMs with everything installed and configured
• Use Puppet to maintain these standards
Minimum Viable Customization (MVC)
Create a culture that works for your team
Best Practices and Patterns
Declarative State Model - ‘What’ not ‘How’
• Code: Describe desired state through resources in a manifest
• Master: Catalog is a graph of all resources to apply to a node
• Agent: Applies the catalog, converges state
• Avoid exec resources; they are unpredictable and break noop mode
Shareable modules to install and/or manage a specific component
● Apache, TomCat, YourWebApp, Puppet Agent, etc.
● Check the forge before writing your own
● Puppet Labs has plenty of best practices guides for component modules
Component modules
Don’t repeat yourself
● Params shared between module subclasses
● Put all conditionals together
● No one size fits all, only use the subclasses you need
● Writing better Puppet modules
● Reference module: puppetlabs/ntp
params/config/install/service pattern
NTP Main Class
NTP Params Subclass
NTP Config and Install Subclasses
NTP Service Subclass
One node, one role - nothing more
● Role: Business Logic
○ Aggregate of profiles. role::webapp includes profiles base, apache,
tomcat, webapp
○ Includes only profile classes and resource ordering
● Profile: Technology stack
○ mysql, puppetdb, base
○ Contains any type of resource
Roles and Profiles
Roles: Profiles Only
Profiles: Any Resources
Testing: TDD or BDD
rspec-puppet, puppet-spec, beaker, beaker-rspec
Catch errors early, before production
• Unit and Acceptance tests
• Write tests before code
• Unit tests are a requirement for refactoring
• Encourage planning during growth
• Missing tests? Add them with puppet-retrospec
• Improve tests over time
Create Tests, then Code
Testing Summary
“What am I testing and is it valuable?”
• Test your code
• Let component modules have their own tests
• Don’t test Puppet
Culture High Points
• Pace yourself, avoid culture shock
• Create a culture of code review and testing
• Use best practices and patterns intelligently
Tooling
Travis CI, Jenkins CI, Bamboo
Verify ability to integrate code on every change
● Submit a PR, receive red or green feedback. Don’t merge red results!
● Continuous, shouldn't be a manual event!
Continuous Integration
r10k
Never log into your master again!
● Controlrepo defines modules via a Puppetfile
● Can include site-specific modules and hiera in the controlrepo
● Push code upstream, deploy it on the master automatically
● Each repo branch becomes a puppet environment
● Work with lots of individual repos? Reaktor
Continuous Deployment
Puppetfile: Pin Versions for Stability
Craft your own Puppetfiles with generate-puppetfile
Hiera
You can share code - on the forge, with colleagues or support - without
sharing your data
● Data is particular to your implementation and private, may include
passwords
● Hierarchal key/value pair lookup tool
● Automatic Parameter Lookups performs hiera lookups for every param
○ ntp::package_manage corresponds to $package_manage in class ntp
● Limits with deep merge (HI-118)
Separate your Code and Data
Razor
Make “rack and stack” the last provisioning step
● Discover new hardware, install OS or Hypervisors, add to Puppet and
configure
● Fully supported with Puppet Enterprise as of version 3.8
● You can still use Razor without PE - more assembly required
There are other tools, many of which rely on PXE: opencrowbar, cobbler, xcat
Bare Metal Provisioning
PuppetDB
Collect reports and exported resources
● Agents send reports to PuppetDB
○ Can be sent from masterless nodes as well
● Console or Puppetboard lets you see node status, nodes with fact X, status
of all events received for all agents
● API is available, craft your own queries
Reporting
Nagios / Icinga / Sensu / Zabbix
Dynamically populate your monitoring system(s) with exported resources
● Export hosts and checks
○ Infrastructure as Code
○ Must be able to define checks as a Puppet resource
● Export hosts, define checks in the monitoring system
○ Checks are not defined in the same version control system
○ May be more flexible when monitoring system includes nodes not
managed by Puppet
Monitoring
rpm, deb, pkg, etc.
Maintain and distribute software like a boss
● Distribute apps as packages, not tarballs or repos
● Definitely NOT with execs!
○ No .git/.svn directories
● Packaging systems capture metadata and work with the OS
● Use system packages first, application packages second
● Distribute your packages (yumrepo type built-in)
Packaging
Packaging isn’t complicated anymore
Thanks Jordan Sissel!
Specify input and output formats
Define dependencies and other metadata (author, contact, etc.)
fpm -s rpm -t deb -d java example.rpm
Install a gem, use fpm to deploy that gem elsewhere
Has a puppet target type, creates a module!
fpm
Make Puppet a part of everything
● Provisioning systems: Satellite, Foreman, VMware vRealize Suite
● Backups
● CMDB and IPAM
● Anything that makes your company tick
External Integrations
Deploy now, perfect later
Okay => Good => Better => New Tech => Okay => Good => Better => Repeat
● Choose something. Make it work “okay”. Deploy.
● Choose something else. Make it work “okay”. Deploy.
● Repeat on all processes and tasks.
● Repeat it again 6, 12, 18 months later.
Iterate
Recap
• Culture of change and feedback
• Many tools available in the ecosystem
• Iterate to success
Puppetizing Your Organization
Reference Links
● puppetboard
● puppetexplorer
● rspec-puppet
● puppet-spec
● beaker
● beaker-rspec
● Rise of the Expert Beginner
● Recommended pre-commit hook
● Beginner’s Guide to Modules
● Writing Better Puppet Modules
● The problem with params.pp
● puppet-retrospec
● puppet-module-skeleton
● Sh*t Gary Says
● r10k project
● r10k module
● reaktor
● Hiera deep merge issue
● razor
● fpm
● Git branch tutorial
● https://learn.puppetlabs.com/
● http://ask.puppetlabs.com
● Puppet Community CI and config
• My awesome wife, Michelle!
• Puppet Labs
• Puppet Community
• Reviewers
• Jason Breitwieser
• Ryan McKern (@the_mckern)
• Richard Pijnenburg (electrical / @richardp82)
• Walid Shaari
• Tim Meusel (bastelfreak)
Thank You!
Q&A

More Related Content

PDF
Puppet camp2021 testing modules and controlrepo
PDF
Puppet Camp Dallas 2014: How Puppet Ops Rolls
PDF
Modules of the twenties
PDF
Developing IT infrastructures with Puppet
PDF
Puppet Systems Infrastructure Construction Kit
PDF
Our Puppet Story (Linuxtag 2014)
PPTX
Auto Deploy Deep Dive – vBrownBag Style
PPTX
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Puppet camp2021 testing modules and controlrepo
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Modules of the twenties
Developing IT infrastructures with Puppet
Puppet Systems Infrastructure Construction Kit
Our Puppet Story (Linuxtag 2014)
Auto Deploy Deep Dive – vBrownBag Style
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)

What's hot (20)

PDF
Puppet Camp Paris 2016 Data in Modules
PDF
Virtual Bolt Workshop, 5 May 2020
PDF
Puppet Continuous Integration with PE and GitLab
PDF
Learning Puppet Chapter 1
PDF
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
PDF
Virtual CD4PE Workshop
PPTX
Troubleshooting Puppet
PDF
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PDF
Puppet evolutions
PDF
Essential applications management with Tiny Puppet
PDF
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
PDF
Puppet: From 0 to 100 in 30 minutes
PDF
Puppet for SysAdmins
PPTX
Virtual Bolt Workshop - 6 May
PDF
PuppetConf 2016 Moving from Exec to Types and Provides
PDF
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
PDF
Tp install anything
PDF
Puppet - Configuration Management Made Eas(ier)
PDF
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
PDF
Packaging perl (LPW2010)
Puppet Camp Paris 2016 Data in Modules
Virtual Bolt Workshop, 5 May 2020
Puppet Continuous Integration with PE and GitLab
Learning Puppet Chapter 1
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Virtual CD4PE Workshop
Troubleshooting Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
Puppet evolutions
Essential applications management with Tiny Puppet
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
Puppet: From 0 to 100 in 30 minutes
Puppet for SysAdmins
Virtual Bolt Workshop - 6 May
PuppetConf 2016 Moving from Exec to Types and Provides
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Tp install anything
Puppet - Configuration Management Made Eas(ier)
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Packaging perl (LPW2010)
Ad

Similar to Puppetizing Your Organization (20)

PDF
Puppet camp london nov 2014 slides (1)
PDF
From SaltStack to Puppet and beyond...
PDF
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
PPTX
Puppet camp amsterdam
PDF
Creating a mature puppet system
PDF
Creating a Mature Puppet System
PDF
PuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, Instruct
PDF
Steamlining your puppet development workflow
PDF
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
PDF
Improving Operations Efficiency with Puppet
PPTX
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
PDF
PuppetConf track overview: Inside Puppet
PPTX
The Art & Zen of Managing Nagios with Puppet
PDF
Using Puppet - Real World Configuration Management
ODP
Continuous Delivery of Puppet Manifests
PPTX
The Art and Zen of Managing Nagios With Puppet
PDF
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
PDF
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
PDF
PuppetConf 2014 Killer R10K Workflow With Notes
PDF
Story of Puppet @eBay Global Classifieds Group (eCG)
Puppet camp london nov 2014 slides (1)
From SaltStack to Puppet and beyond...
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Puppet camp amsterdam
Creating a mature puppet system
Creating a Mature Puppet System
PuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, Instruct
Steamlining your puppet development workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Improving Operations Efficiency with Puppet
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
PuppetConf track overview: Inside Puppet
The Art & Zen of Managing Nagios with Puppet
Using Puppet - Real World Configuration Management
Continuous Delivery of Puppet Manifests
The Art and Zen of Managing Nagios With Puppet
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
PuppetConf 2014 Killer R10K Workflow With Notes
Story of Puppet @eBay Global Classifieds Group (eCG)
Ad

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
KodekX | Application Modernization Development
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Monthly Chronicles - July 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KodekX | Application Modernization Development
Building Integrated photovoltaic BIPV_UPV.pdf

Puppetizing Your Organization

  • 3. Code Reviews Testing Best Practices/Patterns Continuous Integration and Deployment Reporting/ Monitoring Code/Data Separation Bare Metal Packaging Puppet Ecosystem
  • 6. Be a change agent • Rome wasn’t built in a day • Lots of learning and failure • Communication is key • Pace yourself, avoid culture shock Culture
  • 7. “Expert Beginners” “I know that I’m doing it right because, as an expert, I’m pretty much doing everything right by definition.” - Erik Dietrich Don’t let yourself believe you’re a rock star. Avoid working in isolation, without feedback loops.
  • 8. Sharing is Caring Find feedback loops • Puppet User Group (or LUG/VMUG/etc) • Meetup.com (DevOps, Puppet, Conf. Management) • Puppet Labs Test Pilots • Websites: ask.puppetlabs.com, stackoverflow • IRC: #puppet, #puppet-community • Podcasts, Slideshares, Blog Posts, Video Tutorials • Industry Peers (Friends, Co-Workers, Social Media) • Jumpstart Engagement (PL Professional Services) Get buy-in from your family and your employer. Get permission for the time and don’t share proprietary data!
  • 9. It’s a cultural issue, not a technological issue • Git - Distributed VCS • Mandatory code reviews via Pull Requests (PRs) • Small, discrete, self-contained changes • Enable approvals • ESPECIALLY in emergencies! • Git hooks save time and embarrassment • Be positive! Code Review
  • 10. What’s the minimum customization you require to be productive? ● Shell prompt shows git branch ● Dot files ● Git hooks ● Puppet module skeleton ● Install tools like GitHub / SourceTree / Gepetto, plus minimal tweaks ● Integration: Kanban, Ticketing, etc. Help your co-workers out: • Document a decent baseline setup • Provide vagrant boxes/VMs with everything installed and configured • Use Puppet to maintain these standards Minimum Viable Customization (MVC)
  • 11. Create a culture that works for your team
  • 12. Best Practices and Patterns Declarative State Model - ‘What’ not ‘How’ • Code: Describe desired state through resources in a manifest • Master: Catalog is a graph of all resources to apply to a node • Agent: Applies the catalog, converges state • Avoid exec resources; they are unpredictable and break noop mode
  • 13. Shareable modules to install and/or manage a specific component ● Apache, TomCat, YourWebApp, Puppet Agent, etc. ● Check the forge before writing your own ● Puppet Labs has plenty of best practices guides for component modules Component modules
  • 14. Don’t repeat yourself ● Params shared between module subclasses ● Put all conditionals together ● No one size fits all, only use the subclasses you need ● Writing better Puppet modules ● Reference module: puppetlabs/ntp params/config/install/service pattern
  • 17. NTP Config and Install Subclasses
  • 19. One node, one role - nothing more ● Role: Business Logic ○ Aggregate of profiles. role::webapp includes profiles base, apache, tomcat, webapp ○ Includes only profile classes and resource ordering ● Profile: Technology stack ○ mysql, puppetdb, base ○ Contains any type of resource Roles and Profiles
  • 22. Testing: TDD or BDD rspec-puppet, puppet-spec, beaker, beaker-rspec Catch errors early, before production • Unit and Acceptance tests • Write tests before code • Unit tests are a requirement for refactoring • Encourage planning during growth • Missing tests? Add them with puppet-retrospec • Improve tests over time
  • 24. Testing Summary “What am I testing and is it valuable?” • Test your code • Let component modules have their own tests • Don’t test Puppet
  • 25. Culture High Points • Pace yourself, avoid culture shock • Create a culture of code review and testing • Use best practices and patterns intelligently
  • 27. Travis CI, Jenkins CI, Bamboo Verify ability to integrate code on every change ● Submit a PR, receive red or green feedback. Don’t merge red results! ● Continuous, shouldn't be a manual event! Continuous Integration
  • 28. r10k Never log into your master again! ● Controlrepo defines modules via a Puppetfile ● Can include site-specific modules and hiera in the controlrepo ● Push code upstream, deploy it on the master automatically ● Each repo branch becomes a puppet environment ● Work with lots of individual repos? Reaktor Continuous Deployment
  • 29. Puppetfile: Pin Versions for Stability Craft your own Puppetfiles with generate-puppetfile
  • 30. Hiera You can share code - on the forge, with colleagues or support - without sharing your data ● Data is particular to your implementation and private, may include passwords ● Hierarchal key/value pair lookup tool ● Automatic Parameter Lookups performs hiera lookups for every param ○ ntp::package_manage corresponds to $package_manage in class ntp ● Limits with deep merge (HI-118) Separate your Code and Data
  • 31. Razor Make “rack and stack” the last provisioning step ● Discover new hardware, install OS or Hypervisors, add to Puppet and configure ● Fully supported with Puppet Enterprise as of version 3.8 ● You can still use Razor without PE - more assembly required There are other tools, many of which rely on PXE: opencrowbar, cobbler, xcat Bare Metal Provisioning
  • 32. PuppetDB Collect reports and exported resources ● Agents send reports to PuppetDB ○ Can be sent from masterless nodes as well ● Console or Puppetboard lets you see node status, nodes with fact X, status of all events received for all agents ● API is available, craft your own queries Reporting
  • 33. Nagios / Icinga / Sensu / Zabbix Dynamically populate your monitoring system(s) with exported resources ● Export hosts and checks ○ Infrastructure as Code ○ Must be able to define checks as a Puppet resource ● Export hosts, define checks in the monitoring system ○ Checks are not defined in the same version control system ○ May be more flexible when monitoring system includes nodes not managed by Puppet Monitoring
  • 34. rpm, deb, pkg, etc. Maintain and distribute software like a boss ● Distribute apps as packages, not tarballs or repos ● Definitely NOT with execs! ○ No .git/.svn directories ● Packaging systems capture metadata and work with the OS ● Use system packages first, application packages second ● Distribute your packages (yumrepo type built-in) Packaging
  • 35. Packaging isn’t complicated anymore Thanks Jordan Sissel! Specify input and output formats Define dependencies and other metadata (author, contact, etc.) fpm -s rpm -t deb -d java example.rpm Install a gem, use fpm to deploy that gem elsewhere Has a puppet target type, creates a module! fpm
  • 36. Make Puppet a part of everything ● Provisioning systems: Satellite, Foreman, VMware vRealize Suite ● Backups ● CMDB and IPAM ● Anything that makes your company tick External Integrations
  • 37. Deploy now, perfect later Okay => Good => Better => New Tech => Okay => Good => Better => Repeat ● Choose something. Make it work “okay”. Deploy. ● Choose something else. Make it work “okay”. Deploy. ● Repeat on all processes and tasks. ● Repeat it again 6, 12, 18 months later. Iterate
  • 38. Recap • Culture of change and feedback • Many tools available in the ecosystem • Iterate to success
  • 40. Reference Links ● puppetboard ● puppetexplorer ● rspec-puppet ● puppet-spec ● beaker ● beaker-rspec ● Rise of the Expert Beginner ● Recommended pre-commit hook ● Beginner’s Guide to Modules ● Writing Better Puppet Modules ● The problem with params.pp ● puppet-retrospec ● puppet-module-skeleton ● Sh*t Gary Says ● r10k project ● r10k module ● reaktor ● Hiera deep merge issue ● razor ● fpm ● Git branch tutorial ● https://learn.puppetlabs.com/ ● http://ask.puppetlabs.com ● Puppet Community CI and config
  • 41. • My awesome wife, Michelle! • Puppet Labs • Puppet Community • Reviewers • Jason Breitwieser • Ryan McKern (@the_mckern) • Richard Pijnenburg (electrical / @richardp82) • Walid Shaari • Tim Meusel (bastelfreak) Thank You!
  • 42. Q&A