Skip to main content

Customizing Chef for Fun and Profit

Jon Cowie (Chef)
Operations
Location: 211 Level: Intermediate
Average rating: ****.
(4.30, 10 ratings)

Chef is an incredibly feature-rich and powerful tool, designed to provide a framework for users of any of the major Operating Systems to automate anything they want. Simply put, Chef is a generic platform which provides a number of built in tools, resources and services to facilitate this automation.

I’m going to take you on a whistlestop tour through the internals of a Chef run, exploring how everything fits together and the various places you can hook in custom code. We’ll learn about:

  • The stages of a Chef client run and how they interact
  • Ohai plugins
  • Start, exception and report handlers
  • Chef’s event dispatcher and formatters
  • The internal classes that Chef provides to power customization

I’m particularly going to focus on encouraging exploration in the source code of tools such as Chef and the power that this gives us to gain a deeper understanding of our infrastructure automation and how to make it work for our business needs.

I’m also going to try to help you decide when it’s appropriate to use each customization type and also whether or not you should customize – it would be a fallacy for me to tell you that just because you can customize something, you automatically should. As someone once said, ‘with great power comes great responsibility’.

Photo of Jon Cowie

Jon Cowie

Chef

Jon Cowie is a senior operations engineer at Etsy where he mixes his love of both coding and operations to try and solve interesting problems. He has created and open sourced a number of projects, including the Chef tools knife-spork and knife-preflight, and has spoken at several of O’Reilly’s Velocity conferences. He’s currently working on the upcoming O’Reilly book Customizing Chef (http://shop.oreilly.com/product/0636920032984.do)