Your SlideShare is downloading. ×
0
Writing and Sharing Great Modules            with the Puppet Forge@ryanycoleman - Product Owner - Puppet Forge
About Me#PuppetCampRyan was a RedHat sysadmin for Penn State before joining Puppet Labsas a professional services engineer...
#PuppetCampThe Puppet Forge is a community driven web service for contributing and finding Puppetmodules.
#PuppetCampWord cloud made from forge module names. Size = frequency
#PuppetCampThe following are examples of what you will find on the Forge.
#PuppetCamp
Forge Module Count  4000  3000  2000  1000     0         End Q3   End Q4   ~End Q1   ~End Q2   ~End Q3   ~End Q4#PuppetCamp
#PuppetCamp
#PuppetCamp
#PuppetCamp
Best Good Practices#PuppetCamp
PL Style Guide#PuppetCamp
#PuppetCamp
#PuppetCamp
#PuppetCamp
#PuppetCamp
Code VS Data#PuppetCampAs you get further along with your Puppet Deployments, separating your code (puppetresources) from ...
Imagine that you’re doing a research project in the library.
You’ve got some books that help accomplish your goal.
Separate             Code               From              DataBut you don’t write in those books. You keep your notes -- y...
So where do you express your data and how does Puppet find it?
Automatic Data Lookup Built into Puppet 3
The answer, use Hiera!Seriously, these docs rock. Read them. http://docs.puppetlabs.com/hiera/1/index.html
It’s MAGIC                                                      But also, it’s not...#PuppetCampBut first, let’s take a clo...
Hello! I’m James_Bond   running the RedHatlicense to kill downtime.
Good to know!  Hmm, what doesJames_Bond need to     enforce?.
James_Bond?                  Enforce    External Node                   Forge       Classifier OK, what do Ineed for Forge?...
forge::package?                                                                         Data                              ...
forge::package?                                                                         Data                              ...
? $forge::package        Hiearchy      $clientcert                                                   $james_bond   $operat...
Expressing the configuration of hiera            data backends and lookup hierarchyHiera lets you express data in some stru...
Ok, so how do I use it  with my Puppet       classes?#PuppetCampThankfully, Puppet 3 has made implementing Hiera really si...
In the early days...Please don’t use the hiera() function. Consider it legacy.
In the early days...This is better, as the user can override this default parameter value.With this, you’re locked into hi...
Here’s the magic!But really, just get yourself onto Puppet 3 and take advantage of automatic Hiera!
Data Lookup Order   •   Use explicit class declaration       values   •   Query Data Binding   •   Use the default value f...
Data Bindings                                 don’t lock yourself in#PuppetCampAdditionally, protect yourself from a poten...
Built into Puppet 3data_bindings were implemented to be an abstraction for data lookup, defaulting to hiera fornow
There’s already an alternative out there, for consulting foreman as your data backend
But really, just get yourself onto Puppet 3 and take advantage of automatic Hiera!
Hiera backends are pluggable too. Here are two examples.
Best Practices          • Confirm to the Style Guide          • Use Parameterized Classes          • Don’t use hiera() dire...
TheTeam
What have we been              up to?          • Re-launch and Re-designThough we’re small, we’ve been really busy!
Lots of little features add up to a substantially nicer to use Forge.
What have we been      up to?• Re-launch and Re-design• PMT Fixes (prep for publish)• Download Counts
Download counts, now in your search results!
What’s Next?        GitHub PublishEdit your Modulefile, push your commit and we’ll do the publishing! Coming soon to arepos...
What’s Next?     A Full & Public APIAlso coming soon, an actual API for doing all sorts of things with the Forge.
What’s Next?Just an experimental mock-up of search results. Actual feature will absolutely look andbehave differently.
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forg...
PulpProject.orgRedHat’s Pulp Project is repository management software that recently added support forPuppet Modules.
• Manage Modules on-premise           • Mirror Public Forge           • BUT, please work with me on this             • Ema...
Want to help?#PuppetCampIf you want to add your influence to our products, join the Puppet Labs Test Pilots program!https:/...
• Sharpen your skills              • Get Certified              • Online learning on the way              • puppetlabs.com/...
WE’RE HIRING!           • Puppet Forge Module Engineer             • http://bit.ly/15wdruk           • Software Engineers ...
Thank You!       Please email (or tweet) feedback and questions               ryan@puppetlabs.com - @ryanycoleman         ...
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Writing and Sharing Great Modules with the Puppet Forge
Upcoming SlideShare
Loading in...5
×

