Subcon – Cluster Revision Control with Subversion

Subcon is a cool little open source projects written by Kevin Murphy over at Renkoo which is now in a Google Code repository.

Subcon allows you to easily revision control your cluster. You add files like /etc/hosts to a ‘base’ role in subcon which you can then sync to the local box via:

subcon -n

You can then have separate roles like ‘www’ or ‘db’ which can hold specific files for that role. Say for example you want to revision /etc/apache2 you just add these file in a roles/www subcon directory and then you can apply the changes to the local box via:

subcon -n -owww

This can also be used for application distribution. We recently migrated to using a version of memcached with Facebook patches which allow for reduced CPU load and greater memory capacity. Instead of compiling this on every box or building an apt package I just created a new subcon role and on each box where I want to install the updated build I just run:

subcon -n -omemcached-facebook

Which pulls down all files associated with this install.

Since subversion is smart and can automatically add files as binary the checkout works just fine.

Since its based on subversion it can also support svn:externals which means you can link up subversion repositories.

This vastly simplifies managing larger clusters of machines. You can make sure that all configuration changes are applied across all machines without much of a headache.

In the past I’ve used CVSup which is actually a pretty decent package but it doesn’t look like it will support 64bit boxes anytime soon. It also doesn’t support advanced features of subversion like svn:externals, automatic binary detection, etc.

RIP CVSup. Long live subcon!



%d bloggers like this: