SlideShare a Scribd company logo
De-centralise and
     Conquer

Masterless Puppet in a Dynamic
         Environment

  Sam Bashton, Bashton Ltd
Who am I?
● Linux guy since Slackware, floppy disks and
  root + boot
● Using Puppet since 2007
● Run a company Manchester, North West
  England
Our Environments
● We provide outsourced ops for other
  companies
● High traffic environments
● Most are now on Amazon Web Services


● #1 reason for moving to AWS? The ability to
  scale on demand
Server instances, single day
How we use Puppet
● No Puppetmaster
● Puppet manifests and modules distributed to
  all machines
What's wrong with standard Puppet?
● Pets vs Cattle


● Standard Puppet configuration assumes that
  servers are pets, not cattle
What's wrong with standard Puppet?
● Standard Puppetmaster/Puppet Client
  configuration makes assumptions about
  environments
  ○ Machine creation is a manual operation
     ■ Sign certs
  ○ No in-built mechanism to automatically clean up old
    machines
What's wrong with standard Puppet?
● Puppetmaster is a single point of failure
● When servers are pets, this isn't too much of
  a problem
   ○ Existing servers continue to work, but not any
      updates
What's wrong with standard Puppet?
● When servers are auto-scaling cattle, new
  instances can appear at any time
● New instances require config to become
  operational
● Configuration requires Puppet
What's wrong with standard Puppet?
● Our environments span multiple data centres
  ('availability zones')
● Imagine a data centre fails
● New instances get auto-provisioned to
  replace missing capacity
● But these instances need the Puppetmaster
● ..which was in the failed AZ
What's wrong with standard Puppet?
● Resource contention
● Even when Puppetmaster isn't in the failed
  zone, multiple concurrent connections slow
  things down
What's wrong with standard Puppet?
● None of these problems are insurmountable
● We could have configured a Puppetmaster a
  cluster of Puppetmasters for our needs
  ○ With autosign
  ○ and some sort of certificate distribution mechanism
  ○ uuid certificate names
  ○ And a mechanism for cleaning up old machines
Meanwhile, on the other side of the
room...
● Another team was evaluating Pulp
● Provides yum repository management
● To be used for managing security updates
  and deploying application code




  http://pulpproject.org/
Pulp
● Allows cloning of repos, copying packages
  between repos
● Allows us to push packages to clients
   ○ Uses qpid message queue
● Has 'content distribution servers' for easy
  replication + clustering
How we deploy code
● Everything managed via the Jenkins
  continuous integration server
● Jenkins uses Pulp to install code on remote
  machines
How we deploy code
● Jenkins fetches code from source control
  (git)
● An RPM is built
● Tests are run
● The RPM is added to the relevant Pulp
  repository
● RPM installed on the target machine(s)
How we deploy code
● Jenkins also manages deployment lifecycle
● 'Promoted Builds' plugin used to install
  previously built RPMs on staging
● Promoted Builds plugin then used to install
  the same RPMs on live once testing is
  complete
Deploying configuration as code
● Idea: Why not just build an RPM of our
  Puppet manifests + modules?
● Have puppet apply as part of the %
  postinst
Deploying configuration as code
● Allowed us to reuse our existing code
  deployment infrastructure
● Manage configuration deployment from
  Jenkins
How we deploy configuration
● Puppet manifests and modules are checked
  into git
● Jenkins builds configuration into an RPM
● Jenkins promoted builds plugin applies the
  updates to environments via Pulp
Our system architecture
● Quite AWS specific
● Concepts could be applied to other clouds
  ○ Once they catch up in terms of toolsets..
Separation of Roles
● CloudFormation - defines infrastructure


● Puppet manages configuration




● Pulp manages package versions
  ○ Pulp in turn managed via Jenkins for custom repos
Instance Provisioning
● Minimal images used
● cloud-init the only addition beyond standard
  CentOS install
● cloud-init allows us to specify script to be run
  at boot
Puppet bootstrap
● cloud-init script adds local Puppet yum repo
  and installs the Puppet configuration RPM
● Installing the RPM installs Puppet and
  applies the configuration
Machine metadata
● cloud-init also sets some variables in
  /etc/environment
● $HOST_TYPE - the type of machine this is, eg

  web, cache
