SlideShare ist ein Scribd-Unternehmen logo
1 von 131
Downloaden Sie, um offline zu lesen
Seven Habits of Highly Effective
Puppet Users
David Danzilio
@djdanzilio
1
$(whoami)
2
What’s talk this about?
A collection of observations of high
performing Puppet users
Habits?
What’s a habit?
“[A habit is] an acquired behavior
pattern regularly followed until it
has become almost involuntary”
Habits are hard
You don’t think about habits
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
Seven Habits of Highly Effective Puppet Users
Habit #1
Think like a software developer
14Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
You’re not a system administrator
anymore
15Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
You’re a software developer
16Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
System Administration
≠
Software Development
18Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
Why did we think this would be
easy?!
19Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
Puppet is easy because it’s a DSL
20Habit 1: Think like a software developer
FALSEFALSE
Seven Habits of Highly Effective Puppet Users
We just made it easy to write bad
code
22Habit 1: Think like a software developer
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
I’m a doctor, not an engineer.I’m a doctor, not an engineer.24
Seven Habits of Highly Effective Puppet Users
Software engineering is a mature
discipline
25Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
This is particularly important in
Puppet 4
26Habit 1: Think like a software developer
Seven Habits of Highly Effective Puppet Users
Habit #2
Treat Puppet like code
27Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Stop thinking of Puppet
as just configuration data
28Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Infrastructure as
CODE
29Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Infrastructure as
CODE
30Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Version Control
32Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Documentation
34Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
README
36Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Inline documentation
38Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Refactoring
40Habit 2: Treat Puppet like code
***
Seven Habits of Highly Effective Puppet Users
Code Review
42Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Style
43Habit 2: Treat Puppet like code
44
Seven Habits of Highly Effective Puppet Users
puppet-lint
45Habit 2: Treat Puppet like code
Seven Habits of Highly Effective Puppet Users
Habit #3
Stop, drop, and design
46Habit 3: Stop, drop, and design
47
**
Seven Habits of Highly Effective Puppet Users
Software needs to be designed
48Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Separation of Concerns
49Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Package, File, Service
50Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Roles and Profiles
51Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Identify Interfaces
52Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
What information does your
module need?
53Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Where does that information
come from?
54Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Where does that information
need to go?
55Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Public and Private classes
56Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Data Separation
57Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Data in your Puppet
code is bad
58Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Hiera
59Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
params
60Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Module data
61Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Stability
62Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Identify a stable feature set
63Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Semantic Versioning
64Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Simplicity
65Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
UNIX Philosophy
66Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Focus on your module’s core
functionality
67Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Hooks
68Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
class jabberd (
...
$manage_package = true,
$manage_repository = false,
$manage_service = true,
...
) {
...
}
69Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Write modules as if they’re going to
be open sourced
70Habit 3: Stop, drop, and design
Seven Habits of Highly Effective Puppet Users
Habit #4
Test all the things
71Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
The toolchain has improved
dramatically
73Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
Testing has become relatively
inexpensive
74Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
Your infrastructure is too important
to not test
75Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
How?
77Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
puppet-syntax
78Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
rspec-puppet
79Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
describe ‘myclass’ do
it { should compile.with_all_deps }
end
80Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
beaker
81Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users 82Habit 4: Create a culture of testing
kitchen-ci
Seven Habits of Highly Effective Puppet Users
serverspec
83Habit 4: Create a culture of testing
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
Seven Habits of Highly Effective Puppet Users
Why test Puppet?
85Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
Complexity
86Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
Test first!
88Habit 4: Create a culture of testing
Seven Habits of Highly Effective Puppet Users
Make your tests count
89Habit 4: Create a culture of testing
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
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
Seven Habits of Highly Effective Puppet Users
Habit #5
Continuous Integration and
Deployment
93Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Build a pipeline
94Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Automated testing
96Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Unit Tests
97Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Integration Tests
98Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Acceptance tests
99Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Test under real world conditions
100Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Seven Habits of Highly Effective Puppet Users
Puppet versions
103Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Operating System versions
104Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Ruby versions
105Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Dependency versions
106Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Automated deployment
107Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
librarian-puppet, r10k,
MCollective, Capistrano
108Habit 5: Continuous integration and deployment
Seven Habits of Highly Effective Puppet Users
Habit #6
Make nice with Ruby
109Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
Puppet is Ruby
111Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
Get over it
112Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
Why?
114Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
rake
115Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
rspec
116Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
bundler
117Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
guard
118Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
Custom Types, Providers, and Facts
119Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
If you want to do anything
advanced
120Habit 6: Make nice with Ruby
Seven Habits of Highly Effective Puppet Users
Habit #7
Get involved
121Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Puppet is rapidly evolving
122Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Your experience is valuable
123Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Share your modules
124Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Speak at conferences
125Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Answer questions
126Habit 7: Get involved
Seven Habits of Highly Effective Puppet Users
Blog about it
127Habit 7: Get involved
Questions?
Thank you!
David Danzilio
@djdanzilio
http://blog.danzilio.net
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/

