ReferencePlatforms/Linux-CentOS-5.0 64-bit
This procedure will re-create the CentOS 5.0-based reference VM image.
WARNING: This doc is very likely to be missing changes
Contents
- 1 Things Done For You
- 1.1 Version 1
- 1.1.1 Install CentOS 5.0 from CDs
- 1.1.2 Package Selection
- 1.1.3 Some Sys-prepping
- 1.1.4 Install Sun Java JDK
- 1.1.5 Make directories
- 1.1.6 Make GCC 4.2.3
- 1.1.7 Build Python 2.5.1
- 1.1.8 Initial Setup Steps
- 1.1.9 Installing Zope Interface
- 1.1.10 Installing Twisted
- 1.1.11 Installing Mercurial
- 1.1.12 Installing Nagios NRPE Daemon
- 1.2 Puppet Installation
- 1.3 Post puppet packages
- 1.1 Version 1
Things Done For You
Version 1
Install CentOS 5.0 from CDs
CentOS-5.0-x86_64-bin-DVD.iso
TB: Thunderbird build clients use a separate /buildbot partition of 80GB. Now that we reboot after each build, be sure to "tune2fs -c 0" the buildbot partition to avoid an fsck of it every 20 reboots.
Package Selection
The Easy Way: the installer kickstart file.
The Hard Way:
While installing, select a the GNOME Desktop and then select Custom package development; the following categories were selected:
- Desktop Environments
- Gnome Desktop Environment
- Applications
- Editors
- Text-based internet
- Add lynx
- Development
- Development Tools
- Development Libraries
- X Software Development
- GNOME Software Development
- Legacy Software Development
- Servers
- Turn all off, except for "Printing Support
- Base System
- Turn off Dialup Networking
- Turn on System Tools
Some Sys-prepping
On first boot, CentOS will ask some questions:
- Turn the firewall off (we run our build machines on their own network, behind a firewall)
- Disable SELinux
- Enable NTP
- Login; install VMwareTools-3.0.1-32039.rpm
- vmware-config-tools.pl
- add clock=pit and vdso=no lines to /boot/grub/grub.conf
- turn on syncTime in VMware config
- for s in auditd avahi-daemon acpid bluetooth cpuspeed hplip hidd mcstrans pcscd ntpd cups cups-config-daemon mdmonitor openibd smartd pcmcia isdn atd gpm anacron autofs apmd kudzu yum-updated; do chkconfig $s off; done
- chkconfig vncserver on
- Copy over cltbld's ssh keys from another tinderbox
- Edit /etc/mail/sendmail.cf and add mail.build.mozilla.org as the "Smart Relay"
- rm /etc/sshd/ssh_host_*
Add the following lines to ~/.bash_profile
export CVS_RSH=ssh export JAVA_HOME=/builds/jdk export TBOX_CLIENT_CVS_DIR="/builds/tinderbox/mozilla/tools"
Install Sun Java JDK
Note: we should archive this binary somewhere
- Go to http://java.sun.com/javase/downloads/
- Click through to JDK 5.0 Update 15
- Download the "Linux self-extracting file"... not the RPM
8c560eda470a50926b9e8dab2c806a25 jdk-1_5_0_15-linux-amd64.bin
- Save to /tools
cd /tools chmod 0755 ./dist/jdk-1_5_0_15-linux-amd64.bin ./dist/jdk-1_5_0_15-linux-amd64.bin # type 'yes' to accept the license ln -s jdk1.5.0_15/ jdk
Make directories
mkdir -p /tools/dist/logs mkdir -p /builds/logs
Make GCC 4.2.3
cd /tools/dist/ wget http://gcc-ca.internet.bs/releases/gcc-4.2.3/gcc-4.2.3.tar.bz2 tar -jvxf gcc-4.2.3.tar.bz2 mkdir gcc-obj-release cd gcc-obj-release/ ../gcc-4.2.3/configure --enable-long-long --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --with-system-zlib --prefix=/tools/gcc-4.2.3 2>&1 | tee ../logs/gcc-4.2.3-configure.log make 2>&1 | tee ../logs/gcc-4.2.3-make.log make install 2>&1 | tee ../logs/gcc-4.2.3-make_install.log cd /tools ln -s gcc-4.2.3 gcc
Build Python 2.5.1
(Some VMs use Python 2.5 or Python 2.4.4 but this is what is on the ref platform.)
wget http://python.org/ftp/python/2.5.1/Python-2.5.1.tar.bz2 tar xfvj dist/Python-2.5.1.tar.bz2 cd Python-2.5.1/ ./configure --prefix=/tools/python-2.5.1 2>&1 | tee /tools/dist/logs/python2.5.1-configure.log make 2>&1 | tee /tools/dist/logs/python2.5.1-make.log make install 2>&1 | tee /tools/dist/logs/python2.5.1-make_install.log cd /tools/ ln -s python-2.5.1/ python
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 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
Puppet Installation
scp root@moz2-linux64-slave03:/var/cache/yum/epel/packages/*.rpm /tools/dist scp root@moz2-linux64-slave03:/var/cache/yum/updates/packages/*.rpm /tools/dist rpm -i ruby-libs-1.8.5-5.el5_4.8.x86_64.rpm rpm -i ruby-1.8.5-5.el5_4.8.x86_64.rpm rpm -i augeas-libs-0.7.0-1.el5.x86_64.rpm rpm -i facter-1.5.7-1.el5.noarch.rpm rpm -i ruby-augeas-0.3.0-1.el5.x86_64.rpm rpm -i ruby-shadow-1.4.1-7.el5.x86_64.rpm rpm -i puppet-0.24.8-4.el5.noarch.rpm
When we created the ref image we installed Puppet. Along with it, came the following:
- Yum packages:
- libnotify-devel-0.4.2-6.el5.x86_64.rpm
- wireless-tools-devel-28-2.el5.x86_64.rpm
- lcov-1.7-1.noarch.rpm
- debuginfo packages for: atk, cairo, dbus, dbus-glib, expat, fontconfig, freetype, gcc, GConf2, glib2, glibc, gnome-vfs2, gtk2, gtk2-engines, hal-cups-utils, hal, libbonobo, libgnome, libselinux, libX11, libXcursor, libXext, libXfixes, libXft, libXi, libXinerama, libXrender, ORBit2, pango (specific versions listed here: http://hg.mozilla.org/build/puppet-manifests/file/4f3b55768ade/packages/debuginfopackages.pp)
- nagios-plugins-1.4.9-1.el5.rf.x86_64.rpm
- nagios-nrpe-2.5.2-1.el5.rf.x86_64.rpm
- nagios-plugins-nrpe-2.5.2-1.el5.rf.x86_64.rpm
- Other things:
- GCC 4.3.3
- python 2.5.1
- twisted 2.4.0
- twisted-core 2.4.0
- zope-interface 3.3.0
- jdk 1.5.0_15
- Mercurial 1.1.2
- autoconf 2.13
All of the "other things" were installed as per the instructions on 32-bit Linux ref image page.
Post puppet packages
This section is reserved for future updates to the ref image. A subsection should be added for each thing added to the ref image with as much installation detail as possible, for reproducibility reasons.