~/talk

Chef Cookbook Design Patterns

Talkat MountainWest RubyConf 2011 · 2011-03-17..03-18· [ruby, devops-and-delivery]
slides:none on file

Shows how Opscode-style Chef cookbooks are structured: uses attributes and file_cache_path to make remote_file downloads and source builds configurable instead of hardcoded; demonstrates switching between platform package vs source installs and declaring metadata deps like build-essential. Explains using server-side search to discover Nagios clients and data bags for dynamic config, describes writing libraries and lightweight providers in Ruby, building a GNU Parallel cookbook in about 30 minutes, and testing by uploading cookbooks and running chef-client or Vagrant-built nodes.

AI-written summary · about

  1. 0:00Start
  2. 8:01Do that in a recipe
  3. 8:25remote_file problems
  4. 9:29tmp isn't a great location
  5. 10:06remote_file using attributes
  6. 11:02bash script using attributes
  7. 11:24Attribute conditional on platform in attributes file
  8. 18:02Benefits of Chef Server
  9. 18:51Hardcoding data: Anti-pattern
  10. 19:38File specificity
  11. 20:16Static vs Dynamic Resources
  12. 21:28Recipe Helpers
  13. 22:02LWRP Helpers
  14. 22:46Heavyweight Resources & Providers
  15. 23:44Resource DSL
  16. 23:59Validation Parameters
  17. 24:29Lightweight Providers
  18. 24:49Provider action code
  19. 25:23Use it in a recipe!
  20. 27:04Opscode's cookbook examples
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.