devops

Berkshelf - the missing piece

If you've been following my past few posts, you've seen i was investigating how best to integrate the plethora of Chef testing tools that've been coming out — foodcritic, chefspec, test-kitchen, mini-test — and although not testing tools per se, Berkshelf and Vagrant are the other pieces of the puzzle… but how to fit them all together? What is the directory structure for keeping your Berkfile - at the top of the repo? Inside a cookbook directory? How many Vagrant files am I going to create here?

If, like myself, you weren't along at this year's ChefConf 2013, you may also have missed on a major conceptual shift that has happened. Instead of the all-inclusive Chef-repo design pattern, as implied by the OpsCode Chef Repo - https://github.com/opscode/chef-repo - which, when used with all the community cookbooks out there, creates a mess of forked, modified and sub-moduled cookbooks and recipes.

The conceptual shift away and now recommended way, is to treat each cookbook as a separate piece of software and to give it it's own git repo, keeping them separate from from your Chef-repo. This combined, with a distinction between Library and Application cookbooks, and then bundled together via Berkshelf, enables a much cleaner and modular way of working. When you accept this move, it's much easier to then fit all the testing pieces together as they all live within each separate cookbook/repo.

This Comment Thread was what really drew it together for me, and then to fully clarify this way of working, watch Jamie Winsor's ChefConf talk which is the original starting point:

Mo' Chef Testing

Following on from my last post about Test Driven Chef, this latest Food Fight show is a great roundup of the current testing tools landscape -

Test-Driven Chef

I'm looking to start using Test-Kitchen and Berkshelf, and basically trying to get my head round setting up a proper test driven Chef setup.

I found this video from last year to be quite a good introduction to some of the setup -

jedberg talk at Airbnb

I was along at this talk last year, and just now found it online - was one of the most informative talks i've been to, learned loads from it -

some fav Velocity talks

Velocity was on last week, and I was following along enviously on twitter - I'm making a promise to myself that I'll be along in person next year!

Quite a few of the talks now appearing online - here's a couple I've watched so far..