Machine metadata
● Also set facts to be used by facter, eg RDS
  database hostname
  ○ Values from CloudFormation
● $FACTER_DBHOST    set via cloud-init too, eg /root/.my.cnf
Defining machine roles
● For each machine type there is a manifest
  /etc/puppet/manifests/$HOST_TYPE.pp
● This file looks something like this:
  node default {
      import global
      ...
  }
Building the RPM
● Puppet manifests and modules are all
  packed into an RPM
● Owner set to root, mode 600
● %postinst creates an at job set for now + 1
  minute to run puppet apply
Deploying configuration
Free wins!
Free wins
● Greater control over the timing of Puppet
  runs
● Improved visibility - for ops and devs
● Configuration changes now have to be
  deployed to testing/staging first
More free wins
● Puppet configs now have a version
● Easy to find config version on the machine
  itself
● Config changelogs accessible on every
  machine
  ○ (Git changelog added to RPM)
Cheap wins
Cheap wins
● Jenkins performs syntax checks with
  puppet parser validate
● Jenkins also runs puppet-lint on

  manifests
Cheap wins
● Config change required for new code?
  ○ Make the Puppet RPM version a dependency
The downsides
● Puppet manifests and modules on all
  machines
  ○ Potentially a security issue?
● No reporting*
Alternative implementations
● Don't want to use Pulp?
● Could do basically the same thing with yum
  s3 plugin
  https://github.com/jbraeuer/yum-s3-plugin
Questions? Comments?

          Sam Bashton
        sam@bashton.com
        Twitter: @bashtoni

More Related Content

What's hot

Lifecycle Management with Foreman
Lifecycle Management with ForemanLifecycle Management with Foreman
Lifecycle Management with Foreman
Julien Pivotto
 
Monitoring of OpenNebula installations
Monitoring of OpenNebula installationsMonitoring of OpenNebula installations
Monitoring of OpenNebula installations
NETWAYS
 
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....? Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet
 
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian HeiglOpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebula Project
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
Yankee Nemoy
 
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebula Project
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
NETWAYS
 
Auto infra with_foreman_katello
Auto infra with_foreman_katelloAuto infra with_foreman_katello
Auto infra with_foreman_katello
Sachin Ghai
 
Full Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The ForemanFull Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The Foreman
Weston Bassler
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
Kris Buytaert
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
OpenNebula Project
 
Making your first contribution to Foreman
Making your first contribution to ForemanMaking your first contribution to Foreman
Making your first contribution to Foreman
Dominic Cleal
 
How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environment
Michelantonio Trizio
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
NETWAYS
 
Puppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual MachinePuppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual Machine
Arpit Aggarwal
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
Maxence Dunnewind
 
Order from chaos: automating monitoring configuration
Order from chaos: automating monitoring configurationOrder from chaos: automating monitoring configuration
Order from chaos: automating monitoring configuration
Sensu Inc.
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet
 
Deploying Rails App To Ubuntu Server
Deploying Rails App To Ubuntu ServerDeploying Rails App To Ubuntu Server
Deploying Rails App To Ubuntu ServerJosh Dvir
 

What's hot (20)

Lifecycle Management with Foreman
Lifecycle Management with ForemanLifecycle Management with Foreman
Lifecycle Management with Foreman
 
Monitoring of OpenNebula installations
Monitoring of OpenNebula installationsMonitoring of OpenNebula installations
Monitoring of OpenNebula installations
 
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....? Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
Puppet Camp Sydney 2015: Puppet and AWS is easy right.....?
 
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian HeiglOpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
 
Auto infra with_foreman_katello
Auto infra with_foreman_katelloAuto infra with_foreman_katello
Auto infra with_foreman_katello
 
Full Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The ForemanFull Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The Foreman
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
 
Making your first contribution to Foreman
Making your first contribution to ForemanMaking your first contribution to Foreman
Making your first contribution to Foreman
 
How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environment
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
 
Nuget updater
Nuget updaterNuget updater
Nuget updater
 
Puppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual MachinePuppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual Machine
 
How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013 How can OpenNebula fit your needs - OpenNebulaConf 2013
How can OpenNebula fit your needs - OpenNebulaConf 2013
 
