Skip to main content

Hudson PXE plugin 1.0 is released

Posted by kohsuke on May 11, 2009 at 11:17 PM PDT

Whether you recycle old PCs or use new ones as Hudson slaves, you have to first install an OS on a system. As the Hudson cluster I managed gets bigger, I find this more and more painful. You have to have a CD of the OS, and you have to have a working CD-ROM drive (somehow on recycled PCs, CD-ROM drives are often unreliable.)

Then the installation itself is rather boring, yet it's interactive. You have to answer multiple questions, for which your answers are always identical. After the OS gets installed, you have to go through a series of initial set up, like installing packages, pointing the package manager to a mirror, creating an user, etc.

On most Unix, these steps can be totally automated, by configuring installers to run with canned answers, plus a post-installation script. You can also eliminate the need of CD by network-booting your PC (AKA PXE boot.)

There are many documentats that show you how to do this, but they have a problem. Aside from the fact that none of them really talk about how you set up one PXE boot server to support multiple different OSes, it's all rather tedious, and I hate tedious things.

So I did what I normally do. Just push the job to Hudson! And that's how I wrote a plugin that makes this whole thing much simpler, and it is available now as Hudson PXE plugin. This is one of my many attempts to bring distributed builds closer and more affordable to people.

The plugin can be installed from your Update center, as usual. Currently it supports OpenSolaris, Ubuntu, Fedora, and CentOS, and OS support is extensible, so your contributions are appreciated. You first download the ISO images of those OSes (see Wiki for exactly which variation you need to download), then tell Hudson where those ISO files are. And that's all you need to do.

Now, put a PC on the same network as Hudson, start it, and press F12 to initiate a network boot. You'll see a menu of all the OSes that Hudson has, like this:

You can then choose to silent-install this OS, or interactively install it (convenient if you are installing your own PC, not Hudson slaves.)

Also, I should point out that this plugin works nicely with existing DHCP servers on the network. This plugin doesn't touch them at all. There's also a separate tool that you can use to install PCs on different networks from where Hudson master is running.

With a bit more work done on Hudson CLI, we should be able to automate the entire thing, up to the registration of a slave to Hudson. Wouldn't that be really nice? — power on a new PC, hit F12, let it run for an hour and you have a new Hudson slave, fully configured and ready for action!

Related Topics >>


If you are saying the feature should be available on its own outside Hudson, I agree in principle, but ripping off the piece into a stand-alone webapp outside Hudson is a bit of work. Where I work, I tend to need to set up the same OS that our software support, so we don't worry too much about disk consumption, (and build tools often need them anyway), but again, the core is extensible to support any network bootable OS, so I hope someone adds Knoppix or DamnSmallLInux or anything else. Finally, while this can be used to install a VM, we should be able to just replicate a pre-installed VM. For that, a different kind of work is needed.

Sound really nice. What about having another PXE server running, eg the server which is responsible for all the 'usual' installations in the company? I also think that a slave would benefit from a small OS like Knoppix or DamnSmallLinux. Or: automatically set up a VMware machine which runs a virtual appliance - or "copy" a VA to the new hardware...

Ah, that sounds like a real fun project. Any chance you could help us :-) ?

Now what about a plug-in to rebuild slaves with the correct OS and hook them automatically based on build load?

Yes. Stay tuned...

next step Hudson Cloud plugin for Eucalyptus? ;)