ReferencePlatforms/Linux-CentOS-5.5

From MozillaWiki
Jump to: navigation, search

This is an experimental reference platform being deployed on KVM servers in scl1. It's based on the raw CentOS-5.5 image, and IT's puppetizing process. The idea is that, aside from getting puppet installed, the entire slave configuration is specified by puppet.

This is not tested to work as a buildslave!

From a Raw Install

scp root@buildbot-master06:/etc/yum.repos.d/* /etc/yum.repos.d/
scp root@buildbot-master06:/etc/pki/rpm-gpg/* /etc/pki/rpm-gpg/
yum clean all
yum -y update glibc yum* rhn* rpm* dnsmasq lftp mtr rsync syslinux udftools

Note that none of the above repos have an old enough version of puppet, so..

scp linux-ix-ref:/var/cache/yum/epel/packages/puppet-0.24.8-4.el5.noarch.rpm .
# get deps
yum -y install puppet
rpm -e puppet
rpm -i puppet-0.24.8-4.el5.noarch.rpm
mkdir -p /var/lib/puppet/ssl/{private_keys,certs} /var/lib/puppet/state
chown -R puppet /var/lib/puppet

Set up some stuff puppet doesn't know to set up (yet - see bug 640706)

mkdir /builds
mkdir /builds/slave
chown cltbld /builds/slave

to fix

err: //Node[build]/base/centos5/Package[libnotify-devel]/ensure: change from absent to present failed: Execution of '/bin/rpm -i --oldpackage http://scl-production-puppet.build.scl1.mozilla.com/production/centos5-x86_64/build/RPMs/libnotify-devel-0.4.2-6.el5.x86_64.rpm' returned 1: error: Failed dependencies:
       dbus-devel >= 0.90 is needed by libnotify-devel-0.4.2-6.el5.x86_64
       dbus-glib-devel >= 0.70 is needed by libnotify-devel-0.4.2-6.el5.x86_64
       glib2-devel >= 2.2.2 is needed by libnotify-devel-0.4.2-6.el5.x86_64

run

yum install dbus-devel dbus-glib-devel glib2-devel

giving

(1/10): dbus-glib-devel-0.73-10.el5_5.x86_64.rpm 
(2/10): dbus-glib-devel-0.73-10.el5_5.i386.rpm   
(3/10): pkgconfig-0.21-2.el5.x86_64.rpm          
(4/10): dbus-libs-1.1.2-15.el5_6.x86_64.rpm      
(5/10): dbus-libs-1.1.2-15.el5_6.i386.rpm        
(6/10): dbus-1.1.2-15.el5_6.x86_64.rpm           
(7/10): glib2-devel-2.12.3-4.el5_3.1.i386.rpm    
(8/10): glib2-devel-2.12.3-4.el5_3.1.x86_64.rpm  
(9/10): dbus-devel-1.1.2-15.el5_6.x86_64.rpm     
(10/10): dbus-devel-1.1.2-15.el5_6.i386.rpm      

This one

notice: //Node[build]/base/centos5/buildslave::cleanup/Exec[find /tmp/* -mmin +15 -print | xargs -n1 rm -rf]/returns: executed successfully
err: //Node[linux-hgwriter-slave03.build.mozilla.org]/vm/Mount[builds]/ensure: change from present to mounted failed: Execution of '/bin/mount -o noatime /builds' returned 32: mount: special device /dev/sdb1 does not exist

requires using a 'kvm' class instead of 'vm' from the node, and that has some knock-on effects in other dependencies, sadly - see bug 640706

Start running puppet

puppetd --test --server=$whatever

Once that's done, make puppet and buildbot start at boot:

chkconfig puppet on

To get a working buildslave

Execute the instructions outlined in https://developer.mozilla.org/en/Linux_Build_Prerequisites, specifically:

yum install \
  cvs zip gcc-c++ glib2-devel gtk2-devel fontconfig-devel libnotify-devel \
  libIDL-devel alsa-lib-devel libXt-devel freetype-devel pkgconfig \
  dbus-glib-devel curl-devel autoconf213 xorg-x11-proto-devel libX11-devel \
  libXau-devel libXext-devel wireless-tools-devel glibc-static libstdc++-static yasm \
  mesa-libGL-devel

You then need the packages to run the framebuffer display for testing:

yum install \
  metacity xorg-x11-server-Xvfb