Differences between revisions 8 and 9
Revision 8 as of 2009-08-30 21:49:02
Size: 3783
Editor: godog
Comment:
Revision 9 as of 2009-09-02 18:04:32
Size: 3832
Editor: godog
Comment:
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
It is possibile to login into chroot `$name` with `schroot -c $name` If you want to just type commands inside the chroot $name:
{{{
schroot -c $name
}}}
will log you into the chroot.

Buildbot

There's a buildbot master currently running on video.dyne.org plus some slaves. The buildbot is listening on localhost:8090 so tunnel your ssh connection.

Buildmaster

The buildmaster is a normal system service and runs as buildbot user:

invoke-rc.d buildbot start|stop|restart

the homedir is at /var/lib/buildbot/freej/. Important files are master.cfg and twistd.log

Slaves

They run chrooted as user buildslave under /srv/chroot/<name>, this provides a clean separation without cluttering the master system and plus it is "easy" to add a new system/distribution.

Each <name> must contain a system like a regular developer with all dependencies needed to build freej from git (git/autotools/libs/etc) plus have buildbot installed (for the slave).

Currently installed and working chroots are jaunty64 and jaunty32.

Operating the slave chroots

Thanks to the almighty schroot it is easy to administer the chroots.

If you want to just type commands inside the chroot $name:

schroot -c $name

will log you into the chroot.

The buildslave chroots configured in /etc/schroot/schroot.conf and then "instantiated" (bindmounted) in named sessions.

Start:

name=<chrootname>
schroot -c $name --begin-session --session-name $name-buildslave
schroot -c $name-buildslave --run-session --user buildslave --directory /home/buildslave/freej -- nice make start

Stop:

name=<chrootname>
schroot -c $name-buildslave --run-session --user buildslave --directory /home/buildslave/freej -- make stop
schroot -c $name --end-session --session-name $name-buildslave

Log files are in buildslave home at /srv/chroot/<name>/home/buildslave/freej/twistd.log.

Creating a new debian-based buildslave chroot

  • Bootstrap a base system

sudo debootstrap --verbose --components main,contrib,non-free sid sid64 http://ftp.nl.debian.org/debian
echo "exit 101" > sid64/usr/sbin/policy.d && chmod a+x sid64/usr/sbin/policy.d
  • Add a proper stanza in /etc/schroot/schroot.conf.

schroot -c $name aptitude install build-essential
schroot -c $name apt-get build-dep freej
schroot -c $name
mkdir -p /home/buildslave && cd /home/buildslave
buildbot create-slave --usepty 0 freej localhost:9989 sid64 <password_here>
cp freej/Makefile.sample freej/Makefile
chown -R buildslave.nogroup /home/buildslave
  • Fill in freej/info/ with proper data.

  • Install required build-deps for freej:

aptitude install git-core build-essential cdbs libtool debhelper  pkg-config flex bison libsdl-dev libpng-dev libfreetype6-dev libfontconfig-dev libogg-dev libvorbis-dev libjpeg-dev libslang2-dev libtheora-dev libavcodec-dev libavformat-dev libswscale-dev libunicap2-dev libcwiid1-dev libfftw3-dev libjack-dev libasound-dev libhtml-template-perl python-all-dev python-central  swig libmozjs-dev  xulrunner-dev  libsdl-gfx1.2-dev  libx11-dev liblo0-dev libsamplerate-dev libcv-dev libshout-dev libsdl-ttf2.0-dev libsdl-image1.2-dev doxygen

For ubuntu use sudo debootstrap --verbose --components main,universe,multiverse jaunty jaunty64 http://nl.archive.ubuntu.com/ubuntu

Adding a new slave to buildmaster

  • Change /var/lib/buildbot/freej/master.cfg and add a new slave with name/password

  • Add the new slave to desidered builds
  • invoke-rc.d buildbot reload or invoke-rc.d buildbot restart

IDEAS

  • chroots as tarballs (requires some ram to work smoothly, saves disk but IO bound on instance begin/end)
  • chroots as lvm snapshots (makes any sense?)
  • don't parallelize builds on chroots to not load the host machine
  • add some sort of shared ccache (is it straightforward to have only one dir shared? what about multiple archs?)

FreejBuildbot (last edited 2010-04-26 11:46:05 by godog)