Page 1
Improving in production Puppet code
Without breaking too much
1
Page 2
About the guy on stageMade by trial and error
2
Page 3
Quick overview● Basics● Code Strength● Deployment Strength● Documentation
3
Page 4
Introduction
Source - Abstruse Goose - http://abstrusegoose.com/432
4
Page 6
Be there
6
This might require a bit of handholding
Page 7
No starting from scratchIt’s a road to beautiful failure
7
Page 8
Create a plan
8
Knowing the path and walking the path
Page 9
Create a planGTD Plan1. Why?2. When?3. What?4. Plan5. Do!6. …7. Profit!
9
Page 10
AgileHow to trap management
10
Page 12
Peer Review
12
Show me yours and I’ll show you mine
Page 13
Spec TestsShiny armor has never seen war
13
Page 14
Example Spec Test
14
Page 15
Roles / ProfilesAdd stuff while staying sane
15
Page 16
Roles / Profiles
16
roles::wordpress_standalone profile::base
profile::mysql
profile::wordpress
profile::nginx
Page 17
Roles / Profiles
17
profile::nginx
hiera
puppetlabs/nginx
enc
Page 18
Small blocksDo one thing, do it well
18
Page 19
Separate Shared ModulesCan’t clean a room when your friends are
still in it
19
Page 20
Deployment Strength
20
Page 21
Auto BuildingThese pieces, they should fit, I think...
21
Page 22
Auto TestingDon’t worry, i’m just doing a few tests.
22
Page 23
Auto DeploymentGo fast, die young!
23
Page 24
Documentation
24
404
Page 25
Do I need documentation?
Just enough
25
Page 26
Any other reasons?
26
Page 27
Where to put documentation?
27
Close to the source
Page 28
Important LinksFor review, not on presentation screen
Building a Functional Puppet Workflow Part 2: Roles and Profiles - http://s.basg.nl/1A6heKZ
Peer review - Gerrit - https://code.google.com/p/gerrit/Spec Testing - http://rspec-puppet.com/tutorial/Spec Helper - https://github.com/puppetlabs/puppetlabs_spec_helper Dashboards - Foreman - http://theforeman.org/
28
Page 29
Presentation is onlinehttp://s.basg.nl/puppetcode
You can find me on Google+http://google.com/+basgrolleman
Questions
29