Order from chaos: automating monitoring configuration
Order from chaos: automating monitoring configurationOrder from chaos: automating monitoring configuration
Order from chaos: automating monitoring configuration
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
 
Deploying Rails App To Ubuntu Server
Deploying Rails App To Ubuntu ServerDeploying Rails App To Ubuntu Server
Deploying Rails App To Ubuntu Server
 

Similar to De-centralise and conquer: Masterless Puppet in a dynamic environment

ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
Yury Tsarev
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
Kris Buytaert
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
Stanislav Osipov
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
Michael Lessard
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteer
Knoldus Inc.
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3 Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet LabsTechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
Robb Boyd
 
Linux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabLinux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and Gitlab
Ben Tullis
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Stanislav Pogrebnyak
 
High Available Drupal
High Available DrupalHigh Available Drupal
High Available Drupal
Bram Vogelaar
 
Chef vs puppet
Chef vs puppetChef vs puppet
Chef vs puppet
Sandeep Singh
 
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Ohad Basan
 
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
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and Puppet
Patrick Lee
 
Project Atomic-Nulecule
Project Atomic-NuleculeProject Atomic-Nulecule
Project Atomic-Nulecule
Lalatendu Mohanty
 
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced OscarPuppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet
 
Developing and Testing with Enhanced Oscar
Developing and Testing with Enhanced OscarDeveloping and Testing with Enhanced Oscar
Developing and Testing with Enhanced Oscar
Jeff Scelza
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
SaltStack
 
IT Automation with Puppet Enterprise
IT Automation with Puppet EnterpriseIT Automation with Puppet Enterprise
IT Automation with Puppet Enterprise
Anuchit Chalothorn
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
Puppet
 

Similar to De-centralise and conquer: Masterless Puppet in a dynamic environment (20)

ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteer
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3 Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
 
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet LabsTechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
 
Linux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabLinux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and Gitlab
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
High Available Drupal
High Available DrupalHigh Available Drupal
High Available Drupal
 
Chef vs puppet
Chef vs puppetChef vs puppet
Chef vs puppet
 
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.Jenkinsconf Presentation - Advance jenkins management with multiple projects.
Jenkinsconf Presentation - Advance jenkins management with multiple projects.
 
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...
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and Puppet
 
Project Atomic-Nulecule
Project Atomic-NuleculeProject Atomic-Nulecule
Project Atomic-Nulecule
 
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced OscarPuppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
 
Developing and Testing with Enhanced Oscar
Developing and Testing with Enhanced OscarDeveloping and Testing with Enhanced Oscar
Developing and Testing with Enhanced Oscar
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
IT Automation with Puppet Enterprise
IT Automation with Puppet EnterpriseIT Automation with Puppet Enterprise
IT Automation with Puppet Enterprise
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

