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 –


Etsy Scaling vid from 2011

All well accepted practices by now, but still a good watch.


Food Fight Show on Chef Cookbook Best Practises

this google+ hangout, combined with this post and all it’s links, provides plenty of good discussion and ideas for Chef.


(short) history of DevOps

nice lil vid – i didn’t know some of these details of how DevOps emerged –

via http://itrevolution.com/the-history-of-devops/


Chef Lessons from Etsy

really good video from this year’s ChefConf::


Adding a Chef User

I’ve just started an ace new job and really enjoying getting to work with Chef. Coming from using Puppet for over a year, my head is still in the mindset of working out how to do things the Puppet way – some thing I’m finding better, some not so good, but all in all, it feels like a more ambitious project, and a lot of fun to play with.

One of the first things I’ve found is that the documentation isn’t so cohesive – there is a lot of it and it’s good, but nothing like the James Turnbull ‘Pro Puppet’ book to hold your hand and guide you. The one I found most useful initially was this post, however the one thing i wanted to get straight in my head was how to create admin users for Chef, which is glossed over in that brief tutorial, by using the web-ui. The Opscode site documentation for doing this can be found here, but again, kinda buried down there, and as it took me a while to find, I figured a quick post was worth it.

Aiight, so long winded introduction, but the gist of it is, after install you have one admin user and cert setup on the actual server during install which is for the webui. On my Debian Squeeze install, this live at /etc/chef/webui.pem and is mode 600, owned by user ‘chef’. We can use this user/cert to create a client user/cert for ourselves with:
sudo knife configure -i

^ Start with the URL for where you have installed the Chef server, then a name for your client. Notice where it asks for the existing admin username and location of the certificate – enter chef-webui for the user and the /etc/chef/webui.pem file i mentioned. Next it also asks for the validation client name and pem which is “a special account used to auto-register new nodes.” Go with the default clientname and again, the key file lives in /etc/chef.

If that all worked fine, you should now have two new files in your ~/.chef directory – your knife.rb file and a private key file.
As we ran that as sudo however, you’ll need to chown the files to your own username –
sudo chown -R $USER ~/.chef
Test that works by running
knife client list
which should then list the clients setup by the install like chef-validator and chef-webui, and most importantly your new username. If that worked fine, you can now copy the private key and knife.rb files to your own workstation, adjusting the file locations in the knife.rb as required.

With yourself now setup, you can create keys for other users with:
knife client create NEWUSER -d -a -f NEWUSER.pem
Securely copy that key to the new user and create/generate a suitable knife.rb file for them (e.g. by copying and adjusting your own), and you should be done, multiple admins!


scaling at dropbox

I highly recommend this DevOps Weekly mail out.

The latest one has a bunch of good links, and one i found especially was this “Scaling lessons learned at Dropbox, part 1“.


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..


Allspaw on Anticipation

// via John’s blog at Kitchen Soap //