Refactoring Puppet: Leveling up to Data Driven Infrastructure
summary
Argues that incremental refactors turn brittle Puppet into maintainable, data-driven infrastructure, showing concrete wins: a client with 1,300 files and 28,000 duplicate lines yields many hidden bugs, so extracting selectors into facts and templates reduces duplication and speeds changes. Uses rspec‑puppet for negative and flow tests, vagrant for OS-level checks, simeon to find duplicates, hiera and PuppetDB to move data out of code, Jenkins/Travis for CI, and anchors/defined types to enforce ordering and reuse.
AI-written summary · about
chapters (20)
- 0:00Intro
- 2:33Why this is interesting
- 3:37Why do you refactor
- 6:43Refactoring is not a project
- 8:24How to build a hammer
- 13:47Negative Tests
- 15:30Vagrant
- 18:03Common Things
- 19:54Example
- 21:46Partials
- 22:42NBC
- 25:05Longrunning Classes
- 26:20One Manifest
- 27:23Sharing
- 28:51Mod Utilization
- 30:09In Practice
- 30:53Why Refactor
- 31:39Puppet Typebook
- 35:36Anchor Pattern
- 37:20Continuous Integration