Writing and Sharing Great Modules with the Puppet Forge

771

Published on

Ryan Coleman's talk on "Writing and Sharing Great Modules with the Puppet Forge" at Puppet Camp Baltimore, Atlanta, and Chicago 2013. Learn about upcoming Puppet Camps at http://puppetlabs.com/community/puppet-camp/

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
771
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Writing and Sharing Great Modules with the Puppet Forge"

  1. 1. Writing and Sharing Great Modules with the Puppet Forge@ryanycoleman - Product Owner - Puppet Forge
  2. 2. About Me#PuppetCampRyan was a RedHat sysadmin for Penn State before joining Puppet Labsas a professional services engineer. Now is product owner for the Forge.
  3. 3. #PuppetCampThe Puppet Forge is a community driven web service for contributing and finding Puppetmodules.
  4. 4. #PuppetCampWord cloud made from forge module names. Size = frequency
  5. 5. #PuppetCampThe following are examples of what you will find on the Forge.
  6. 6. #PuppetCamp
  7. 7. Forge Module Count 4000 3000 2000 1000 0 End Q3 End Q4 ~End Q1 ~End Q2 ~End Q3 ~End Q4#PuppetCamp
  8. 8. #PuppetCamp
  9. 9. #PuppetCamp
  10. 10. #PuppetCamp
  11. 11. Best Good Practices#PuppetCamp
  12. 12. PL Style Guide#PuppetCamp
  13. 13. #PuppetCamp
  14. 14. #PuppetCamp
  15. 15. #PuppetCamp
  16. 16. #PuppetCamp
  17. 17. Code VS Data#PuppetCampAs you get further along with your Puppet Deployments, separating your code (puppetresources) from the data (what package, what version) becomes increasingly important.
  18. 18. Imagine that you’re doing a research project in the library.
  19. 19. You’ve got some books that help accomplish your goal.
  20. 20. Separate Code From DataBut you don’t write in those books. You keep your notes -- your data -- separate.
  21. 21. So where do you express your data and how does Puppet find it?
  22. 22. Automatic Data Lookup Built into Puppet 3
  23. 23. The answer, use Hiera!Seriously, these docs rock. Read them. http://docs.puppetlabs.com/hiera/1/index.html
  24. 24. It’s MAGIC But also, it’s not...#PuppetCampBut first, let’s take a closer look at a Puppet run.
  25. 25. Hello! I’m James_Bond running the RedHatlicense to kill downtime.
  26. 26. Good to know! Hmm, what doesJames_Bond need to enforce?.
  27. 27. James_Bond? Enforce External Node Forge Classifier OK, what do Ineed for Forge?Modules ModulesModules Modules
  28. 28. forge::package? Data Bindings Hiera Hiearchy Backends $clientcert $operatingsystem JSON YAML MySQL Foreman commonThe Puppet Master needs forge::package. To get this data...- It consults its data bindings terminus (abstraction for looking up data)- Default lookup to Hiera (key/value store for data)- Hiera consults its back-end data stores (defaults to yaml)- Hiera returns result of lookup to master (key/value or could not find)
  29. 29. forge::package? Data Bindings It’s screen! Hiera Hiearchy Backends $clientcert $operatingsystem JSON YAML MySQL Redis commonThe Puppet Master needs forge::package. To get this data...- It consults its data bindings terminus (abstraction for looking up data)- Default lookup to Hiera (key/value store for data)- Hiera consults its back-end data stores (defaults to yaml)- Hiera returns result of lookup to master (key/value or could not find)
  30. 30. ? $forge::package Hiearchy $clientcert $james_bond $operatingsystem $RedHat common commonHiera will examine the lookup order of its data backends and its lookup hierarchy. If youspecified a variable lookup in your hierarchy, Hiera will use available facts when choosing thebackend file to lookup.
  31. 31. Expressing the configuration of hiera data backends and lookup hierarchyHiera lets you express data in some structured format (which is pluggable).You then establish a hierarchy of lookup, however you like, usually based on facts.
  32. 32. Ok, so how do I use it with my Puppet classes?#PuppetCampThankfully, Puppet 3 has made implementing Hiera really simple.
  33. 33. In the early days...Please don’t use the hiera() function. Consider it legacy.
  34. 34. In the early days...This is better, as the user can override this default parameter value.With this, you’re locked into hiera.
  35. 35. Here’s the magic!But really, just get yourself onto Puppet 3 and take advantage of automatic Hiera!
  36. 36. 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.This slide could be more visual vs text-based
  37. 37. Data Bindings don’t lock yourself in#PuppetCampAdditionally, protect yourself from a potential loss of Hiera.
  38. 38. Built into Puppet 3data_bindings were implemented to be an abstraction for data lookup, defaulting to hiera fornow
  39. 39. There’s already an alternative out there, for consulting foreman as your data backend
  40. 40. But really, just get yourself onto Puppet 3 and take advantage of automatic Hiera!
  41. 41. Hiera backends are pluggable too. Here are two examples.
  42. 42. Best Practices • Confirm to the Style Guide • Use Parameterized Classes • Don’t use hiera() directly#PuppetCampRe-cap.
  43. 43. TheTeam
  44. 44. What have we been up to? • Re-launch and Re-designThough we’re small, we’ve been really busy!
  45. 45. Lots of little features add up to a substantially nicer to use Forge.
  46. 46. What have we been up to?• Re-launch and Re-design• PMT Fixes (prep for publish)• Download Counts
  47. 47. Download counts, now in your search results!
  48. 48. What’s Next? GitHub PublishEdit your Modulefile, push your commit and we’ll do the publishing! Coming soon to arepository near you.
  49. 49. What’s Next? A Full & Public APIAlso coming soon, an actual API for doing all sorts of things with the Forge.
  50. 50. What’s Next?Just an experimental mock-up of search results. Actual feature will absolutely look andbehave differently.
  51. 51. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  52. 52. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  53. 53. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  54. 54. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  55. 55. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  56. 56. On-Premise Forge?Private Forge has been a common request. The requests I get are two-fold.A) How can I install public Forge content on a master that can’t reach the outside.B) How can I contribute company-specific content to a Forge-like thing inside my firewall
  57. 57. PulpProject.orgRedHat’s Pulp Project is repository management software that recently added support forPuppet Modules.
  58. 58. • Manage Modules on-premise • Mirror Public Forge • BUT, please work with me on this • Email me or comment on #5033If you’re interested in this, email ryan@puppetlabs.com or add your thoughts to https://projects.puppetlabs.com/issues/5033.We’re going to do something in this space, but want to hear more from you on what youneed.
  59. 59. Want to help?#PuppetCampIf you want to add your influence to our products, join the Puppet Labs Test Pilots program!https://puppetlabs.com/community/puppet-test-pilots-program/
  60. 60. • Sharpen your skills • Get Certified • Online learning on the way • puppetlabs.com/educationPuppet Advanced Training in Atlanta - June 11 http://puppet-advanced-training-atlanta- june-2013-eorg.eventbrite.com/#PuppetCampOur education courses are carefully crafted and delivered by our fabulous education teamand professional services team.Advanced course coming to LA 3/19Browse upcoming events at http://puppetlabs.eventbrite.com/
  61. 61. WE’RE HIRING! • Puppet Forge Module Engineer • http://bit.ly/15wdruk • Software Engineers • puppetlabs.com/jobs#PuppetCampSeriously, join our team. It’ll be awesome.
  62. 62. Thank You! Please email (or tweet) feedback and questions ryan@puppetlabs.com - @ryanycoleman forge.puppetlabs.com puppetlabs.com/jobs#PuppetCampSeriously, join our team. It’ll be awesome.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×