10 things i wish i'd known when i started using puppet
Post on 13-Apr-2017
195 Views
Preview:
TRANSCRIPT
10 ThingsI Wish I’d Known When I Started Using Puppet
Paul Anderson paul.anderson@puppet.com
% facter paul
Alliteration => “Affirmative” }
Top500 => “7 systems”,
SME => [ “HPC”, “Supercomputing” ],
Puppet_employee => “9 months”,Puppet_user => “2 years”,
Consultant => “10 years”,{ Admin => “21 years”,
1. Puppet Projects, POCs and Pilots get Pressed into Production
Plan for Production
2. Puppet Code is Powerful“With great power comes great responsibility”
- Uncle Ben Parker
6
With Puppet You Get:
Beware the siren call of the exec resource!
Desired State Model
Fact-based Configuration Management
System State Information
Reporting & Audit Trails
Catalog Idempotency
Consistent Additive Improvement
3. No Obfuscated Puppet CodeBrilliant Puppet code is easy to read, not indecipherable…Don’t get stuck maintaining your codebase forever
CONFIDENTIAL – IF NOT, DELETE THIS LINE
4. Start with focus on timeFree yourself up to tackle bigger challenges
1. Quick ROI2. Free up time3. Build Trust
(Then comes Oracle, Websphere, etc.)
5. Start with what you knowDon’t learn puppet at the same time you’re learning new tech
case $equus {
‘horse’: { include puppet }
‘zebra’: { include admin }
}
14
6. Use Abstraction WellArchitect your codebase so it scales and is maintainable
Roles and Profiles
Server = $$$
Role Module
Profile Module
Component Module
Class
Resources
16
7. Facts Steer the Catalog(and sometimes the other way around)
Facts Steer the Catalog
Facts Steer the Catalog
Agent (Facts) Master (Catalog)
Custom facts:java_version => “1.7.0_60”
if versioncmp($java_version, ‘1.8.0’) < 0 {include java_updater
}
class java_updater {installers, execs, purges, hardening, etc.}
8. Put a Version on it!
Put a Version on it!Check everything into VCS
Work with Packages
Use r10k with Control Repo and Env.
Tarballs – jordansissel/fpmWindows – good ol’ choco?
Clear, predictable workflowAdd process/people to scale
Promotes Transparency and Trust
21
9. Organizational Change is Difficult
22
“There’s no better way to overpower a trickle of doubt than with a flood of naked truth”
- Frank Underwood
23
Simulate
Communicate
Enable
CONFIDENTIAL – IF NOT, DELETE THIS LINE
10. You’re not alone!The community and Puppet team have your back!
• Look left, look right, 3/3 of you are interested in Puppet
• Ask.puppet.com
• Learn.puppet.com (self-paced training)
• Forge.puppet.com
• #puppet on freenode
• https://www.youtube.com/user/PuppetLabsInc
• @puppetize
• Voxpupuli.org
• https://groups.google.com/forum/#!forum/puppet-users
• https://puppetcommunity.slack.com/
26
Questions?
root@localhost:/etc/sysctl.d# facter networking.interfaces.eth0{ bindings => [ { address => "10.0.2.15", netmask => "255.255.255.0", network => "10.0.2.0" } ], bindings6 => [ { … } ], dhcp => "10.0.2.2", ip => "10.0.2.15",…}
Facter: networking.interfaces.eth0.ipPP: ${::facts[networking][interfaces][eth0][ip]}ERB: <%= @facts['networking']['interfaces']['eth0']['ip'] %>
top related