Fork me on GitHub

Test-Driven Infrastructure with Chef

Wed Mar 28 00:00:00 -0700 2012

I thought Test-Driven Infrastructure with Chef was fantastic! It offers a great, no-nonsense introduction to Chef and the concept “Infrastructure as Code.”

I poked around the Chef wiki before reading this book, but I couldn’t find a good, concise introduction to the framework. I understand the concepts of nodes, roles, resources, recipes, cookbooks, etc. but I was missing a guide that would tie it all together for me. Turns out, this book is that guide! And it also introduces the cucumber-chef tool and shows how to build recipes and cookbooks test-first.

The book introduces “Infrastructure as Code,” test-driven development, Chef, and cucumber-chef, and then proceeds to a simple example using Chef to provision a shared Linux server. The recipes for the server are developed test-first, demonstrating both the technique and the workflow.

Overall, this book is the best introduction to Chef I’ve come across, and after reading it I feel confident in my ability to start writing my own recipes test first.

The biggest drawback of the book is that is short. Although it covers a great deal of material in so few pages, I would have liked a few more chapters at the end that explored more advanced topics, or dug into some of the other topics in more detail. As it is, I can’t wait to get my hands on a copy of the author’s next book, Chef: The Definitive Guide (perhaps that was his intent all along! ;P).