I find myself running more and more Cassandra clusters and when we were on Chef 0.9.8 I was being lazy and just cloning my Cassandra cookbook per cluster. Not exactly a way to scale the manageability of your config
Now I’ve refactored the cookbook to allow me to manage multiple clusters by extracting the
initial_token from a databag. Once we start implementing the new Environments feature in Chef 0.10 I’ll be able to simplify this further.
I’m debating having the cookbook auto-generate tokens and assign them as well as re-generate/nodetool move/re-balance when I’ve added another node with that cluster specified in the databag. That’s a big project and for now I’m too much of a control freak to automate that, but I’m thinking on it.
I’ve also made it so the cookbook auto-generates the
cassandra-topology.properties for the
PropertyFileSnitch based off of location info stored in the databag.
Finally upgraded to Chef 0.10.6 from 0.9.8.
Hot, sweet, environments and encrypted data bag action.
Except… well… the chef-client would ocassionally die… quetly.
No log, no debug output, no exit codes, just poof… no more chef-client daemon.
(This is not the point there you guys tell me I should use cron or runit or daemontools or something to run chef, I’ve heard it)
The lovely folks at Opscode said that running on ruby 1.8.7 rather than ruby 1.9.2 was the culprit and then drew my attention to the super-happy-awesome Opscode Chef Omnibus installer here (avaliable as rpms, debs, tgz, etc..)
It installs (almost) everything you need into /opt and lets Chef run in it’s own ‘embedded’ ruby 1.9.2 environment keeping my system ruby clean.
I’m such a sad bastard.
I got stuck fixing a production issue and had to miss the inagural NYC Cassandra Meetup group
To attone, I figure I’d write a quickie Cassandra post.
Over the last few months we’ve been migrating our infrastructure over to the Chef platform for infrastructure automation. It is analogous to Puppet, which I’ve tinkered with in the past.
I’ll skip the debate over which is the better tool. There has been lots of discussion all over about it. Suffice it to say, we chose Chef for a myriad of reasons and this post isn’t a case study.
My first big chef project was migrating our Hadoop cluster on to it.