ReferencePlatforms/BuildBot
From MozillaWiki
Contents
BuildBot Reference Installation Instructions
Steps already completed on the CentOS 5 Image
These were the steps used to deploy a test BuildBot master/slave on Linux; we're evaluating BuildBot for certain tasks, the below configuration is subject to change.
win32 specific instructions MacOSX specific instructions
Make directories
mkdir -p /tools/dist/logs mkdir -p /builds/logs
Install python
http://wiki.mozilla.org/ReferencePlatforms/Linux#Build_Python_2.5
Initial Setup Steps
export PYTHONHOME="/tools/python" export PATH="/tools/python/bin:$PATH"
Installing Zope Interface
cd /tools/dist/ wget http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz tar xfvz zope.interface-3.3.0.tar.gz cd zope.interface-3.3.0/ python setup.py install --prefix=/tools/zope-interface-3.3.0 cd /tools; ln -s zope-interface-3.3.0/ zope-interface export PYTHONPATH="/tools/zope-interface/lib/python2.5/site-packages/:$PYTHONPATH"
Installing Twisted
cd /tools/dist/ wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/TwistedCore-2.4.0.tar.bz2 wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2 tar xfvj TwistedCore-2.4.0.tar.bz2 tar xfvj Twisted-2.4.0.tar.bz2 cd TwistedCore-2.4.0 python setup.py install --prefix=/tools/twisted-core-2.4.0 pushd /tools/; ln -s twisted-core-2.4.0/ twisted-core; popd export PYTHONPATH="/tools/twisted-core/lib/python2.5/site-packages:$PYTHONPATH" cd /tools/dist/Twisted-2.4.0/ python setup.py install --prefix=/tools/twisted-2.4.0 cd /tools; ln -s twisted-2.4.0 twisted export PYTHONPATH="/tools/twisted/lib/python2.5/site-packages/:$PYTHONPATH"
Installing Mercurial
wget http://www.selenic.com/mercurial/release/mercurial-0.9.5.tar.gz tar -zvxf mercurial-0.9.5.tar.gz cd mercurial-0.9.5 export PYTHONHOME="/tools/python" export PATH="/tools/python/bin:$PATH" python setup.py install
Installing Scratchbox
As root:
Add 'vdso=0' to the kernel parameters.
wget http://repository.maemo.org/stable/chinook/maemo-scratchbox-install_4.0.1.sh chmod a+x ./maemo-scratchbox-install_4.0.sh ./maemo-scratchbox-install_4.0.sh -s /scratchbox /scratchbox/sbin/sbox_adduser cltbld yes
As cltbld:
Comment out the PYTHONHOME and PATH entries in ~/.bash_profile
wget http://tablets-dev.nokia.com/chinook/maemo-sdk-install_4.0.1.sh chmod +x maemo-sdk-install_4.0.sh bash maemo-sdk-install_4.0.sh /scratchbox/login wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.9.tar.gz tar -xzvf libIDL-0.8.9.tar.gz cd libIDL-0.8.9 ./configure --prefix=/usr make make install
Remove the comments from the PYTHONHOME and PATH entries in ~/.bash_profile
Installing Nagios NRPE Daemon
wget http://dag.wieers.com/rpm/packages/nagios-plugins/nagios-plugins-1.4.9-1.el5.rf.i386.rpm wget http://dag.wieers.com/rpm/packages/nagios-nrpe/nagios-nrpe-2.5.2-1.el5.rf.i386.rpm wget http://dag.wieers.com/rpm/packages/nagios-nrpe/nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm rpm --nodeps -i *.rpm chkconfig --level 235 nrpe on # todo: make sure this is right after configs get checked in cvs co -d nagios mozilla/tools/nagios mv nagios/nrpe-linux.cfg /etc/nagios/nrpe.cfg
Steps to be completed on a fresh VM
You should have a /builds drive added to the VM before completing this section.
Move Scratchbox
- Boot into single user mode (append 'init=/bin/sh' to the kernel params from grub).
- mount -o remount,rw /
- mv /scratchbox /builds
- ln -s /builds/scratchbox /scratchbox
- mount -o remount,ro /
- Reboot the VM.
Installing BuildBot
export PATH="/tools/twisted/bin:/tools/twisted-core/bin:$PATH" cd /tools cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d buildbot-trunk mozilla/tools/buildbot cd /tools/buildbot-trunk export PYTHONPATH=.:$PYTHONPATH python setup.py install --prefix=/tools/buildbot-trunk cd /tools/dist cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d botrunner mozilla/tools/botrunner.py cp botrunner/botrunner.py /tools/buildbot-trunk/bin/ rm -rf botrunner/ cd /tools; ln -s buildbot-trunk buildbot
Create the Buildbot User
(...or you could use an existing account if you prefer)
useradd -m buildbot passwd buildbot
Final Configuration
Add the appropriate paths to the Buildbot user's .bash_profile
echo 'export PYTHONHOME="/tools/python"' >> ~/.bash_profile echo 'export PYTHONPATH="/tools/buildbot/lib/python2.5/site-packages:/tools/twisted/lib/python2.5/site-packages:/tools/twisted-corelib/python2.5/site-packages/:/tools/zope-interface/lib/python2.5/site-packages/"' >> ~/.bash_profile echo 'export PATH="/opt/local/bin:/tools/buildbot/bin:/tools/twisted/bin:/tools/twisted-core/bin:$PYTHONHOME/bin:$PATH"' >> ~/.bash_profile
Notes about Centos5
- change default vnc bit-depth to 32bpp.
- modified /etc/sysconfig/vncserver's args to include -depth 24