Announcing the IcedTea buildbot - buildslave configuration tutorial

Xerxes Rånby xerxes at zafena.se
Mon Feb 21 07:03:52 PST 2011


On 2011-02-21 10:31, Mark Wielaard wrote:
> Hi hackers,
>
> Over the last few weeks Xerxes and I have been experimenting with a
> buildbot setup which you can see at:
> http://builder.classpath.org/icedtea/buildbot/waterfall
>
> The idea is that everybody who cares can add a buildslave setup to do a
> build and check for the configuration and architecture they care about.
>
> Currently all buildslaves are based on Debian derivatives and cover
> ia32, x86_64 and some arm architectures are. It does build various
> alternative runtime setups (cacao, shark, zero). And the slaves build
> various variants of icedtea6, icedtea7, icedtea-web (and the testrepo).
>
> If you have a spare machine with a dedicated internet connection that
> could do builds of some configuration you care about please let us know
> and we will try to add it as slave. 

Thank you Mark for the nice announcement.

I would like to contribute with a small tutorial on how to setup a new buildslave.

# First of all you need all dependencies needed to build OpenJDK installed, on Debian derivatives you can install them all by running:
sudo apt-get build-dep openjdk-6

# Then we need to fetch mercurial since the buildbot will fetch all new sources to build using hg.
sudo apt-get install mercurial

# And finally we need to install all dependencies needed to run buildbot
sudo apt-get install buildbot

# I highly recommend you to sync the builders system clock with UTC
# A quick way to do it are to sync the system clock using ntpdate.
sudo apt-get install ntpdate
sudo ntpdate-debian

# On my builders I have decided to run the upstream version of buildbot-slave.
# The following commands will download and install the upstream version.
wget http://buildbot.googlecode.com/files/buildbot-slave-0.8.3.tar.gz
tar zxvf buildbot-slave-0.8.3.tar.gz
cd buildbot-slave-0.8.3
./setup.py build
sudo ./setup.py install

# 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

# 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

#### 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

# 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

# Edit bot information
# This information will be visible on the buildmaster webpage.
# example: http://builder.classpath.org/icedtea/buildbot/buildslaves/squeeze-armv5tel
buildbot at openrd-client:~$ vi icedtea/info/host
buildbot at openrd-client:~$ vi icedtea/info/admin

# Start the bot!
buildbot at openrd-client:~$ ./startbot.sh
buildslave not running.
Following twistd.log until startup finished..
2011-02-21 15:12:07+0100 [-] Log opened.
2011-02-21 15:12:07+0100 [-] twistd 10.1.0 (/usr/bin/python 2.6.6) starting up.
2011-02-21 15:12:07+0100 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2011-02-21 15:12:07+0100 [-] Starting factory <buildslave.bot.BotFactory instance at 0x664878>
2011-02-21 15:12:07+0100 [-] Connecting to builder.classpath.org:9989
2011-02-21 15:12:07+0100 [Broker,client] message from master: attached
The buildslave appears to have (re)started correctly.

# Have fun!
# Keep a eye on the buildmasters overview page to spot problems with the bot.
# http://builder.classpath.org/icedtea/buildbot/waterfall
#
# I have attached a logfile that display all dependencied that got installed by the commands above
# for people that do not run Debian derivatives.

Cheers
Xerxes

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildslave.setup.log.txt
Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110221/4303713a/buildslave.setup.log.txt 


More information about the distro-pkg-dev mailing list