SlideShare a Scribd company logo
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Using the Puppet Debugger
for lightweight exploration
Kill the bugs, not your patience.
• Twitter: @cosman2001
• Github: logicminds, nwops
• Blog: logicminds.github.io
• Slack: nwops
• Email: corey@nwops.io
• Telegram: opselite
• Devops Toolsmith and Consultant
• Puppet Service Delivery Partner
• Ruby, Node, Go Developer
• Crypto Miner and Developer
• Privacy and Security Advocator
• Retrospec-puppet
• Vim and VSCode User
• Puppet User since 2009 (10 years
Corey Osman
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Efficient Development
“Speed (or velocity, if you prefer) is how quickly you
can accomplish a task. Efficiency is a comparison -
- a ratio -- of the useful work performed by a
machine or in a process to the total work needed to
complete a process. Speed and efficiency are
related, but they're not synonymous.”
Input / Output
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Progressive Development
• Gain perspective.
• Evaluate your methods and procedures.
• Learn your editor and surrounding tools.
• Optimize yourself and the environment around you.
• Share with others often.
• Be aware of tools that can help you.
• Change is hard. Deal with it!
There is always a better way.
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
What is a Debugger?
• Tool used to test and debug other programs from
source code
• Expression evaluator
• Allows you to step through code
• Record and playback
• Interactive
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Why We Need a Debugger
• Understand how values are interpolated
• Understand what functions do
• Understand how scopes work
• Understand how iterators work
• Understand how hashes and variables work
• Share code easily with the play function
• Step through your code with breakpoints
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Antiquated workflows make us
inefficient.
Puppet Apply takes too much time.
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Play Interactively!
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Testing Thoughts
• Instant feedback when compared to unit tests
• Test datatypes in real time
• Test regular expressions in real time
• Test functions in real time
• Test lookup constructs in real time
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Short Feedback Loop
• Build a scale model
• Bring the environment to you
• facts
• hieradata
• classification
• puppetdb
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Mocking Operating Systems
FacterDB allows the Debugger to mock a variety of operating
systems.
• Mock AIX, Windows, linux distros, OSX, BSD…
FacterDB (https://github.com/camptocamp/facterdb)
puppet debugger --facterdb-filter ‘kernel=AIX and
kernelmajversion=7100’
puppet debugger --facterdb-filter ‘operatingsystem=windows'
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Hiera Debugging
• View lookup logs (set loglevel debug)
• Find out what hiera / lookup is doing
• Determine why Puppet is not loading the value you
expect.
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Node Classification
• Node classification retrieval
• See top scope variables
• even from ENC (ie. Foreman)
• Site.pp evaluation
• Real node facts
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Break Into Your Puppet Code
• Set a breakpoint in your Puppet code (Linux support only)
• Inspect variables in any scope
• Inject the Debugger from any of the following:
• puppet apply
• spec test
• puppet debugger command
• pdk console
• pdk test
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Parameter Resolution
• Instantly find out the value of the parameters or
variables.
ls or ls <filter>
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Integration with PDK
• PDK 1.14+ ships with the console command that invokes
the Debugger
• Works only within modules and control repos at this time
• Control repo must have a Gemfile
• Can use PDK test unit and debug::break() function
• Interchangeable rubies and puppets
• https://github.com/puppetlabs/pdk#pdk-console-command
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
How To Get
• Package: gem install puppet-debugger
• PDK Version (1.14+ )
• Demo: https://demo.puppet-debugger.com
• Project Page: https://puppet-debugger.com
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
PuppetizePDX 2019
NWOPS, LLC
https://www.nwops.io
Questions?
• https://logicminds.github.io/
• https://puppet-debugger.com

More Related Content

PPTX
vBrownBag DevOps Series: Puppetinabox
PPTX
Puppetcamp r10kyaml
PPT
Infrastructure Automation at Scale
PDF
Ceylon From Here to Infinity: The Big Picture and What's Coming
PDF
Cloud Native CI/CD with GitOps
PDF
Distributed systems in practice, in theory (JAX London)
PDF
Configuration As Code - Adoption of the Job DSL Plugin at Netflix
PDF
OpenShift, Docker, Kubernetes: The next generation of PaaS
vBrownBag DevOps Series: Puppetinabox
Puppetcamp r10kyaml
Infrastructure Automation at Scale
Ceylon From Here to Infinity: The Big Picture and What's Coming
Cloud Native CI/CD with GitOps
Distributed systems in practice, in theory (JAX London)
Configuration As Code - Adoption of the Job DSL Plugin at Netflix
OpenShift, Docker, Kubernetes: The next generation of PaaS

What's hot (20)

PPTX
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
PDF
GitHub Actions with Node.js
PDF
Zero To Cloud (OSCon 2014)
PDF
Vagrant for Effective DevOps Culture
PDF
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
PDF
JAX Con 2019: Containers. Microservices. Cloud. Open Source. Fantasy or Reali...
ODP
Version Controlling
PDF
Fine Tuning Your GitHub Flow
PDF
Git 101: Git and GitHub for Beginners
PDF
Teaching a Designer to Use GitHub
PPTX
GitHub Actions - Melbourne UG
PPSX
GitOps and Kubernetes: a radical idea
PDF
Implementing your own Google App Engine
PPTX
An introduction to Atlassian Bitbucket Pipelines
PDF
Monitor Cloud Foundry and Bosh with Prometheus
PPTX
Airflow at WePay
PDF
The Job DSL Plugin: Introduction & What’s New
PDF
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
PPTX
k8sjp#9 KubeCon - Service Mesh, ML/DL on k8s
PPTX
Smarter deployments with octopus deploy
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
GitHub Actions with Node.js
Zero To Cloud (OSCon 2014)
Vagrant for Effective DevOps Culture
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
JAX Con 2019: Containers. Microservices. Cloud. Open Source. Fantasy or Reali...
Version Controlling
Fine Tuning Your GitHub Flow
Git 101: Git and GitHub for Beginners
Teaching a Designer to Use GitHub
GitHub Actions - Melbourne UG
GitOps and Kubernetes: a radical idea
Implementing your own Google App Engine
An introduction to Atlassian Bitbucket Pipelines
Monitor Cloud Foundry and Bosh with Prometheus
Airflow at WePay
The Job DSL Plugin: Introduction & What’s New
PuppetConf 2016: A Tale of Two Hierarchies: Group Policy & Puppet – Matt Ston...
k8sjp#9 KubeCon - Service Mesh, ML/DL on k8s
Smarter deployments with octopus deploy
Ad

Similar to Using the puppet debugger for lightweight exploration (20)

PDF
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
PDF
Leveraging docker for hadoop build automation and big data stack provisioning
PDF
Puppet overview
PPTX
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
PPTX
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
PPTX
Making sense of Apache Bigtop's role in ODPi and how it matters to Apache Apex
PDF
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
PPTX
How bigtop leveraged docker for build automation and one click hadoop provis...
PPTX
Continuous integration of_puppet_code
PDF
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
PDF
Puppet Keynote by Ralph Luchs
PDF
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
PPTX
Continuous integration by Rémy Virin
KEY
Practical introduction to dev ops with chef
PPTX
Big datatraining.in devops-part1
PPTX
Big datatraining.in devops-part1
PPTX
Big datatraining.in devops-part1
PPTX
Big datatraining.in devops-part1
PPTX
Big datatraining.in devops-part1
PPTX
Big datatraining.in devops-part1
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
Puppet overview
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
Making sense of Apache Bigtop's role in ODPi and how it matters to Apache Apex
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
How bigtop leveraged docker for build automation and one click hadoop provis...
Continuous integration of_puppet_code
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Puppet Keynote by Ralph Luchs
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous integration by Rémy Virin
Practical introduction to dev ops with chef
Big datatraining.in devops-part1
Big datatraining.in devops-part1
Big datatraining.in devops-part1
Big datatraining.in devops-part1
Big datatraining.in devops-part1
Big datatraining.in devops-part1
Ad

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Nekopoi APK 2025 free lastest update
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
ai tools demonstartion for schools and inter college
PPTX
L1 - Introduction to python Backend.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
Digital Strategies for Manufacturing Companies
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Navsoft: AI-Powered Business Solutions & Custom Software Development
Nekopoi APK 2025 free lastest update
How to Migrate SBCGlobal Email to Yahoo Easily
ai tools demonstartion for schools and inter college
L1 - Introduction to python Backend.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
CHAPTER 2 - PM Management and IT Context
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo POS Development Services by CandidRoot Solutions

Using the puppet debugger for lightweight exploration

Editor's Notes

  • #4: How much input must you provide to equal the output of others? What makes you different? How do you become more efficient? By learning how things work and not rely on google.
  • #5: Spread the word by sharing what you learn. You must measure the effort vs reward, not everything is worth doing Continuous Improvement Who here considers themselves a sysadmin? False! Everyone is a developer in here.
  • #6: One way to become more efficient is to speed up the your feedback loop and method of learning. Remove the search engine delay if possible. A debugger can help.
  • #7: Do I need to specify quotes in hash key name? How does the dig function work? Don’t just bang on the keyboard. Bang on the keyboard with purpose!
  • #8: Is there a better way? I had perspective from the programming world.
  • #9: Put down your abacus and play inactively.
  • #10: We can’t test thoughts with unit tests (us humans are too lazy) Don’t think, know. Validate your thoughts in the debugger.
  • #11: The goal is to bring the environment as close as possible, build scale models at home before you build an interstate.
  • #14: Overall goal is to completely replicate the catalog compilation process without the server or a real environment. This is an advanced feature and requires access to the puppet infrastructure