SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Puppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in ModulesPuppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in ModulesMartin Alfke
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Puppet
 
Puppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabPuppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabAlessandro Franceschi
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1Vishal Biyani
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Puppet
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE WorkshopPuppet
 
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, PuppetPuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, PuppetPuppet
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny PuppetAlessandro Franceschi
 
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based ApplicationsWriting Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based ApplicationsTim Cinel
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdminsPuppet
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
PuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and ProvidesPuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and ProvidesMartin Alfke
 
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)Tim Bunce
 
Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Aaron Bernstein
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 

Tendances (20)

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

Similaire à Puppetizing Your Organization

My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
meetup version of Paving the road to production
  meetup version of Paving the road to production    meetup version of Paving the road to production
meetup version of Paving the road to production Matthew Reynolds
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...Yury Bushmelev
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonAll Things Open
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet SystemPuppet
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet systemrkhatibi
 
Puppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgePuppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgeAaron Bernstein
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & HowAlfonso Cabrera
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrapeSharad Aggarwal
 
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Nicolas Brousse
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 

Similaire à Puppetizing Your Organization (20)

My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
meetup version of Paving the road to production
  meetup version of Paving the road to production    meetup version of Paving the road to production
meetup version of Paving the road to production
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by Python
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Puppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgePuppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the Forge
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrape
 
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Pentester++
Pentester++Pentester++
Pentester++
 

Dernier

Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServiceRenan Moreira de Oliveira
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?SANGHEE SHIN
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdfJamie (Taka) Wang
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 

Dernier (20)

Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.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