Here are the slides from Tray Torrance's PuppetConf 2016 presentation called Can You Manage Me Now? Humanizing Configuration Management at Scale. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
3. Problem Space
Millions of LoC
Thousands of Nodes
Hundreds of Contributors
Several Coding Styles
Disparate Agent Versions
3
4. Problem Space
• Actively Hostile Codebase
• What even are types?
if enc_query(‘something’, ‘false’) == ‘true’ { … }
if enc_query(‘something’, ‘false’) != ‘false’ { … }
if enc_query(‘something’, undef ) == undef { … } # impossible
ThreadCount <%= @workers.to_i %>
“I ran Puppet, and it painted me a Picasso [with errors]”
“Sharp and Pointy by Design”
Hard to reason about by accident
4
5. Factoring the Problem
Code Hygiene (Dupe Code, Linting)
Coding Best Practices
Customer Education & Assistance
Software Lifecycle Management
5
6. Plan of Attack: Code Hygiene
Identify Duplicate Code
Refactor Common Code to Modules
Scope Linter Violations
Increase Linter Compliance
Enable Linting in SCM Hooks
6
7. Plan of Attack: Coding Best Practices
Adopt Role/Profile
Make Amends with the AutoLoader
Eradicate Multi-Resource Stanzas
$ grep -ri ‘foo’ puppet/modules
puppet/modules/role/manifests/bar.pp:22 include ::foo
puppet/modules/role/manifests/baz.pp:36 include ::foo
puppet/modules/role/manifests/qux.pp:44 ’foo’:
7
8. Plan of Attack: Customer Education
Be the Code You Want to See in Your Repo
Mingle With the People
Teach Them to Fish
8
9. Plan of Attack: Upgrades
Unify Your Masters
Agents Will Follow
Future-proof the Process
9
10. On SCM Migrations
Evolution: Good
• Better Tooling
• Better Branching
Revolution: Bad
• “I’ve only ever used $otherSCM, so we should, too!”
• “If it’s good enough for the Linux kernel, it’s good
enough for me!”
• “Isn’t $currentSCM really really old?”
10
11. Are We There Yet?
The boss wants to know…
11
Image provided by Wikipedia
12. You Are NEVER There
Those who don’t learn from the past,
Are doomed to refactor it.
Over and over and over.
12
Image provided by @imwithstoopid13 — deviantart