Food Fight

The Podcast where DevOps chefs do battle

Episode 6: Cookbook Reusability With Nikolay Sturm

Topic:  Cookbook Reusability with Nikolay Sturm @nistude, Download Here



Break your recipes into many single-purpose recipes, this makes them more modular
w/ the modular parts

What’s Cookin’ with Nathen Harvey

nagios v1.2.2

The nagios cookbook, now at version 1.2.2, has received a lot of updates lately. Previously you had to edit the default templates to add custom checks. Now you just need to add attributes, databag items, and utilize the new lightweight resource provider (LWRP) for defining NRPE checks.
Big thanks to Jake Vanderdray for making monitoring with nagios suck a little bit less!

annoyances v0.0.1

Matt Ray and Joshua Timberman, from OpsCode, have released an Annoyances cookbook. This cookbook fixes a number of minor operating sys tem-based annoyances. The are recipes are platform-specific.
On Ubuntu the cookbook will freshen up the apt repository and turn off AppArmor and byobu (beeyo-bu) On Red Hat flavors including CentOS and scientific linux, the cookbook will delete any preexisting firewall rules, turn off SELinux, un install apache, and remove any .bash_logout
One handy feature of this cookbook is that it will remove itself from the node’s runlist on completion.
Are there things that annoy you about your target Operating System? Fork this cookbook and submit a pull request!

pki v0.0.2

  • Sean O’Meara
  • Proof of concept PKI implementation, powered by inter-node convergence and stateful resource providers.

etchosts v0.1.0

artifact v0.9.3

  • Jamie Winsor
  • Provides your cookbooks with the Artifact Deploy LWRP which deploys a collection of build artifacts packaged into a tar ball. Artifacts are extracted from the package and managed in a deploy directory in the same fashion you’ve seen in the Opscode deploy resource or Capistrano’s default deploy strategy.

vagrant_extras v0.2.0

  • Fletcher Nichol
  • Extra fixes and shims for running your recipes in a Vagrant VM.

zabbix v0.0.25

gnome v0.0.2

x-windows v0.0.2

  • Eric Wolfe
  • Installs x-windows for Oracle requirements

linode v1.0.4

  • Wes Morgan
  • Collection of useful recipes for setting up Linodes
Many of the Opscode cookbooks were also recently updated. One of the changes that was recommended during the Opscode Community Summit back in December was to split up the opscode/cookbooks repository in to individual repositories, one for each cookbook. Much of the groundwork for doing this has been added to the cookbooks. This includes adding LICENSE and CONTRIBUTING files to each cookbook and moving the “changes” section to a new CHANGELOG markdown file with each cookbook. Some noteworthy updates include:
Other cookbooks updated in this release include:
For additional details, see Joshua Timberman’s “Groundhog Edition” cookbook release announcement that was posted to the chef user mailing list.
Do you have cookbook news that you’d like to share? Please drop a line to!

Show Notes

BryanWB’s provocative question of the Week

Will Chef open the same kind of high-paying freelance opportunities for sysadmins that Rails did for webdevs?

Panel Answer: Already is happening

Nikolay: nginx cookbook and passenger cookbooks have so much in common, so much overlap, good example that we need to make patterns more reusable.
Lusis: we already have a reusability mechanism w/ attributes
bryan: w/ only attributes, we have ugly code littered w/ case statements
nikolay: this leads to ugly recipes that looks like shell scripts
Lusis: <grumble />
ranjib: lwrps, definitions, attributes combine for reusability mechanism
nikolay: global namespace for cookbooks on chef community site sucks
everyone: we concur

OO Design Resources that Nikolay recommends:
Ranjib says:
There are other ways of reusability to consider such as roles and environments
Testing will lead to better patterns
Gang of Four patterns book worth a look

BryanWB: Gang of Four book too hard!

Lusis: Suck it up! If I can learn math, you can learn patterns.
We shouldn’t be afraid of hard stuff, like math!



Articles by M. Tim Jones, esp. linux and virtualization
Emacs tip: browsing compressed files w/ dired

window manager: awesome
chef: knife-github
building packages with fpm and using fpm-cookery


  • riemann - cool event processing tool
  • mcollective now support for windows too, so you can have dual boot systems with chef and mcollective, (chef controlling the grub.conf and mcollective triggering the chef run as and when necessary)


Thanks to Eric Reeves for our awesome intro music. Eric is in charge of Environment Management at Alert Logic, and a part time producer under the moniker “Litex”. 

you can check out more of his tunes at

    If you are interested in sponsoring the show, please contact BryanWB


    Great episode. Specifically the discussions on re-usability and cookbook standards. I often look at other cookbooks, mostly opscode, to get an idea on how it is supposed to be done. Though I think the fact that there is several ways to do something in Chef is what makes it great, having a standard for people to follow would be nice.