Weitere ähnliche Inhalte

Andere mochten auch

Luis Romualdez - Expertise
Luis Romualdez - ExpertiseLuis Romualdez - Expertise
Luis Romualdez - Expertiseromualdez luis
 
Marketing Digital Marketing Integrado
Marketing Digital Marketing IntegradoMarketing Digital Marketing Integrado
Marketing Digital Marketing IntegradoRicardo Pinilla
 
Gender inclusive development in india an over view by dr. s. vijay kumar
Gender inclusive development in india   an over view by dr. s. vijay kumarGender inclusive development in india   an over view by dr. s. vijay kumar
Gender inclusive development in india an over view by dr. s. vijay kumarvijay kumar sarabu
 
Маски для лица
Маски для лицаМаски для лица
Маски для лицаTianDe
 
Becoming a Strengths Organization
Becoming a Strengths OrganizationBecoming a Strengths Organization
Becoming a Strengths OrganizationJosh Kester
 
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst Pain
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst PainOvarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst Pain
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst PainBetter Health
 
Rencontres Numériques 2013 : Estia entreprendre
Rencontres Numériques 2013 : Estia entreprendreRencontres Numériques 2013 : Estia entreprendre
Rencontres Numériques 2013 : Estia entreprendreantic Pays basque
 

Andere mochten auch (10)

Luis Romualdez - Expertise
Luis Romualdez - ExpertiseLuis Romualdez - Expertise
Luis Romualdez - Expertise
 
TECNOLOGIA NUTRABIOTICA NATURAL ASNE 2012 ed. 03
TECNOLOGIA NUTRABIOTICA NATURAL ASNE 2012 ed. 03TECNOLOGIA NUTRABIOTICA NATURAL ASNE 2012 ed. 03
TECNOLOGIA NUTRABIOTICA NATURAL ASNE 2012 ed. 03
 
Marketing Digital Marketing Integrado
Marketing Digital Marketing IntegradoMarketing Digital Marketing Integrado
Marketing Digital Marketing Integrado
 
Gender inclusive development in india an over view by dr. s. vijay kumar
Gender inclusive development in india   an over view by dr. s. vijay kumarGender inclusive development in india   an over view by dr. s. vijay kumar
Gender inclusive development in india an over view by dr. s. vijay kumar
 
Маски для лица
Маски для лицаМаски для лица
Маски для лица
 
Becoming a Strengths Organization
Becoming a Strengths OrganizationBecoming a Strengths Organization
Becoming a Strengths Organization
 
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst Pain
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst PainOvarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst Pain
Ovarian Cyst Causes | Ovarian Cyst Treatment |Ovarian Cyst Pain
 
Binnenwerk-Pdot
Binnenwerk-PdotBinnenwerk-Pdot
Binnenwerk-Pdot
 
Be project report template
Be project report templateBe project report template
Be project report template
 
Rencontres Numériques 2013 : Estia entreprendre
Rencontres Numériques 2013 : Estia entreprendreRencontres Numériques 2013 : Estia entreprendre
Rencontres Numériques 2013 : Estia entreprendre
 

Ähnlich wie Seven Habits of Highly Effective Puppet Users

Introduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender SystemsIntroduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender SystemsMarcel Caraciolo
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyondimoneytech
 
