SlideShare a Scribd company logo
Learning Lessons Scaling to
                      5000 Agents
                                    Russ Johnson
                               rjohnson@stubhub.com
                                   @professoruss




Confidential                                   Slide 1
#whoami

    Started out in the mid 90’s
    Recovering Windows Admin
    Storage Guy
    Datacenter Monkey
    Once upon a time network guy
    At StubHub since December 2006
    Working on puppet adoption in a crazy infrastructure
    Puppet certified


April 9, 2013                                              2
4 Puppet Masters




                DEV/QA   PROD




                 DR      CORP
April 9, 2013                   3
The road to sanity




April 9, 2013            4
Set up your master properly

            Apache/Passenger
            Tune Passenger
                PassengerMaxPoolSize 32
                PassengerMinInstances 4
                PassengerMaxRequests 10000
                PassengerStatThrottleRate 30


            16 cores, 32GB
            load average: 4.03, 3.71, 3.45
            4000+ agents



April 9, 2013                                  5
Thundering herds




April 9, 2013          6
Build your hosts the same way!

            Old way:
                systemimager, vmware clones, manual installs
            Results:
                INCONSISTENCY!




April 9, 2013                                                  7
Build your hosts the same way!

            New way:
                Cobbler < 5m bare metal to on the network
            Results:
                Same results every time! No drift between base




April 9, 2013                                                    8
Set up your working environment properly

            Geppetto – eclipse based IDE
                  http://cloudsmith.github.com/geppetto/index.html
            VIM
            •    Pathogen – For autoloading vim plugins
            •    Snipmate – Snippets
            •    Tabular – Text filtering and alignment
            •    Syntastic – Syntax checking
            •    mv-vim-puppet – Make vim puppet friendly
            •    puppet-lint – Syntax checker (gem)

April 9, 2013                                                        9
Syntastic/puppet-lint




April 9, 2013               10
Set up your working environment properly



                            +




April 9, 2013                                  11
Version Control is not enough

            Ever do a 4 way diff across 60 modules to find most of
            them different?




April 9, 2013                                                        12
What to do?

 How do I stop manual edits?

                        How do I deal with 80+ Dev/QA Environments?


                Versioning?                              Librarian?

                                                    Pulp?
        Branching?

                                                   Internal Forge?

 Dynamic Environments?
                                            Puppet Module Tool?
                    What does PuppetLabs do?
April 9, 2013                                                     13
PuppetLabs seems to know what to do




                         Let’s investigate
                        puppet module tool




http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html



April 9, 2013                                                        14
Generate a module




http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html

April 9, 2013                                                        15
Edit Modulefile




http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html
April 9, 2013                                                        16
Document the manifest




                http://rdoc.sourceforge.net/
April 9, 2013                                  17
Write Documentation?




April 9, 2013              18
Free Docs!

        puppet doc -a -o /var/www/html/puppetdocs --mode rdoc




April 9, 2013                                                   19
What’s actually installed?




April 9, 2013                    20
Catching live edits and preventing them



                Splunk -> puppet module changes -> alerting




                       The NOC will hunt you down!


April 9, 2013                                                 21
Build and install the module




     tar –xzf /tmp/work/stubhub-puppetserver/pkg/stubhub-
     puppetserver-0.0.1.tar.gz –C /etc/puppet/environments/
     staging/modules/puppetserver




April 9, 2013                                                 22
Releasing like that?




April 9, 2013              23
Internal Forge

    mod_rewrite:
           Simulate the api – redirect to json metadata files
           $htmlroot/api/v1/releases.json?module=user/module



    ruby script:
           Generate metadata files for each module release and
           all modules.
           Similar to createrepo (yum)


April 9, 2013                                                    24
Internal Forge - Search




April 9, 2013                 25
Internal Forge - install




April 9, 2013                  26
Internal Forge - upgrade




April 9, 2013                  27
Case statements? How bout Hiera?




April 9, 2013                          28
Avoid case statement insanity

    case $::system_role {
         ‘browse’, ‘search’: {
                …do some stuff…
          }
         ‘db’: {
                …other stuff…
         }
         ‘otherrole’: {
                …please make it stop!!!!
         }
    }
April 9, 2013                              29
hieradata

    $hieradata/browse.yaml:
           ---
           module::parameter: ‘foo’

    $hieradata/search.yaml:
           ---
           module::parameter: ‘bar’

    $hieradata/defaults.yaml:
           ---
           module::parameter: ‘I want this everywhere unless there are overrides’




April 9, 2013                                                                       30
Case -> variables -> hiera

    §    9000 lines of case statements


    §    1000 lines with case/variables


    §    ~20 lines with defined type


                     Code compression FTW!


