Posts Tagged ‘ec2’

Hudson and Amazon EC2 – the sequel

June 28th, 2009

A while back I talked about getting Hudson running with EC2-based slaves.  I had some issues – some self-inflicted like forgetting to add the IP address of the Hudson server to the appropriate EC2 Security Group to allow access on port 22 – and some Hudson idiosyncrasies.  Now, however, I’ve got things running and am building Hudson jobs for Facter and Puppet.

One of the ironic key issues for us is that we’re testing a configuration management system but we can’t use that system because RUBYLIB issues mean that there is some bleed through between the installed Puppet version and the version being tested.  So instead the useful Hudson EC2 plug-in allows an init script to be run to prep each EC2 slave.  For each slave we run a simple set of commands that retrieves a script designed to bootstrap the host. In our case we do:

cd /tmp
wget http://pelin.lovedthanlost.net/hudson/debian/ec2-explode
chmod 0755 /tmp/ec2-explode
/tmp/ec2-explode

The ec2-explode script installs all the required packages and performs some needed Hudson set-up. I’ve got a bunch of init scripts for different platforms and the EC2 plug-in automatically installs a Java JDK after the init script is run. The slave is then ready to run the tests. And simple…

Hudson and Amazon EC2

June 8th, 2009

So my biggest gripe with Hudson is slave nodes. In Puppet land we need to run our tests on a wide variety of platforms – it’s a system/configuration management tool that runs on just about every flavour of *nix (and soon to be Windows) around: Linux (a bucket load of distros), *BSD, OSX, AIX, Solaris, HP-UX, amongst others. We need to ensure it builds, runs and configures things on these platforms and that new features and functions don’t break things. To do this there is a huge management overhead – especially as build/test is generally two or three people – mostly Luke and I.

In this process I’ve had many struggles with getting people to submit slaves and with managing my own slave node network for Hudson. It’s bloody annoying to have to fight RUBYLIB issues, Gem versions, installed versions of Puppet and Facter and a dozen other issues with running tests on slaves before you can even identify and fix a failed test.

I finally threw in the towel and decided to look at some other CI engines – perhaps my initial look and selection of Hudson had been premature.  But another review and installation of a wide variety of tools suggested to me that Hudson was the right choice. So an impasse.

Then along came the Hudson Amazon EC2 plug-in.  It allows Hudson to run up Amazon EC2 instances when required as slaves.  This means with a few judicious choices of AMIs I can quickly run up a test farm that covers all my requirements – Linux, Solaris, even Windows when we merge in the new Windows code (0.25.0beta2 I hope).  It’s not quite working yet – for reasons that aren’t 100% clear to me yet. :)   But it’s on the right path and I hope it’s going to make life much easier.  More on how it all works … when it all works..

UPDATE:  It now works – mostly a PEBCAK issue – the plug-in requires that the EC2 Security Group is configured to allow a connection on port 22 from the Hudson master.  Next steps some proper implementation… :P