The LAZY Developer's Guide to BDD (with Cucumber)
The LAZY Developer's Guide to BDD (with Cucumber)The LAZY Developer's Guide to BDD (with Cucumber)
The LAZY Developer's Guide to BDD (with Cucumber)Tze Yang Ng
 
Improve existing code with confidence, supported by unit tests
Improve existing code with confidence, supported by unit testsImprove existing code with confidence, supported by unit tests
Improve existing code with confidence, supported by unit testsDattatray Kale
 
Crab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsCrab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsMarcel Caraciolo
 
Seven Habits Of Highly Effective Asp Net Mvc D
Seven Habits Of Highly Effective Asp Net Mvc DSeven Habits Of Highly Effective Asp Net Mvc D
Seven Habits Of Highly Effective Asp Net Mvc Dcurtismitchell
 
Testing your puppet code
Testing your puppet codeTesting your puppet code
Testing your puppet codeJulien Pivotto
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev opsAgile Montréal
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOpsBrice Fernandes
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with ChefBryan McLellan
 
How to move forward to a DevOps Culture?
How to move forward to a DevOps Culture?How to move forward to a DevOps Culture?
How to move forward to a DevOps Culture?Derya SEZEN
 
JustEnoughDevOpsForDataScientists
JustEnoughDevOpsForDataScientistsJustEnoughDevOpsForDataScientists
JustEnoughDevOpsForDataScientistsAnya Bida
 
GitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfGitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfWeaveworks
 
Interop 2020 The Release Night Is An Anti-Pattern
Interop 2020 The Release Night Is An Anti-PatternInterop 2020 The Release Night Is An Anti-Pattern
Interop 2020 The Release Night Is An Anti-PatternDave Karow
 
Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016Aakash Goel
 

Ähnlich wie Seven Habits of Highly Effective Puppet Users (20)

Introduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender SystemsIntroduction to Crab - Python Framework for Building Recommender Systems
Introduction to Crab - Python Framework for Building Recommender Systems
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyond
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
The LAZY Developer's Guide to BDD (with Cucumber)
The LAZY Developer's Guide to BDD (with Cucumber)The LAZY Developer's Guide to BDD (with Cucumber)
The LAZY Developer's Guide to BDD (with Cucumber)
 
Improve existing code with confidence, supported by unit tests
Improve existing code with confidence, supported by unit testsImprove existing code with confidence, supported by unit tests
Improve existing code with confidence, supported by unit tests
 
Crab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsCrab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation Systems
 
Seven Habits Of Highly Effective Asp Net Mvc D
Seven Habits Of Highly Effective Asp Net Mvc DSeven Habits Of Highly Effective Asp Net Mvc D
Seven Habits Of Highly Effective Asp Net Mvc D
 
Testing your puppet code
Testing your puppet codeTesting your puppet code
Testing your puppet code
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOps
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with Chef
 
How to move forward to a DevOps Culture?
How to move forward to a DevOps Culture?How to move forward to a DevOps Culture?
How to move forward to a DevOps Culture?
 
JustEnoughDevOpsForDataScientists
JustEnoughDevOpsForDataScientistsJustEnoughDevOpsForDataScientists
JustEnoughDevOpsForDataScientists
 
Pinto+Stratopan+Love
Pinto+Stratopan+LovePinto+Stratopan+Love
Pinto+Stratopan+Love
 
2019 WIA - User-centric Design for Data Scientists
2019 WIA - User-centric Design for Data Scientists2019 WIA - User-centric Design for Data Scientists
2019 WIA - User-centric Design for Data Scientists
 
GitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfGitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdf
 
Ci2
Ci2Ci2
Ci2
 
Interop 2020 The Release Night Is An Anti-Pattern
Interop 2020 The Release Night Is An Anti-PatternInterop 2020 The Release Night Is An Anti-Pattern
Interop 2020 The Release Night Is An Anti-Pattern
 
Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016
 

Kürzlich hochgeladen

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 

Kürzlich hochgeladen (20)

Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 