April 9, 2013                                31
Dynamic Environments

    §    puppet.conf:
    modulepath = /etc/puppet/environments/$environment/modules
    manifest       = /etc/puppet/environments/$environment/manifests/site.pp
    manifestdir = /etc/puppet/environments/$environment/manifests




    §    hiera.yaml:
    :datadir: '/etc/puppet/environments/%{environment}/hieradata'




April 9, 2013                                                              32
Release process

 §    Syntax check/validate
 §    Test on VMs
 §    Build module package
 §    Release to internal forge
 §    puppet module install to staging environment
 §    Test again!
 §    puppet module install to production environment


April 9, 2013                                            33
The road to yesop

    §    Staging
    §    Process
    §    Repeatability
    §    Consistency
    §    Document everything
    §    Breaking things where it’s cheap
    §    Test everything!


April 9, 2013                                34
Then VS now

 §    Environment build time:
         –      Then: 3+ weeks
                 •  It was wrong

                 •  It didn’t work

                 •  Nobody knew what to expect

         –      Now: < 1 day
                 •  It’s the same every time

                 •  We know exactly what’s installed

                 •  Internal consumers get what they expect

                 •  Less outages from human error


April 9, 2013                                                 35
Questions?




April 9, 2013                36

More Related Content

PDF
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
PDF
Thinking through puppet code layout
PDF
Creating a mature puppet system
KEY
Puppet for dummies - ZendCon 2011 Edition
PDF
Puppet for SysAdmins
PDF
Intro to-puppet
PDF
Pro Puppet
PDF
Puppet for Sys Admins
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Thinking through puppet code layout
Creating a mature puppet system
Puppet for dummies - ZendCon 2011 Edition
Puppet for SysAdmins
Intro to-puppet
Pro Puppet
Puppet for Sys Admins

What's hot (20)

PDF
Puppet fundamentals
PDF
Chef Conf 2015: Package Management & Chef
PDF
Puppet Development Workflow
PDF
Puppet Camp Paris 2016 Data in Modules
PPTX
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
PDF
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
PDF
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
PDF
Puppet: From 0 to 100 in 30 minutes
PDF
Learning Puppet Chapter 1
PDF
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
PDF
Custom Non-RDS Multi-AZ Mysql Replication
PDF
Puppet Camp LA 2/19/2015
PDF
Puppet getting started by Dirk Götz
PDF
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
PPTX
Best practices for ansible
PDF
Introduction to puppet
PDF
Towards Continuous Deployment with Django
PPTX
Django deployment best practices
PDF
Learn Puppet : Quest Guide for the Learning VM
PDF
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
Puppet fundamentals
Chef Conf 2015: Package Management & Chef
Puppet Development Workflow
Puppet Camp Paris 2016 Data in Modules
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Puppet: From 0 to 100 in 30 minutes
Learning Puppet Chapter 1
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Custom Non-RDS Multi-AZ Mysql Replication
Puppet Camp LA 2/19/2015
Puppet getting started by Dirk Götz
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Best practices for ansible
Introduction to puppet
Towards Continuous Deployment with Django
Django deployment best practices
Learn Puppet : Quest Guide for the Learning VM
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
Ad

Viewers also liked (20)

PPTX
Monitis: All-in-One Systems Monitoring from the Cloud
PPTX
Managing and Scaling Puppet - PuppetConf 2014
PPTX
Using puppet, foreman and git to develop and operate a large scale internet s...
PDF
Mapping, Interlinking and Exposing MusicBrainz as Linked Data
PDF
Continuously-Integrated Puppet in a Dynamic Environment
PDF
JSON and the APInauts
PDF
Better encryption & security with MariaDB 10.1 & MySQL 5.7
PPT
Ruby application based on http
PDF
PDF
vSphere APIs for performance monitoring
PDF
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
DOCX
Advanced Strategic Management: Midterm
PDF
Experiences from Running Masterless Puppet - PuppetConf 2014
PDF
PostgreSQL Materialized Views with Active Record
PDF
The Complete MariaDB Server Tutorial - Percona Live 2015
PDF
Redis — The AK-47 of Post-relational Databases
PDF
Taking Control of Chaos with Docker and Puppet
PDF
Detecting headless browsers
ODP
Monitoring in an Infrastructure as Code Age
PDF
How to make keynote like presentation with markdown
Monitis: All-in-One Systems Monitoring from the Cloud
Managing and Scaling Puppet - PuppetConf 2014
Using puppet, foreman and git to develop and operate a large scale internet s...
Mapping, Interlinking and Exposing MusicBrainz as Linked Data
Continuously-Integrated Puppet in a Dynamic Environment
JSON and the APInauts
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Ruby application based on http
vSphere APIs for performance monitoring
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Advanced Strategic Management: Midterm
Experiences from Running Masterless Puppet - PuppetConf 2014
PostgreSQL Materialized Views with Active Record
The Complete MariaDB Server Tutorial - Percona Live 2015
Redis — The AK-47 of Post-relational Databases
Taking Control of Chaos with Docker and Puppet
Detecting headless browsers
Monitoring in an Infrastructure as Code Age
How to make keynote like presentation with markdown
Ad

