seven habits of highly effective puppet users
TRANSCRIPT
![Page 1: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/1.jpg)
Seven Habits of Highly Effective Puppet Users
David Danzilio @djdanzilio
1
![Page 2: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/2.jpg)
$(whoami)
2
![Page 3: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/3.jpg)
What’s talk this about?
![Page 4: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/4.jpg)
A collection of observations of high performing Puppet users
![Page 5: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/5.jpg)
Habits?
![Page 6: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/6.jpg)
![Page 7: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/7.jpg)
![Page 8: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/8.jpg)
What’s a habit?
![Page 9: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/9.jpg)
“[A habit is] an acquired behavior pattern regularly followed until it has become almost involuntary”
![Page 10: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/10.jpg)
Habits are hard
![Page 11: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/11.jpg)
![Page 12: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/12.jpg)
You don’t think about habits
![Page 13: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/13.jpg)
Seven Habits• Think like a software developer
• Treat Puppet like code
• Stop, drop, and design
• Test all the things
• Continuous integration and deployment
• Make nice with Ruby
• Get involved
![Page 14: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/14.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #1 Think like a software developer
14Habit 1: Think like a software developer
![Page 15: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/15.jpg)
Seven Habits of Highly Effective Puppet Users
You’re not a system administrator anymore
15Habit 1: Think like a software developer
![Page 16: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/16.jpg)
Seven Habits of Highly Effective Puppet Users
You’re a software developer
16Habit 1: Think like a software developer
![Page 17: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/17.jpg)
![Page 18: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/18.jpg)
Seven Habits of Highly Effective Puppet Users
System Administration ≠
Software Development
18Habit 1: Think like a software developer
![Page 19: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/19.jpg)
Seven Habits of Highly Effective Puppet Users
Why did we think this would be easy?!
19Habit 1: Think like a software developer
![Page 20: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/20.jpg)
Seven Habits of Highly Effective Puppet Users
Puppet is easy because it’s a DSL
20Habit 1: Think like a software developer
![Page 21: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/21.jpg)
FALSEFALSE
![Page 22: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/22.jpg)
Seven Habits of Highly Effective Puppet Users
We just made it easy to write bad code
22Habit 1: Think like a software developer
![Page 23: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/23.jpg)
Seven Habits of Highly Effective Puppet Users
You can’t expect people to be good at something they’ve never done
23Habit 1: Think like a software developer
![Page 24: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/24.jpg)
I’m a doctor, not an engineer.I’m a doctor, not an engineer.24
![Page 25: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/25.jpg)
Seven Habits of Highly Effective Puppet Users
Software engineering is a mature discipline
25Habit 1: Think like a software developer
![Page 26: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/26.jpg)
Seven Habits of Highly Effective Puppet Users
This is particularly important in Puppet 4
26Habit 1: Think like a software developer
![Page 27: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/27.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #2 Treat Puppet like code
27Habit 2: Treat Puppet like code
![Page 28: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/28.jpg)
Seven Habits of Highly Effective Puppet Users
Stop thinking of Puppet as just configuration data
28Habit 2: Treat Puppet like code
![Page 29: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/29.jpg)
Seven Habits of Highly Effective Puppet Users
Infrastructure as CODE
29Habit 2: Treat Puppet like code
![Page 30: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/30.jpg)
Seven Habits of Highly Effective Puppet Users
Infrastructure as
CODE30Habit 2: Treat Puppet like code
![Page 31: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/31.jpg)
![Page 32: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/32.jpg)
Seven Habits of Highly Effective Puppet Users
Version Control
32Habit 2: Treat Puppet like code
![Page 33: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/33.jpg)
![Page 34: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/34.jpg)
Seven Habits of Highly Effective Puppet Users
Documentation
34Habit 2: Treat Puppet like code
![Page 35: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/35.jpg)
![Page 36: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/36.jpg)
Seven Habits of Highly Effective Puppet Users
README
36Habit 2: Treat Puppet like code
![Page 37: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/37.jpg)
![Page 38: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/38.jpg)
Seven Habits of Highly Effective Puppet Users
Inline documentation
38Habit 2: Treat Puppet like code
![Page 39: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/39.jpg)
![Page 40: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/40.jpg)
Seven Habits of Highly Effective Puppet Users
Refactoring
40Habit 2: Treat Puppet like code
![Page 41: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/41.jpg)
***
![Page 42: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/42.jpg)
Seven Habits of Highly Effective Puppet Users
Code Review
42Habit 2: Treat Puppet like code
![Page 43: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/43.jpg)
Seven Habits of Highly Effective Puppet Users
Style
43Habit 2: Treat Puppet like code
![Page 44: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/44.jpg)
44
![Page 45: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/45.jpg)
Seven Habits of Highly Effective Puppet Users
puppet-lint
45Habit 2: Treat Puppet like code
![Page 46: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/46.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #3 Stop, drop, and design
46Habit 3: Stop, drop, and design
![Page 47: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/47.jpg)
47 **
![Page 48: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/48.jpg)
Seven Habits of Highly Effective Puppet Users
Software needs to be designed
48Habit 3: Stop, drop, and design
![Page 49: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/49.jpg)
Seven Habits of Highly Effective Puppet Users
Separation of Concerns
49Habit 3: Stop, drop, and design
![Page 50: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/50.jpg)
Seven Habits of Highly Effective Puppet Users
Package, File, Service
50Habit 3: Stop, drop, and design
![Page 51: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/51.jpg)
Seven Habits of Highly Effective Puppet Users
Roles and Profiles
51Habit 3: Stop, drop, and design
![Page 52: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/52.jpg)
Seven Habits of Highly Effective Puppet Users
Identify Interfaces
52Habit 3: Stop, drop, and design
![Page 53: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/53.jpg)
Seven Habits of Highly Effective Puppet Users
What information does your module need?
53Habit 3: Stop, drop, and design
![Page 54: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/54.jpg)
Seven Habits of Highly Effective Puppet Users
Where does that information come from?
54Habit 3: Stop, drop, and design
![Page 55: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/55.jpg)
Seven Habits of Highly Effective Puppet Users
Where does that information need to go?
55Habit 3: Stop, drop, and design
![Page 56: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/56.jpg)
Seven Habits of Highly Effective Puppet Users
Public and Private classes
56Habit 3: Stop, drop, and design
![Page 57: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/57.jpg)
Seven Habits of Highly Effective Puppet Users
Data Separation
57Habit 3: Stop, drop, and design
![Page 58: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/58.jpg)
Seven Habits of Highly Effective Puppet Users
Data in your Puppet code is bad
58Habit 3: Stop, drop, and design
![Page 59: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/59.jpg)
Seven Habits of Highly Effective Puppet Users
Hiera
59Habit 3: Stop, drop, and design
![Page 60: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/60.jpg)
Seven Habits of Highly Effective Puppet Users
params
60Habit 3: Stop, drop, and design
![Page 61: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/61.jpg)
Seven Habits of Highly Effective Puppet Users
Module data
61Habit 3: Stop, drop, and design
![Page 62: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/62.jpg)
Seven Habits of Highly Effective Puppet Users
Stability
62Habit 3: Stop, drop, and design
![Page 63: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/63.jpg)
Seven Habits of Highly Effective Puppet Users
Identify a stable feature set
63Habit 3: Stop, drop, and design
![Page 64: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/64.jpg)
Seven Habits of Highly Effective Puppet Users
Semantic Versioning
64Habit 3: Stop, drop, and design
![Page 65: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/65.jpg)
Seven Habits of Highly Effective Puppet Users
Simplicity
65Habit 3: Stop, drop, and design
![Page 66: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/66.jpg)
Seven Habits of Highly Effective Puppet Users
UNIX Philosophy
66Habit 3: Stop, drop, and design
![Page 67: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/67.jpg)
Seven Habits of Highly Effective Puppet Users
Focus on your module’s core functionality
67Habit 3: Stop, drop, and design
![Page 68: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/68.jpg)
Seven Habits of Highly Effective Puppet Users
Hooks
68Habit 3: Stop, drop, and design
![Page 69: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/69.jpg)
Seven Habits of Highly Effective Puppet Users
class jabberd ( ... $manage_package = true, $manage_repository = false, $manage_service = true, ... ) {
...
}
69Habit 3: Stop, drop, and design
![Page 70: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/70.jpg)
Seven Habits of Highly Effective Puppet Users
Write modules as if they’re going to be open sourced
70Habit 3: Stop, drop, and design
![Page 71: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/71.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #4 Test all the things
71Habit 4: Create a culture of testing
![Page 72: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/72.jpg)
![Page 73: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/73.jpg)
Seven Habits of Highly Effective Puppet Users
The toolchain has improved dramatically
73Habit 4: Create a culture of testing
![Page 74: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/74.jpg)
Seven Habits of Highly Effective Puppet Users
Testing has become relatively inexpensive
74Habit 4: Create a culture of testing
![Page 75: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/75.jpg)
Seven Habits of Highly Effective Puppet Users
Your infrastructure is too important to not test
75Habit 4: Create a culture of testing
![Page 76: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/76.jpg)
![Page 77: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/77.jpg)
Seven Habits of Highly Effective Puppet Users
How?
77Habit 4: Create a culture of testing
![Page 78: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/78.jpg)
Seven Habits of Highly Effective Puppet Users
puppet-syntax
78Habit 4: Create a culture of testing
![Page 79: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/79.jpg)
Seven Habits of Highly Effective Puppet Users
rspec-puppet
79Habit 4: Create a culture of testing
![Page 80: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/80.jpg)
Seven Habits of Highly Effective Puppet Users
describe ‘myclass’ do it { should compile.with_all_deps } end
80Habit 4: Create a culture of testing
![Page 81: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/81.jpg)
Seven Habits of Highly Effective Puppet Users
beaker
81Habit 4: Create a culture of testing
![Page 82: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/82.jpg)
Seven Habits of Highly Effective Puppet Users 82Habit 4: Create a culture of testing
kitchen-ci
![Page 83: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/83.jpg)
Seven Habits of Highly Effective Puppet Users
serverspec
83Habit 4: Create a culture of testing
![Page 84: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/84.jpg)
Seven Habits of Highly Effective Puppet Users
describe package('httpd') do it { should be_installed } end
describe service('httpd') do it { should be_enabled } it { should be_running } end
describe port(80) do it { should be_listening } end
84Habit 4: Create a culture of testing
![Page 85: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/85.jpg)
Seven Habits of Highly Effective Puppet Users
Why test Puppet?
85Habit 4: Create a culture of testing
![Page 86: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/86.jpg)
Seven Habits of Highly Effective Puppet Users
Complexity
86Habit 4: Create a culture of testing
![Page 87: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/87.jpg)
![Page 88: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/88.jpg)
Seven Habits of Highly Effective Puppet Users
Test first!
88Habit 4: Create a culture of testing
![Page 89: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/89.jpg)
Seven Habits of Highly Effective Puppet Users
Make your tests count
89Habit 4: Create a culture of testing
![Page 90: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/90.jpg)
![Page 91: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/91.jpg)
Seven Habits of Highly Effective Puppet Users
it do should contain_file(‘/etc/ssh/sshd_config’).with({ ‘ensure’ => ‘present’, ‘owner’ => ‘root’, ‘group’ => ‘root’, ‘mode’ => ‘0644’, }) end
91Habit 4: Create a culture of testing
![Page 92: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/92.jpg)
Seven Habits of Highly Effective Puppet Users
context ‘with port => 2222’ do let(:params) {{ :port => ‘2222’ }}
it do should contain_file(‘/etc/ssh/sshd_config’).with_content( %r{Port 2222} ) end end
92Habit 4: Create a culture of testing
![Page 93: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/93.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #5 Continuous Integration and
Deployment
93Habit 5: Continuous integration and deployment
![Page 94: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/94.jpg)
Seven Habits of Highly Effective Puppet Users
Build a pipeline
94Habit 5: Continuous integration and deployment
![Page 95: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/95.jpg)
![Page 96: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/96.jpg)
Seven Habits of Highly Effective Puppet Users
Automated testing
96Habit 5: Continuous integration and deployment
![Page 97: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/97.jpg)
Seven Habits of Highly Effective Puppet Users
Unit Tests
97Habit 5: Continuous integration and deployment
![Page 98: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/98.jpg)
Seven Habits of Highly Effective Puppet Users
Integration Tests
98Habit 5: Continuous integration and deployment
![Page 99: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/99.jpg)
Seven Habits of Highly Effective Puppet Users
Acceptance tests
99Habit 5: Continuous integration and deployment
![Page 100: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/100.jpg)
Seven Habits of Highly Effective Puppet Users
Test under real world conditions
100Habit 5: Continuous integration and deployment
![Page 101: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/101.jpg)
![Page 102: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/102.jpg)
Seven Habits of Highly Effective Puppet Users
![Page 103: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/103.jpg)
Seven Habits of Highly Effective Puppet Users
Puppet versions
103Habit 5: Continuous integration and deployment
![Page 104: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/104.jpg)
Seven Habits of Highly Effective Puppet Users
Operating System versions
104Habit 5: Continuous integration and deployment
![Page 105: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/105.jpg)
Seven Habits of Highly Effective Puppet Users
Ruby versions
105Habit 5: Continuous integration and deployment
![Page 106: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/106.jpg)
Seven Habits of Highly Effective Puppet Users
Dependency versions
106Habit 5: Continuous integration and deployment
![Page 107: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/107.jpg)
Seven Habits of Highly Effective Puppet Users
Automated deployment
107Habit 5: Continuous integration and deployment
![Page 108: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/108.jpg)
Seven Habits of Highly Effective Puppet Users
librarian-puppet, r10k, MCollective, Capistrano
108Habit 5: Continuous integration and deployment
![Page 109: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/109.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #6 Make nice with Ruby
109Habit 6: Make nice with Ruby
![Page 110: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/110.jpg)
![Page 111: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/111.jpg)
Seven Habits of Highly Effective Puppet Users
Puppet is Ruby
111Habit 6: Make nice with Ruby
![Page 112: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/112.jpg)
Seven Habits of Highly Effective Puppet Users
Get over it
112Habit 6: Make nice with Ruby
![Page 113: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/113.jpg)
![Page 114: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/114.jpg)
Seven Habits of Highly Effective Puppet Users
Why?
114Habit 6: Make nice with Ruby
![Page 115: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/115.jpg)
Seven Habits of Highly Effective Puppet Users
rake
115Habit 6: Make nice with Ruby
![Page 116: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/116.jpg)
Seven Habits of Highly Effective Puppet Users
rspec
116Habit 6: Make nice with Ruby
![Page 117: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/117.jpg)
Seven Habits of Highly Effective Puppet Users
bundler
117Habit 6: Make nice with Ruby
![Page 118: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/118.jpg)
Seven Habits of Highly Effective Puppet Users
guard
118Habit 6: Make nice with Ruby
![Page 119: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/119.jpg)
Seven Habits of Highly Effective Puppet Users
Custom Types, Providers, and Facts
119Habit 6: Make nice with Ruby
![Page 120: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/120.jpg)
Seven Habits of Highly Effective Puppet Users
If you want to do anything advanced
120Habit 6: Make nice with Ruby
![Page 121: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/121.jpg)
Seven Habits of Highly Effective Puppet Users
Habit #7 Get involved
121Habit 7: Get involved
![Page 122: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/122.jpg)
Seven Habits of Highly Effective Puppet Users
Puppet is rapidly evolving
122Habit 7: Get involved
![Page 123: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/123.jpg)
Seven Habits of Highly Effective Puppet Users
Your experience is valuable
123Habit 7: Get involved
![Page 124: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/124.jpg)
Seven Habits of Highly Effective Puppet Users
Share your modules
124Habit 7: Get involved
![Page 125: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/125.jpg)
Seven Habits of Highly Effective Puppet Users
Speak at conferences
125Habit 7: Get involved
![Page 126: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/126.jpg)
Seven Habits of Highly Effective Puppet Users
Answer questions
126Habit 7: Get involved
![Page 127: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/127.jpg)
Seven Habits of Highly Effective Puppet Users
Blog about it
127Habit 7: Get involved
![Page 128: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/128.jpg)
Questions?
![Page 129: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/129.jpg)
Thank you!
![Page 130: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/130.jpg)
David Danzilio@djdanzilio
http://blog.danzilio.net
![Page 131: Seven Habits of Highly Effective Puppet Users](https://reader030.vdocuments.mx/reader030/viewer/2022020410/58a448a91a28ab41618b6f21/html5/thumbnails/131.jpg)
Image Credits
• http://simpsons.wikia.com/wiki/File:Homer-simpson-brain,1280x800,18857.jpg • https://dcarchives.files.wordpress.com/2014/06/habit-change-1964-mcphee-priller.jpg • http://www.quickmeme.com/meme/3plfef • http://www.quickmeme.com/Bad-Habit-Bruce • http://www.mememaker.net/static/images/templates/747303.jpg • http://knowyourmeme.com/photos/230191-wtf-is-this-shit • http://programmerryangosling.tumblr.com/image/22790837971 • http://www.quickmeme.com/img/d3/d36ad81bae0a8d69cd91f81065d8b0a19d9dfc1b63753093992282d6aa8b35dd.jpg • http://www.avatar3trailer.com/gangnam-style/gangnam_style_psy_05.jpg • http://www.troll.me/images/pissed-off-obama/refactor-your-fucking-code.jpg • http://www.globalnerdy.com/2011/05/30/ruby-foo/ • http://www.quickmeme.com/meme/3twnp6 • http://smashingboxes.com/ideas/beginners-guide-to-test-driven-development-tdd • http://www.pythian.com/blog/service-reliability-how-systems-administration-is-evolving-part-one/ • http://www.troll.me/2012/03/07/uncategorized/dont-worry-guys-i-got-programmer-cred/ • http://www.savthecoder.com/blog/saturday-meme-5-futurama-fry-tests-his-new-method • http://www.quickmeme.com/meme/3uc80p/ • http://i.qkme.me/3tde6j.jpg • http://i.qkme.me/3sekdw.jpg • http://www.quickmeme.com/meme/3sm9k1?id=229466593 • http://i.ytimg.com/vi/HUSSKWWg-0c/maxresdefault.jpg • http://blog.15five.com/wp-content/uploads/2013/09/Hypnosis_for_bad_habits_nyc.jpg • http://www.keepcalm-o-matic.co.uk/p/keep-calm-and-rtfm-27/