Date post: | 15-Apr-2017 |
Category: |
Technology |
Upload: | puppet |
View: | 39 times |
Download: | 1 times |
Can You Manage Me Now?
Humanizing Configuration Management at Scale
Tray Torrance SRE, Twitter
Introduction
Who What
Where When Why
2
Problem Space
Millions of LoC Thousands of Nodes
Hundreds of Contributors Several Coding Styles
Disparate Agent Versions
3
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
Factoring the Problem
Code Hygiene (Dupe Code, Linting) Coding Best Practices
Customer Education & Assistance Software Lifecycle Management
5
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
Plan of Attack: Coding Best PracticesAdopt 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
Plan of Attack: Customer Education
Be the Code You Want to See in Your Repo Mingle With the People
Teach Them to Fish
8
Plan of Attack: Upgrades
Unify Your Masters Agents Will Follow
Future-proof the Process
9
On SCM MigrationsEvolution: 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
Are We There Yet?
The boss wants to know…
11Image provided by Wikipedia
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
Acknowledgements
Ramin K Jesse M Management PuppetConf
13