Similar to Lessons I Learned While Scaling to 5000 Puppet Agents (20)

PDF
Recommender Systems with Ruby (adding machine learning, statistics, etc)
PDF
Engineering culture
PDF
Everything You Were Taught About Java Is Wrong
PDF
Scaling Puppet Usage to a Global Organization
PDF
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PDF
Neo4j Stored Procedure Training Part 1
PDF
Off the Treadmill: Building a Drupal Platform for Your Organization
PDF
The State of Puppet
PDF
CloudInit Introduction
PDF
Introduction to Express and Grunt
PDF
Introduction into Drupal site building
PDF
Containers for Science and High-Performance Computing
PPTX
Exploring composer in drupal 8 with drupal project - salva molina
PDF
Building scalable applications while scaling your infrastructure by rhommel l...
PDF
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...
PDF
Corwin on Containers
PDF
Bay Area Drupal Camp Efficiency
PDF
Vowpal Platypus: Very Fast Multi-Core Machine Learning in Python.
PPTX
Drupal Development Tips
KEY
Atlaskickin' the Plugin SDK, AtlasCamp US 2012
Recommender Systems with Ruby (adding machine learning, statistics, etc)
Engineering culture
Everything You Were Taught About Java Is Wrong
Scaling Puppet Usage to a Global Organization
PHP Mega Meetup, Sep, 2020, Anti patterns in php
Neo4j Stored Procedure Training Part 1
Off the Treadmill: Building a Drupal Platform for Your Organization
The State of Puppet
CloudInit Introduction
Introduction to Express and Grunt
Introduction into Drupal site building
Containers for Science and High-Performance Computing
Exploring composer in drupal 8 with drupal project - salva molina
Building scalable applications while scaling your infrastructure by rhommel l...
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...
Corwin on Containers
Bay Area Drupal Camp Efficiency
Vowpal Platypus: Very Fast Multi-Core Machine Learning in Python.
Drupal Development Tips
Atlaskickin' the Plugin SDK, AtlasCamp US 2012

More from Puppet (20)

PPTX
Puppet Community Day: Planning the Future Together
PPTX
The Evolution of Puppet: Key Changes and Modernization Tips
PPTX
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
PPTX
Bolt Dynamic Inventory: Making Puppet Easier
PPTX
Customizing Reporting with the Puppet Report Processor
PPTX
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
PPTX
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
PPTX
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
PDF
Puppet camp2021 testing modules and controlrepo
PPTX
Puppetcamp r10kyaml
PDF
2021 04-15 operational verification (with notes)
PPTX
Puppet camp vscode
PDF
Modules of the twenties
PDF
Applying Roles and Profiles method to compliance code
PPTX
KGI compliance as-code approach
PDF
Enforce compliance policy with model-driven automation
PDF
Keynote: Puppet camp compliance
PPTX
Automating it management with Puppet + ServiceNow
PPTX
Puppet: The best way to harden Windows
PPTX
Simplified Patch Management with Puppet - Oct. 2020
Puppet Community Day: Planning the Future Together
The Evolution of Puppet: Key Changes and Modernization Tips
Can You Help Me Upgrade to Puppet 8? Tips, Tools & Best Practices for Your Up...
Bolt Dynamic Inventory: Making Puppet Easier
Customizing Reporting with the Puppet Report Processor
Puppet at ConfigMgmtCamp 2025 Sponsor Deck
The State of Puppet in 2025: A Presentation from Developer Relations Lead Dav...
Let Red be Red and Green be Green: The Automated Workflow Restarter in GitHub...
Puppet camp2021 testing modules and controlrepo
Puppetcamp r10kyaml
2021 04-15 operational verification (with notes)
Puppet camp vscode
Modules of the twenties
Applying Roles and Profiles method to compliance code
KGI compliance as-code approach
Enforce compliance policy with model-driven automation
Keynote: Puppet camp compliance
Automating it management with Puppet + ServiceNow
Puppet: The best way to harden Windows
Simplified Patch Management with Puppet - Oct. 2020

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.