Seven Habits of Highly Effective Puppet Users

  • 1. Seven Habits of Highly Effective Puppet Users David Danzilio @djdanzilio 1
  • 4. A collection of observations of high performing Puppet users
  • 6.
  • 7.
  • 9. “[A habit is] an acquired behavior pattern regularly followed until it has become almost involuntary”
  • 11.
  • 12. You don’t think about habits
  • 13. 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
  • 14. Seven Habits of Highly Effective Puppet Users Habit #1 Think like a software developer 14Habit 1: Think like a software developer
  • 15. Seven Habits of Highly Effective Puppet Users You’re not a system administrator anymore 15Habit 1: Think like a software developer
  • 16. Seven Habits of Highly Effective Puppet Users You’re a software developer 16Habit 1: Think like a software developer
  • 17.
  • 18. Seven Habits of Highly Effective Puppet Users System Administration ≠ Software Development 18Habit 1: Think like a software developer
  • 19. Seven Habits of Highly Effective Puppet Users Why did we think this would be easy?! 19Habit 1: Think like a software developer
  • 20. Seven Habits of Highly Effective Puppet Users Puppet is easy because it’s a DSL 20Habit 1: Think like a software developer
  • 22. Seven Habits of Highly Effective Puppet Users We just made it easy to write bad code 22Habit 1: Think like a software developer
  • 23. 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
  • 24. I’m a doctor, not an engineer.I’m a doctor, not an engineer.24
  • 25. Seven Habits of Highly Effective Puppet Users Software engineering is a mature discipline 25Habit 1: Think like a software developer
  • 26. Seven Habits of Highly Effective Puppet Users This is particularly important in Puppet 4 26Habit 1: Think like a software developer
  • 27. Seven Habits of Highly Effective Puppet Users Habit #2 Treat Puppet like code 27Habit 2: Treat Puppet like code
  • 28. Seven Habits of Highly Effective Puppet Users Stop thinking of Puppet as just configuration data 28Habit 2: Treat Puppet like code
  • 29. Seven Habits of Highly Effective Puppet Users Infrastructure as CODE 29Habit 2: Treat Puppet like code
  • 30. Seven Habits of Highly Effective Puppet Users Infrastructure as CODE 30Habit 2: Treat Puppet like code
  • 31.
  • 32. Seven Habits of Highly Effective Puppet Users Version Control 32Habit 2: Treat Puppet like code
  • 33.
  • 34. Seven Habits of Highly Effective Puppet Users Documentation 34Habit 2: Treat Puppet like code
  • 35.
  • 36. Seven Habits of Highly Effective Puppet Users README 36Habit 2: Treat Puppet like code
  • 37.
  • 38. Seven Habits of Highly Effective Puppet Users Inline documentation 38Habit 2: Treat Puppet like code
  • 39.
  • 40. Seven Habits of Highly Effective Puppet Users Refactoring 40Habit 2: Treat Puppet like code
  • 41. ***
  • 42. Seven Habits of Highly Effective Puppet Users Code Review 42Habit 2: Treat Puppet like code
  • 43. Seven Habits of Highly Effective Puppet Users Style 43Habit 2: Treat Puppet like code
  • 44. 44
  • 45. Seven Habits of Highly Effective Puppet Users puppet-lint 45Habit 2: Treat Puppet like code
  • 46. Seven Habits of Highly Effective Puppet Users Habit #3 Stop, drop, and design 46Habit 3: Stop, drop, and design
  • 47. 47 **
  • 48. Seven Habits of Highly Effective Puppet Users Software needs to be designed 48Habit 3: Stop, drop, and design
  • 49. Seven Habits of Highly Effective Puppet Users Separation of Concerns 49Habit 3: Stop, drop, and design
  • 50. Seven Habits of Highly Effective Puppet Users Package, File, Service 50Habit 3: Stop, drop, and design
  • 51. Seven Habits of Highly Effective Puppet Users Roles and Profiles 51Habit 3: Stop, drop, and design
  • 52. Seven Habits of Highly Effective Puppet Users Identify Interfaces 52Habit 3: Stop, drop, and design
  • 53. Seven Habits of Highly Effective Puppet Users What information does your module need? 53Habit 3: Stop, drop, and design
  • 54. Seven Habits of Highly Effective Puppet Users Where does that information come from? 54Habit 3: Stop, drop, and design
  • 55. Seven Habits of Highly Effective Puppet Users Where does that information need to go? 55Habit 3: Stop, drop, and design
  • 56. Seven Habits of Highly Effective Puppet Users Public and Private classes 56Habit 3: Stop, drop, and design
  • 57. Seven Habits of Highly Effective Puppet Users Data Separation 57Habit 3: Stop, drop, and design
  • 58. Seven Habits of Highly Effective Puppet Users Data in your Puppet code is bad 58Habit 3: Stop, drop, and design
  • 59. Seven Habits of Highly Effective Puppet Users Hiera 59Habit 3: Stop, drop, and design
  • 60. Seven Habits of Highly Effective Puppet Users params 60Habit 3: Stop, drop, and design
  • 61. Seven Habits of Highly Effective Puppet Users Module data 61Habit 3: Stop, drop, and design
  • 62. Seven Habits of Highly Effective Puppet Users Stability 62Habit 3: Stop, drop, and design
  • 63. Seven Habits of Highly Effective Puppet Users Identify a stable feature set 63Habit 3: Stop, drop, and design
  • 64. Seven Habits of Highly Effective Puppet Users Semantic Versioning 64Habit 3: Stop, drop, and design
  • 65. Seven Habits of Highly Effective Puppet Users Simplicity 65Habit 3: Stop, drop, and design
  • 66. Seven Habits of Highly Effective Puppet Users UNIX Philosophy 66Habit 3: Stop, drop, and design
  • 67. Seven Habits of Highly Effective Puppet Users Focus on your module’s core functionality 67Habit 3: Stop, drop, and design
  • 68. Seven Habits of Highly Effective Puppet Users Hooks 68Habit 3: Stop, drop, and design
  • 69. Seven Habits of Highly Effective Puppet Users class jabberd ( ... $manage_package = true, $manage_repository = false, $manage_service = true, ... ) { ... } 69Habit 3: Stop, drop, and design
  • 70. Seven Habits of Highly Effective Puppet Users Write modules as if they’re going to be open sourced 70Habit 3: Stop, drop, and design
  • 71. Seven Habits of Highly Effective Puppet Users Habit #4 Test all the things 71Habit 4: Create a culture of testing
  • 72.
  • 73. Seven Habits of Highly Effective Puppet Users The toolchain has improved dramatically 73Habit 4: Create a culture of testing
  • 74. Seven Habits of Highly Effective Puppet Users Testing has become relatively inexpensive 74Habit 4: Create a culture of testing
  • 75. Seven Habits of Highly Effective Puppet Users Your infrastructure is too important to not test 75Habit 4: Create a culture of testing
  • 76.
  • 77. Seven Habits of Highly Effective Puppet Users How? 77Habit 4: Create a culture of testing
  • 78. Seven Habits of Highly Effective Puppet Users puppet-syntax 78Habit 4: Create a culture of testing
  • 79. Seven Habits of Highly Effective Puppet Users rspec-puppet 79Habit 4: Create a culture of testing
  • 80. Seven Habits of Highly Effective Puppet Users describe ‘myclass’ do it { should compile.with_all_deps } end 80Habit 4: Create a culture of testing
  • 81. Seven Habits of Highly Effective Puppet Users beaker 81Habit 4: Create a culture of testing
  • 82. Seven Habits of Highly Effective Puppet Users 82Habit 4: Create a culture of testing kitchen-ci
  • 83. Seven Habits of Highly Effective Puppet Users serverspec 83Habit 4: Create a culture of testing
  • 84. 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
  • 85. Seven Habits of Highly Effective Puppet Users Why test Puppet? 85Habit 4: Create a culture of testing
  • 86. Seven Habits of Highly Effective Puppet Users Complexity 86Habit 4: Create a culture of testing
  • 87.
  • 88. Seven Habits of Highly Effective Puppet Users Test first! 88Habit 4: Create a culture of testing
  • 89. Seven Habits of Highly Effective Puppet Users Make your tests count 89Habit 4: Create a culture of testing
  • 90.
  • 91. 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
  • 92. 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
  • 93. Seven Habits of Highly Effective Puppet Users Habit #5 Continuous Integration and Deployment 93Habit 5: Continuous integration and deployment
  • 94. Seven Habits of Highly Effective Puppet Users Build a pipeline 94Habit 5: Continuous integration and deployment
  • 95.
  • 96. Seven Habits of Highly Effective Puppet Users Automated testing 96Habit 5: Continuous integration and deployment
  • 97. Seven Habits of Highly Effective Puppet Users Unit Tests 97Habit 5: Continuous integration and deployment
  • 98. Seven Habits of Highly Effective Puppet Users Integration Tests 98Habit 5: Continuous integration and deployment
  • 99. Seven Habits of Highly Effective Puppet Users Acceptance tests 99Habit 5: Continuous integration and deployment
  • 100. Seven Habits of Highly Effective Puppet Users Test under real world conditions 100Habit 5: Continuous integration and deployment
  • 101.
  • 102. Seven Habits of Highly Effective Puppet Users
  • 103. Seven Habits of Highly Effective Puppet Users Puppet versions 103Habit 5: Continuous integration and deployment
  • 104. Seven Habits of Highly Effective Puppet Users Operating System versions 104Habit 5: Continuous integration and deployment
  • 105. Seven Habits of Highly Effective Puppet Users Ruby versions 105Habit 5: Continuous integration and deployment
  • 106. Seven Habits of Highly Effective Puppet Users Dependency versions 106Habit 5: Continuous integration and deployment
  • 107. Seven Habits of Highly Effective Puppet Users Automated deployment 107Habit 5: Continuous integration and deployment
  • 108. Seven Habits of Highly Effective Puppet Users librarian-puppet, r10k, MCollective, Capistrano 108Habit 5: Continuous integration and deployment
  • 109. Seven Habits of Highly Effective Puppet Users Habit #6 Make nice with Ruby 109Habit 6: Make nice with Ruby
  • 110.
  • 111. Seven Habits of Highly Effective Puppet Users Puppet is Ruby 111Habit 6: Make nice with Ruby
  • 112. Seven Habits of Highly Effective Puppet Users Get over it 112Habit 6: Make nice with Ruby
  • 113.
  • 114. Seven Habits of Highly Effective Puppet Users Why? 114Habit 6: Make nice with Ruby
  • 115. Seven Habits of Highly Effective Puppet Users rake 115Habit 6: Make nice with Ruby
  • 116. Seven Habits of Highly Effective Puppet Users rspec 116Habit 6: Make nice with Ruby
  • 117. Seven Habits of Highly Effective Puppet Users bundler 117Habit 6: Make nice with Ruby
  • 118. Seven Habits of Highly Effective Puppet Users guard 118Habit 6: Make nice with Ruby
  • 119. Seven Habits of Highly Effective Puppet Users Custom Types, Providers, and Facts 119Habit 6: Make nice with Ruby
  • 120. Seven Habits of Highly Effective Puppet Users If you want to do anything advanced 120Habit 6: Make nice with Ruby
  • 121. Seven Habits of Highly Effective Puppet Users Habit #7 Get involved 121Habit 7: Get involved
  • 122. Seven Habits of Highly Effective Puppet Users Puppet is rapidly evolving 122Habit 7: Get involved
  • 123. Seven Habits of Highly Effective Puppet Users Your experience is valuable 123Habit 7: Get involved
  • 124. Seven Habits of Highly Effective Puppet Users Share your modules 124Habit 7: Get involved
  • 125. Seven Habits of Highly Effective Puppet Users Speak at conferences 125Habit 7: Get involved
  • 126. Seven Habits of Highly Effective Puppet Users Answer questions 126Habit 7: Get involved
  • 127. Seven Habits of Highly Effective Puppet Users Blog about it 127Habit 7: Get involved
  • 131. 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/