Cryptocracy

A blog

Scale Summit 2014

So, Scale Summit has now been and gone. As the spiritual descendant of UK Scale Camp (which remains my unconference benchmark) I’d been looking forward to this one since I heard about it. An unconference, if you haven’t been to one, puts the content in the hands of the participants. The general idea is to gather a bunch of folks with a shared interest, keep them fed and watered, and give them space to talk. On the day, participants propose topics to discuss, set a schedule, then make it happen.

As you might expect, this is a bit of a gamble – sometimes magic happens, sometimes you get a damp squib.

♻ Using Test Doubles in ChefSpec

One of the great beauties of ChefSpec (and of course Chef) is that at
its heart it’s just Ruby. This means that at almost any point you can
reach into the standard Ruby development toolkit for your testing or
infrastructure development needs. Hopefully this little example will
be helpful to you.

Although you don’t need to know Ruby to be get started with Chef, a willingness to learn will be rewarded. This is especially true when it comes to testing. This post by Stephen Nelson-Smith provides a gentle introduction to an essential tool in the testing toolkit – stubs – that should be accessible to most Chef users.

cfgmgmtcamp.eu 2014

Last week I went to Gent for cfgmgmtcamp.eu, a two day conference bringing together various config management communities. Around 300 people attended, representing (at least) Puppet, Chef, CFEngine, Ansible, Saltstack, and Juju. It was a great conference, with loads of interesting talks (no video, unfortunately) and a fantastic hallway track.

There were a bunch of good sessions in the Chef community room, and that (plus the hallway conversations) got in the way of spending any time in the other community rooms. I’m a little disappointed about that, though I’m sure the same would be true if I’d missed out on the Chef sessions.

I presented a talk about Orchestrating Chef with MCollective. It’s been a long time since I spoke, and I wasn’t particularly happy with how it went – this was the one session where I was glad to have no video! I personally learned a lot in the process, and would like to give a few (shorter) talks this year to work on this skill. Hopefully the folks who sat through it learned a thing or two as well.

Common themes in presentations and discussion were continuous delivery, testing (and TDD) for infracode, and orchestration. In “Be More Pushy”, Michael Ducy talked about Opscode’s orchestration system, which I’m looking forward to using. Ulf Mansson and George Miranda both talking about building continuous delivery pipelines, and Andrew Crump explained how Foodcritic works (and how to extend it).

There were no talks scheduled in the Chef room for the final few hours, so this became a space for hacking and lightning talks. Highlights were Andrew Crump showing me how to fix a couple of bugs in Foodcritic, Adam Jacob demonstrating test-driven development, and a lightning talk (I didn’t catch the presenter’s name, sorry) about community cookbook governance, which spurred a much longer conversation on the subject.

I departed the conference wishing it had been longer, and looking forward to the next one. Now that I’m home, I’m wishing I had more time to apply the various things I learnt while I was there. All in all, highly recommended.

Cooking With Jenkins (and Test-Kitchen, and Docker)

The recent 1.0 release of test-kitchen (and the existence of kitchen-docker) gave me the push I needed to start using Jenkins to test my Chef cookbooks. Although I’ve heard plenty of people talk about doing this, I struggled to find much in the way of guidance or detailed descriptions.

Finding nothing to crib from, I decided to first build a spike to better understand what was involved. The result is Cooking With Jenkins, a cookbook and Vagrantfile that installs Docker and Jenkins, configured to run tests on a few cookbooks. If you’re new to these tools, I hope it will be a useful example to help you get started. If you’re already using them, your suggestions for improvement will be rewarded with thanks and beverages.

Vagrant, VMware, and Berkshelf

So, Vagrant is a great tool, which costs you nothing to use if you pair it with Virtualbox. Unfortunately, Virtualbox is somewhat less awesome in heavy use. VMware does a better job of things, and Vagrant added support for it with a paid-for plugin. As the first commercial product of Hashicorp (Vagrant’s developer), this is a nice way to say thankyou for Vagrant while getting a better user experience too.

In theory.

♻ The C2I2 Hypothesis

Zed Shaw:

I worked out a simple method to give you a quick idea whether a
project is even worth attempting. This method is based on a simple
revelation about how clients and projects can be divided generally
into Customer, Collaborator; Implementation, Invention. I call this “The
C2I2 Hypothesis” since it’s not a theory yet, never will be, and you
should probably just use it as a way to think about the problem
yourself.

Food for thought.

Premature Publication, and Other Problems

It happened some time during primary school, I’m not sure exactly
when. I was old enough to be given homework, but not so old that
failing to do it had real consequences. I was already a bit of a
goody two-shoes, and getting good marks was pretty important to me.

So, I’d been given some homework, and I got into trouble for not doing
it. The truth was that I had done it, but I didn’t think I’d done it
very well - so I lied, and said I hadn’t done it at all. I figured it
was better to look like I hadn’t even tried, than to have given it a
good shot and come up short.

I shared that anecdote with a few people over drinks at DevOpsDays, the outward expression of a train of thought concerning my failure to blog. It even occurred to me as a neat framing device for a post reflecting on that failure, considered as part of an ongoing struggle with perfectionism. Neat, but disingenuous.

Dick Jokes and DevOps

Update: This post has flaws that are addressed in a follow-up article.

So, someone made a dick joke on a devops mailing list.1

It was pretty benign, as such things go – an allusion to penis enlargement in the context of a discussion about managing spam. I’d have made the same joke in a group of friends, though perhaps not in front of my mother. Certainly not in front of a nun, or on a global mailing list largely populated by people who I do not know, and who do not know me.

Errata for Test-Driven Infrastructure with Chef (2nd Ed)

Update: I’m very happy to update this post to note that Test Kitchen 1.0 has been released. See the announcement on the Opscode blog, and check out the KitchenCI home page.

A couple of years ago, Stephen Nelson-Smith wrote a little book called Test-Driven Infrastructure with Chef. Somewhat ahead of its time, it gave a brief introduction to the idea of outside-in, test-driven development, in the context of infrastructure code. Since then, the rest of the world has started to catch up, and a variety of tools and community practices have grown up around the idea.

Last month, the greatly revised and expanded second edition of the book was released. I mean to write a full review when I’ve spent some more time with the book, but here’s the short version: if you use Chef, buy it.

That having been said, nothing in life is perfect, and that’s true here. The book optimistically assumes that Opscode (or whoever) would have managed to make a 1.0 release of Test-Kitchen by now. They haven’t, so you’ll currently have issues following some of the instructions when the recommended toolchain is introduced in Chapter 7.