Lessons I Learned While Scaling to 5000 Puppet Agents

  • 1. Learning Lessons Scaling to 5000 Agents Russ Johnson rjohnson@stubhub.com @professoruss Confidential Slide 1
  • 2. #whoami Started out in the mid 90’s Recovering Windows Admin Storage Guy Datacenter Monkey Once upon a time network guy At StubHub since December 2006 Working on puppet adoption in a crazy infrastructure Puppet certified April 9, 2013 2
  • 3. 4 Puppet Masters DEV/QA PROD DR CORP April 9, 2013 3
  • 4. The road to sanity April 9, 2013 4
  • 5. Set up your master properly Apache/Passenger Tune Passenger PassengerMaxPoolSize 32 PassengerMinInstances 4 PassengerMaxRequests 10000 PassengerStatThrottleRate 30 16 cores, 32GB load average: 4.03, 3.71, 3.45 4000+ agents April 9, 2013 5
  • 7. Build your hosts the same way! Old way: systemimager, vmware clones, manual installs Results: INCONSISTENCY! April 9, 2013 7
  • 8. Build your hosts the same way! New way: Cobbler < 5m bare metal to on the network Results: Same results every time! No drift between base April 9, 2013 8
  • 9. Set up your working environment properly Geppetto – eclipse based IDE http://cloudsmith.github.com/geppetto/index.html VIM •  Pathogen – For autoloading vim plugins •  Snipmate – Snippets •  Tabular – Text filtering and alignment •  Syntastic – Syntax checking •  mv-vim-puppet – Make vim puppet friendly •  puppet-lint – Syntax checker (gem) April 9, 2013 9
  • 11. Set up your working environment properly + April 9, 2013 11
  • 12. Version Control is not enough Ever do a 4 way diff across 60 modules to find most of them different? April 9, 2013 12
  • 13. What to do? How do I stop manual edits? How do I deal with 80+ Dev/QA Environments? Versioning? Librarian? Pulp? Branching? Internal Forge? Dynamic Environments? Puppet Module Tool? What does PuppetLabs do? April 9, 2013 13
  • 14. PuppetLabs seems to know what to do Let’s investigate puppet module tool http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html April 9, 2013 14
  • 17. Document the manifest http://rdoc.sourceforge.net/ April 9, 2013 17
  • 19. Free Docs! puppet doc -a -o /var/www/html/puppetdocs --mode rdoc April 9, 2013 19
  • 21. Catching live edits and preventing them Splunk -> puppet module changes -> alerting The NOC will hunt you down! April 9, 2013 21
  • 22. Build and install the module tar –xzf /tmp/work/stubhub-puppetserver/pkg/stubhub- puppetserver-0.0.1.tar.gz –C /etc/puppet/environments/ staging/modules/puppetserver April 9, 2013 22
  • 24. Internal Forge mod_rewrite: Simulate the api – redirect to json metadata files $htmlroot/api/v1/releases.json?module=user/module ruby script: Generate metadata files for each module release and all modules. Similar to createrepo (yum) April 9, 2013 24
  • 25. Internal Forge - Search April 9, 2013 25
  • 26. Internal Forge - install April 9, 2013 26
  • 27. Internal Forge - upgrade April 9, 2013 27
  • 28. Case statements? How bout Hiera? April 9, 2013 28
  • 29. Avoid case statement insanity case $::system_role { ‘browse’, ‘search’: { …do some stuff… } ‘db’: { …other stuff… } ‘otherrole’: { …please make it stop!!!! } } April 9, 2013 29
  • 30. hieradata $hieradata/browse.yaml: --- module::parameter: ‘foo’ $hieradata/search.yaml: --- module::parameter: ‘bar’ $hieradata/defaults.yaml: --- module::parameter: ‘I want this everywhere unless there are overrides’ April 9, 2013 30
  • 31. Case -> variables -> hiera §  9000 lines of case statements §  1000 lines with case/variables §  ~20 lines with defined type Code compression FTW! April 9, 2013 31
  • 32. Dynamic Environments §  puppet.conf: modulepath = /etc/puppet/environments/$environment/modules manifest = /etc/puppet/environments/$environment/manifests/site.pp manifestdir = /etc/puppet/environments/$environment/manifests §  hiera.yaml: :datadir: '/etc/puppet/environments/%{environment}/hieradata' April 9, 2013 32
  • 33. Release process §  Syntax check/validate §  Test on VMs §  Build module package §  Release to internal forge §  puppet module install to staging environment §  Test again! §  puppet module install to production environment April 9, 2013 33
  • 34. The road to yesop §  Staging §  Process §  Repeatability §  Consistency §  Document everything §  Breaking things where it’s cheap §  Test everything! April 9, 2013 34
  • 35. Then VS now §  Environment build time: –  Then: 3+ weeks •  It was wrong •  It didn’t work •  Nobody knew what to expect –  Now: < 1 day •  It’s the same every time •  We know exactly what’s installed •  Internal consumers get what they expect •  Less outages from human error April 9, 2013 35