Senior Systems Engineer, ForgeRock IT - Bristol, UK Puppet user since 2011, community member since 2012 AWS: 2013, Google Cloud: 2017 Background: Systems Engineering, Public Cloud consultancy and systems design Dad, heavy metal, Liverpool FC and Doctor Who fan AWS Certified SysOps Associate & DevOps Professional Puppet Certified Professional (2016 & 2017) Presenter at Puppetize PDX 2019 2
ForgeRock. All rights reserved Master of Puppets - Somewhere Back in Time 4 Over time, Puppet Masters become monoliths Servers are “long-lived cattle” Lift-and-shift cloud migrations become problematic Hybrid infrastructure? Use on-premise masters for cloud? Solutions exist (auto-signing, compile-masters) Most of the time, results in a compromise! Scalability and manageability most often sacrificed
ForgeRock. All rights reserved Masterless/Agentless Puppet - Summary 8 Puppet runs locally via puppet apply Puppet codebase distributed to every node Exact mechanism can vary (RPM/DEB, tar-ball, Git …) Decentralised - no/few outside dependencies Packages can be downloaded from object storage (S3/GCS) Scalable - no single point of failure for new nodes Bootstrap/user-data scripts take care of all provisioning Testable - Allows easy development via Vagrant Everything is local! First step to immutable infrastructure As Puppet runs locally, images can be taken post-run
are encrypted at-rest in Git with EYAML and SaaS KMS AWS - https://github.com/adenot/hiera-eyaml-kms GCP - https://github.com/craigwatson/hiera-eyaml-gkms We wrote a helper script to interface with KMS 9 --- profiles::confluence::db_password: ENC[GKMS,CiQAPPX7KHnvqMjmxXUsaIJZil55rm1oBbs=] /etc/puppetlabs/code/data/env/prod/confluence.yaml $ ./eyaml.sh -e prod -a encrypt -v correcthorsebatterystaple ENC[GKMS,CiQAPPX7KHnvqMjmxXUsaIJZil55rm1oBbs=]
“node database” for Puppet Puppet sends facts, catalog and report for each run Data exposed via Puppetboard UI - thanks to Vox Pupuli! App - https://github.com/voxpupuli/puppetboard Puppet module - https://github.com/voxpupuli/puppet-puppetboard Deployed standalone as a standard “three-tiered” web-application Puppet module - https://forge.puppet.com/puppetlabs/puppetdb Two PuppetDB servers, behind and SSL-terminating load balancer We use Google CloudSQL to provide a SaaS PostgreSQL database 12
tasks over SSH, can use PuppetDB for inventory Handles rich scripts/plans in Puppet SDL, and also allows arbitrary CLI commands We use bolt command run to: Update Puppet code via yum (we package our codebase as an RPM and host on GCS) Run Puppet via puppet apply We deploy a bolt user on each host, and use Jenkins as our Bolt “control node” 17
Puppet allows us to scale our Puppet deployment with little overhead Secrets are encrypted at-rest with per-environment KMS keys, decrypted via EYAML Our nodes send facts, catalogs and reports to PuppetDB PuppetDB is deployed as a standard three-tier web-application with LB and SaaS DB As part of our deployment pipeline, Bolt queries PuppetDB for inventory Bolt then connects to each node via SSH and runs the required commands 22