[Buildbot-devel] A tool for using Buildbot with KVM virtual machines

Kristian Nielsen knielsen at knielsen-hq.org
Mon Jan 18 14:00:47 UTC 2010


I have been using Buildbot and KVM very successfully for doing building and
testing of Debian/Ubuntu/Centos packages of MariaDB. Much of the techniques
used, including a small tool I wrote for this purpose, are actually quite
generic, so I thought they might be useful to others using Buildbot.

The tool "runvm" is a wrapper around KVM that allows one to do basically this
in a Compile step in Buildbot:

    f.addStep(Compile(command=["runvm", "vm-image.qcow2", """
    cvs checkout myproject
    cd myproject
    ./configure
    make
    """]))

to run a build inside a virtual machine "vm-image.qcow2" set up in whatever
way one needs. This is useful to build on a large number of different
OSes/distros without needing to maintain them all running on a network, each
with a Buildbot slave configured etc.

I wrote this up in some more detail, in case others could benefit from
something similar:

    http://kristiannielsen.livejournal.com/11007.html

Also, if someone thinks it would make sense, I could maintain the runvm script
inside the Buildbot distribution (currently it is in a MariaDB-specific
repository on Launchpad). It is mostly useful for specialised setups I guess,
so I haven't really made up my mind whether it makes sense to include it in
Buildbot. Python proponents may also oppose it on the grounds that it is
written in Perl ;-)

Hope this helps,

 - Kristian.




More information about the devel mailing list