Libvirt Slaves Plugin

Plugin Information

Plugin ID libvirt-slave
Latest Release 1.6
Latest Release Date Apr 01, 2010
Plugin Central Plugin Central 3.2
Sources Subversion
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla
Hudson Core (latest) 3.3.3

Add Libvirt Hypervisor support to Hudson

Description

This plugin for Hudson CI adds a way to control guest domains hosted on Xen or QEMU/KVM. You configure a Hudson Slave, selecting the guest domain and hypervisor. When you need to build a job on a specific Slave, its guest domain is started, then the job is run. When the build process is finished, the guest domain is shut down, ready to be used again as required.

Requirements

For a communication with Hypervisors you need to install libvirt library on Hudson machine. This plugin comes with libvirt java binding, but is just an interface to the "real" C libvirt library. In your distribution you should have a package to install libvirt (ie yum install libvirt on RedHat/Fedora/Centos distributions).

Configuration

Hypervisor

The first step is the Hypervisor configuration. To create a new Hypervisor you need to add a new "Cloud" in the Hudson "Configure System" menu. 

The required parameters to setup are:

  • Hypervisor Type: QEMU / XEN to respect the virtual machines you have in your system
  • Hypervisor Host: Hostname or IP address to contact your hypervisor
  • Username: username to use for connection.

The connection to Hypervisor will be done using ssh, so you don't need to setup libvirt, exposing your services on tcp that could be a security hole in your infrastructure. Here an example of connection string will be used by Libvirt Slaves Plugin to create a connection with the hypervisor:

 xen+ssh://username@hostname:port/system

you can test you connection typing, from your Hudson Server:

 virsh connect xen+ssh://username@hostname:port/system

An important thing is the RSA public key exchange between Hudson Server and Hypervisor Machine: you need to add to .ssh/known_hosts file the rsa.pub file of your hudson user. This because, for an actual limitation in libvirt java library, it's impossible to provide via code the ssh password, that means hudson could not establish a connection if password request will be prompted.

If you need some other particular settings, you can click on the Advanced button to change the default parameters.

  • Port: ssh port, if in your hypervisor machine is different than 22
  • Hypervisor Url: by default xen and kvm expose the control api using system url. If, for any reasons, you don't have this default value you can provide configure with you parameter

To verify all you parameters you can click on Test button and check the output reported.

Slaves

Now you can setup your nodes in hudson and use them to build your projects.
On the creation page you just simply select the correct radio button to configure a libvirt slave.

Going ahead with configuration you can see a page that looks like the normal node creation page, with two combo box added. The first one where you have to select the hypervisor, and the second one for virtual machine selection.

If all is well configured you can tied jobs to your libvirt slaves and you will see that your machine will be started up before the build process.

Change Log

Version 1.6 (Apr 2, 2010)
  • Fixed problems with Libvirt on RedHat / Centos operating System
  • Added control for machine without libvirt library installed
Version 1.5 (Mar 30, 2010)
  • Fixed problem on Null object after Hypervisor reconnection
Version 1.4 (Mar 25, 2010)
  • Improvements in Hypervisor connection using libvirt
  • Added a missing help file
Version 1.3 (Mar 20, 2010)
  • Fixed problem with hypervisor reconnection after Hudson restart
  • Add a wait time before launching slave agent
Version 1.2 (Mar 10, 2010)
  • Fixed problem in contextual help files-
  • Catch exception on machine without libvirt installed
Version 1.1 (Mar 08, 2010)
  • No change in sources. A version just to fix a problem during release process.
Version 1.0 (Mar 07, 2010)
  • First version published

Labels:

plugin-slaves plugin-slaves Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.