Announcing the IcedTea buildbot - buildslave configuration tutorial

Mark Wielaard mark at klomp.org
Tue Feb 22 00:58:18 PST 2011


On Mon, 2011-02-21 at 16:03 +0100, Xerxes Rånby wrote:
> I would like to contribute with a small tutorial on how to setup a new buildslave.

Nice! Thanks for writing this up.
Maybe add it as icedtea/README to the buildbot hg repo?
(note there are directories under the buildbot hg repo in case we want
to put other masters on builder.classpath.org, for now there is just the
icedtea one though)

> # Test the installed buildslave
> # python-mock are a unittest framework for python and can be used to test if the built buildslave works as expected
> # When running the tests you should only see a lot of green [OK] displayed and the test should end with something like:
> # Ran 100 tests in 4.937s
> # PASSED (successes=100)
> sudo apt-get install python-mock
> PYTHONPATH=. trial buildslave.test

One note on Fedora here. Sadly it has a package called mock that clashes
with the global python namespace which makes running the tests almost
impossible. It should still al work though. There is a Fedora bug about
this: https://bugzilla.redhat.com/show_bug.cgi?id=601725

> # Setup the buildslave wget cache wrapper
> # This optional *hack* makes the builders wget cache all downloaded OpenJDK drops between builds.
> sudo mkdir /home/wgetcache
> sudo chmod a+w /home/wgetcache
> sudo chmod a+r /home/wgetcache
> wget http://icedtea.classpath.org/hg/buildbot/raw-file/15bb449380ba/buildslave/tools/wget.cache.wrapper
> sudo mv /usr/bin/wget /usr/bin/wget.real
> chmod +x wget.cache.wrapper
> sudo mv wget.cache.wrapper /usr/bin/wget

Whoa, install system wide?
Maybe just add it as alias or in the home bin PATH of the buildslave?

> #### OK all dependencies to run the buildslave and build OpenJDK are met,
> # now we simply need to decide a place for the buildslaves workdirectory to live.
> # and which user to run the slave.
> 
> # Install the bot by running buildslave create-slave
> # The buildslave-name and password are given by the owner of the buildmaster.
> buildslave create-slave /var/lib/buildbot/icedtea builder.classpath.org:9989 buildslave-name password

People should really just checkout the master.cfg file and hack their
slave in. You can set a name, add it to the schedulers you are
interested in, and setup the build steps to get the right configure
arguments and make check steps that are appropriate for your build.
Then just post the patch to the list. If it looks fine, it will be
committed to the master.cfg, installed on the master and you will get
your "secret password" by private email.

> # Create a buildslave launcher script
> echo "cd /var/lib/buildbot/icedtea
> export LANG=
> buildslave stop /var/lib/buildbot/icedtea
> buildslave start /var/lib/buildbot/icedtea" > startbot.sh
> chmod +x startbot.sh

For my slaves I have also this:
$ sudo -u buildslave crontab -l
@reboot /usr/local/bin/buildslave start /usr/local/build/buildslave/icedtea

> # Have fun!
> # Keep a eye on the buildmasters overview page to spot problems with the bot.
> # http://builder.classpath.org/icedtea/buildbot/waterfall

There is also the irc bot in channel #openjdk.
And hopefully we will have the mail target to send emails soon.
See the master.cfg, it is disabled atm.

Cheers,

Mark




More information about the distro-pkg-dev mailing list