De-centralise and conquer: Masterless Puppet in a dynamic environment

  • 1. De-centralise and Conquer Masterless Puppet in a Dynamic Environment Sam Bashton, Bashton Ltd
  • 2. Who am I? ● Linux guy since Slackware, floppy disks and root + boot ● Using Puppet since 2007 ● Run a company Manchester, North West England
  • 3. Our Environments ● We provide outsourced ops for other companies ● High traffic environments ● Most are now on Amazon Web Services ● #1 reason for moving to AWS? The ability to scale on demand
  • 5. How we use Puppet ● No Puppetmaster ● Puppet manifests and modules distributed to all machines
  • 6. What's wrong with standard Puppet? ● Pets vs Cattle ● Standard Puppet configuration assumes that servers are pets, not cattle
  • 7. What's wrong with standard Puppet? ● Standard Puppetmaster/Puppet Client configuration makes assumptions about environments ○ Machine creation is a manual operation ■ Sign certs ○ No in-built mechanism to automatically clean up old machines
  • 8. What's wrong with standard Puppet? ● Puppetmaster is a single point of failure ● When servers are pets, this isn't too much of a problem ○ Existing servers continue to work, but not any updates
  • 9. What's wrong with standard Puppet? ● When servers are auto-scaling cattle, new instances can appear at any time ● New instances require config to become operational ● Configuration requires Puppet
  • 10. What's wrong with standard Puppet? ● Our environments span multiple data centres ('availability zones') ● Imagine a data centre fails ● New instances get auto-provisioned to replace missing capacity ● But these instances need the Puppetmaster ● ..which was in the failed AZ
  • 11. What's wrong with standard Puppet? ● Resource contention ● Even when Puppetmaster isn't in the failed zone, multiple concurrent connections slow things down
  • 12. What's wrong with standard Puppet? ● None of these problems are insurmountable ● We could have configured a Puppetmaster a cluster of Puppetmasters for our needs ○ With autosign ○ and some sort of certificate distribution mechanism ○ uuid certificate names ○ And a mechanism for cleaning up old machines
  • 13. Meanwhile, on the other side of the room... ● Another team was evaluating Pulp ● Provides yum repository management ● To be used for managing security updates and deploying application code http://pulpproject.org/
  • 14. Pulp ● Allows cloning of repos, copying packages between repos ● Allows us to push packages to clients ○ Uses qpid message queue ● Has 'content distribution servers' for easy replication + clustering
  • 15. How we deploy code ● Everything managed via the Jenkins continuous integration server ● Jenkins uses Pulp to install code on remote machines
  • 16. How we deploy code ● Jenkins fetches code from source control (git) ● An RPM is built ● Tests are run ● The RPM is added to the relevant Pulp repository ● RPM installed on the target machine(s)
  • 17. How we deploy code ● Jenkins also manages deployment lifecycle ● 'Promoted Builds' plugin used to install previously built RPMs on staging ● Promoted Builds plugin then used to install the same RPMs on live once testing is complete
  • 18. Deploying configuration as code ● Idea: Why not just build an RPM of our Puppet manifests + modules? ● Have puppet apply as part of the % postinst
  • 19. Deploying configuration as code ● Allowed us to reuse our existing code deployment infrastructure ● Manage configuration deployment from Jenkins
  • 20. How we deploy configuration ● Puppet manifests and modules are checked into git ● Jenkins builds configuration into an RPM ● Jenkins promoted builds plugin applies the updates to environments via Pulp
  • 21. Our system architecture ● Quite AWS specific ● Concepts could be applied to other clouds ○ Once they catch up in terms of toolsets..
  • 22. Separation of Roles ● CloudFormation - defines infrastructure ● Puppet manages configuration ● Pulp manages package versions ○ Pulp in turn managed via Jenkins for custom repos
  • 23. Instance Provisioning ● Minimal images used ● cloud-init the only addition beyond standard CentOS install ● cloud-init allows us to specify script to be run at boot
  • 24. Puppet bootstrap ● cloud-init script adds local Puppet yum repo and installs the Puppet configuration RPM ● Installing the RPM installs Puppet and applies the configuration
  • 25. Machine metadata ● cloud-init also sets some variables in /etc/environment ● $HOST_TYPE - the type of machine this is, eg web, cache
  • 26. Machine metadata ● Also set facts to be used by facter, eg RDS database hostname ○ Values from CloudFormation ● $FACTER_DBHOST set via cloud-init too, eg /root/.my.cnf
  • 27. Defining machine roles ● For each machine type there is a manifest /etc/puppet/manifests/$HOST_TYPE.pp ● This file looks something like this: node default { import global ... }
  • 28. Building the RPM ● Puppet manifests and modules are all packed into an RPM ● Owner set to root, mode 600 ● %postinst creates an at job set for now + 1 minute to run puppet apply
  • 31. Free wins ● Greater control over the timing of Puppet runs ● Improved visibility - for ops and devs ● Configuration changes now have to be deployed to testing/staging first
  • 32. More free wins ● Puppet configs now have a version ● Easy to find config version on the machine itself ● Config changelogs accessible on every machine ○ (Git changelog added to RPM)
  • 34. Cheap wins ● Jenkins performs syntax checks with puppet parser validate ● Jenkins also runs puppet-lint on manifests
  • 35. Cheap wins ● Config change required for new code? ○ Make the Puppet RPM version a dependency
  • 36. The downsides ● Puppet manifests and modules on all machines ○ Potentially a security issue? ● No reporting*
  • 37. Alternative implementations ● Don't want to use Pulp? ● Could do basically the same thing with yum s3 plugin https://github.com/jbraeuer/yum-s3-plugin
  • 38. Questions? Comments? Sam Bashton sam@bashton.com Twitter: @bashtoni