Your SlideShare is downloading. ×
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Puppet Module Best Practices - Puppet Camp Silicon Valley
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Puppet Module Best Practices - Puppet Camp Silicon Valley

1,965

Published on

Ryan Coleman presents "Puppet Module Best Practices" at Puppet Camp Silicon Valley 2014

Ryan Coleman presents "Puppet Module Best Practices" at Puppet Camp Silicon Valley 2014

0 Comments
14 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,965
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
76
Comments
0
Likes
14
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Ryan was a RedHat sysadmin for Penn State before joining Puppet Labs
    as a professional services engineer. Now is product owner for the Forge.
  • The Puppet Forge is a community driven web service for contributing and finding Puppet modules.
  • The following are examples of what you will find on the Forge.
  • Many Puppet modules offer users way too many interaction points or one massive entry point that is too difficult to comprehend. The end result isn’t user friendly and doesn’t help with maintenance either.
  • The answer, use Hiera!
    Seriously, these docs rock. Read them. http://docs.puppetlabs.com/hiera/1/index.html
  • But really, just get yourself onto Puppet 3 and take advantage of automatic Hiera!
  • This slide could be more visual vs text-based
  • There’s already an alternative out there, for consulting foreman as your data backend
  • Hiera backends are pluggable too. Here are two examples.
  • If you want to add your influence to our products, join the Puppet Labs Test Pilots program!
    https://puppetlabs.com/community/puppet-test-pilots-program/
  • Seriously, join our team. It’ll be awesome.
  • Transcript

    • 1. Ryan Coleman Writing Better Modules @ryanycoleman | ryan@puppetlabs.com
    • 2. Where I Came From • • • Penn Stater Professional Traveler Blacksmith #PuppetCamp
    • 3. #PuppetCamp
    • 4. #PuppetCamp
    • 5. #PuppetCamp
    • 6. #PuppetCamp
    • 7. #PuppetCamp
    • 8. #PuppetCamp
    • 9. Writing Better Modules #PuppetCamp
    • 10. Why Share?
    • 11. Keep it modular
    • 12. Dependencies can be your friend
    • 13. PL Style Guide #PuppetCamp
    • 14. #PuppetCamp
    • 15. #PuppetCamp
    • 16. #PuppetCamp
    • 17. #PuppetCamp
    • 18. Development Tools
    • 19. Vim • vim-pathogen or vundle (for plugins) • snipmate (like TextMate) • tabular • syntastic • mv-vim-puppet
    • 20. Class Layout & Parameter Naming
    • 21. Tex t http://ruth-tay.deviantart.com
    • 22. VS
    • 23. Private classes should be discrete
    • 24. Validate your input
    • 25. https://github.com/stdmod/pup pet-modules A community-driven effort to standardize on param names
    • 26. Roles & Profiles
    • 27. Roles are the service to be offered, roll-up profiles Profiles merge tech modules with business logic
    • 28. Containment
    • 29. Anchor Pattern
    • 30. Contain (Puppet 3.4+)
    • 31. Documentation the most important part!
    • 32. Answer these questions • What technology does your module manage? • What does it intend to do? • How does it do it? (impact on the system) • How should one use it?
    • 33. http://docs.puppetlabs.com/puppet/3/reference/modules_ documentation.html
    • 34. Versioning
    • 35. Semantic Versioning • Based on Major.Minor.Patch scheme • X.0.0 Major version for breaking change • 0.X.0 Minor version for new non-breaking functionality • 0.0.X Patch version for backwards compatible bug fixes
    • 36. http://links.puppetlabs.com/bgtm
    • 37. Data & Modules
    • 38. Why separate?
    • 39. Two Types of Data • Site • Which port do I bind to? • Logistics • Which package for this OS?
    • 40. Logistics • params.pp • ripienaar/module_data
    • 41. http://forge.puppetlabs.com/ripienaar/module_data http://forge.puppetlabs.com/ripienaar/module_data ./data/operatingsystem/Amazon.yaml Params.pp
    • 42. Site • node definitions • ENC
    • 43. Automatic Data Lookup Built into Puppet 3
    • 44. Here’s the magic!
    • 45. Data Lookup Order • Use explicit class declaration values • • • Query Data Binding Use the default value from class. Fail compilation with an error if no value can be found.
    • 46. Module Testing A Brief Overview
    • 47. Smoke Testing http://www.dsrsd.com/img/img_wwrw/Sewer_Web.png
    • 48. puppet apply ./tests/apache.pp
    • 49. Unit Testing http://www.pieterg.com/Media/277
    • 50. Integration Testing http://robots.thoughtbot.com/post/33771089985/rspec-integration-tests-with-capybara
    • 51. rspec-system
    • 52. Acceptance Testing
    • 53. Beaker
    • 54. Writing Better Modules • Keep them simple & modular • Consistent Style • Useful Documentation • Separate Code From Data • Test Against Regressions
    • 55. Want to help? #PuppetCamp
    • 56. Thank You! Feel free to email or tweet anytime RE: Forge! ryan@puppetlabs.com - @ryanycoleman forge.puppetlabs.com #PuppetCamp

    ×