ReferencePlatforms/Linux-CentOS-5.0: Difference between revisions

 
(40 intermediate revisions by 8 users not shown)
Line 11: Line 11:
  0c3990be2271bf44c1495aa0003b5552  CentOS-5.0-i386-bin-5of6.iso
  0c3990be2271bf44c1495aa0003b5552  CentOS-5.0-i386-bin-5of6.iso
  9e6f91a5292f46b02777133765fc03fe  CentOS-5.0-i386-bin-6of6.iso
  9e6f91a5292f46b02777133765fc03fe  CentOS-5.0-i386-bin-6of6.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 ===
=== Package Selection ===
Line 24: Line 26:
* '''Applications'''
* '''Applications'''
** Editors
** Editors
** Test-based internet
** Text-based internet
*** Add lynx
*** Add lynx
* '''Development'''
* '''Development'''
Line 104: Line 106:
  make install 2>&1 | tee /tools/dist/logs/python2.5.1-make_install.log
  make install 2>&1 | tee /tools/dist/logs/python2.5.1-make_install.log
  cd /tools/
  cd /tools/
  ln -s python2.5.1 python
  ln -s python-2.5.1 python


== Version 3 ==
== Version 3 ==
Line 527: Line 529:
==== Install EPEL ====
==== Install EPEL ====
As root,
As root,
  rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm


==== Move the JDK ====
==== Move the JDK ====
Line 557: Line 559:
  puppetca --sign $hostname.build.mozilla.org
  puppetca --sign $hostname.build.mozilla.org


= Post-Install Setup =
Setup the sysconfig file:
Post-install instructions are written for the latest version.<br />
* Open /etc/sysconfig/puppet in an editor
* replace 'puppet' with production-puppet.build.mozilla.org
 
== Post-puppet packages ==
Since the deployment of Puppet, future changes to the ref platform are management by it. Because of this, providing _exact_ installation instructions can be tricky. All of the packages listed below are installed on the ref platform and some installation guidelines are provided. Looking at [http://hg.mozilla.org/build/puppet-manifests the puppet-manifests repository] may help if you are having trouble.
=== jscoverage ===
* Build from revision 453 of [http://svn.siliconforks.com/jscoverage/trunk/ the jscoverage SVN repository]
* 'jscoverage' and 'jscoverage-server' binaries installed to /usr/local/bin


'''Open Firefox once to make sure a default profile is created''' (see if this is still needed lsblakk May 27/09)
=== GCC 4.3.3 ===
GCC 4.3.3 was installed alongside the other GCC for use on newer branches:
* Get http://ftp.gnu.org/gnu/gcc/gcc-4.3.3/gcc-4.3.3.tar.bz2 and unpack it to /tools/gcc-4.3.3/source
* Pull the patch series from http://hg.mozilla.org/users/tglek_mozilla.com/gcc-moz-plugin-mq/
* Apply the following patches to the GCC sources using git-apply (patch -p1 will probably work as well):
** gty.diff
** plugin.diff
** parm_attrs.diff
** c_process_decl.diff
* mkdir /tools/gcc-4.3.3/build
* cd /tools/gcc-4.3.3/build
* /tools/gcc-4.3.3/source/configure --prefix=/tools/gcc-4.3.3/installed --enable-__cxa_atexit --enable-languages=c,c++
* make install
* The static analysis will require all of /tools/gcc-4.3.3 including the source/build/installed subdirectories


== Accept the client's key on the Puppet server ==
=== libhildonfm2-dev ===
Until you have manually accepted the clients key on the Puppet server it will be unable to sync up.
Installed inside of scratchbox with the following command:
Log onto the appropriate server (staging-puppet or production-puppet) and do the following:
  su - cltbld -c '/scratchbox/moz_scratchbox -p apt-get --yes --force-yes install libhildonfm2-dev
  # root
puppetca --sign $client_hostname.build.mozilla.org


Subsequent attempts to sync up should succeed now. You can watch /var/log/messages to verify, if you want.
=== libconic0-dev ===
Installed inside of scratchbox with the following command:
su - cltbld -c '/scratchbox/moz_scratchbox -p apt-get --yes --force-yes install libconic0-dev'


== Installing BuildBot ==
=== access keys from within scratchbox ===
/bin/mount --bind /scratchbox/users/cltbld/home/cltbld/.ssh /home/cltbld/.ssh/


Because our Buildbot code changes fairly regularly we don't keep a copy of it on the VM.
=== Upgrade Scratchbox ===
  (as root)
Roughly, the Scratchbox upgrade was done with the following set of commands:
  export PYTHONPATH=".:/tools/zope-interface/lib/python2.5/site-packages/:/tools/twisted-core/lib/python2.5/site-packages:/tools/twisted/lib/python2.5/site-packages/:$PYTHONPATH"
su -
  export PYTHONHOME="/tools/python"
unset PYTHONHOME
  export PATH="/tools/python/bin:/tools/twisted/bin:/tools/twisted-core/bin:$PATH"
  unset PYTHONPATH
  cd /tools
  export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/cltbld/bin
  hg clone http://hg.mozilla.org/build/buildbot
umount /home/cltbld/.ssh #until no longer mounted
  cd /tools/buildbot
umount /builds/slave #might not be mounted
  hg up -r BUILDBOT_PRODUCTION
/scratchbox/sbin/sbox stop
  python setup.py install --prefix=/tools/buildbot
/scratchbox/sbin/sbox_umount_all
  # buildbotcustom is only required if you're running a Buildbot master
sh maemo-scratchbox-install_5.0.sh -U -s /scratchbox
  cd /tools
  /etc/init.d/sbox start
  mkdir buildbotcustom
exit
  cd buildbotcustom
  sh maemo-sdk-install_5.0.sh -y -d -s /scratchbox
  hg clone http://hg.mozilla.org/build/buildbotcustom
/scratchbox/login
echo deb http://repository.maemo.org/fremantle/<token> nokia-binaries >> /etc/apt/sources.list
fakeroot apt-get install autoconf2.13 libnotify-dev libIDL-dev libqt4-dev
exit
/scratchbox/moz_scratchbox
  sb-conf select FREMANTLE_ARMEL
  wget http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tar.bz2
tar jxf Python-2.5.5.tar.bz2
  cd Python-2.5.5
CC='host-gcc' --prefix=/usr/local
make -j4
/scratchbox/moz_scratchbox
openssl md5 openssl-0.9.8m.tar.gz Python-2.5.5.tar.bz2
#MD5(openssl-0.9.8m.tar.gz)= 898bf125370926d5f692a2201124f8ec
#MD5(Python-2.5.5.tar.bz2)= 1d00e2fb19418e486c30b850df625aa3
tar jxf Python-2.5.5.tar.bz2
tar zxf openssl-0.9.8m.tar.gz
  cd openssl-0.9.8m
  CC=host-gcc CXX=host-g++ ./config shared --prefix=/usr/local
  make -j4
make install
  cd Python-2.5.5
CC=host-gcc CXX=host-g++ ./configure --prefix=/host_usr
  make -j4
  make altinstall
  find /usr/local -name "*.so*" -exec ldd {} \; | grep "not found" # should have no output
 
= Post-Install Setup =
Post-install instructions are written for the latest version.<br />


When you create the slave, be sure to set
== Add slave(s) to configuration files ==
umask = 002
The following files need to be updated with new slaves (note that the production Buildbot config is explicitly not updated here, it will be done later):
keepalive = None
* [http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla2-staging/config.py buildbot-configs/mozilla2-staging/config.py]
usepty = 1
* [http://hg.mozilla.org/build/puppet-manifests/file/tip/site-production.pp puppet-manifests/site-production.pp] (or site-staging.pp for slaves that will be in staging permanently).
in the buildbot.tac and restart it (otherwise we'll start pushing update snippets around with mode 600, time out from a busy master, and fail to clean up unit test failures).


== To build mozilla ==
* For a permanent staging slave - edit /etc/sysconfig/puppet to staging-puppet


The mozconfig for building mozilla should contain the following settings:
Once your patches have landed, you need to update the following checkouts:
* On staging-master:
# as cltbld
cd /builds/buildbot/user-configs/clean-configs
hg pull && hg up
cd ../../user-configs2/clean-configs
hg pull && hg up
* On production-puppet (or staging-puppet if you updated site-staging.pp):
# as root
cd /etc/puppet/manifests
hg pull && hg up
* If a machine has been recloned/replaced then you also do this as root@production-puppet
puppetca --clean moz2-linux-slaveNN.build.mozilla.org


CC=/tools/gcc/bin/gcc
== Buildbot Setup ==
CXX=/tools/gcc/bin/g++
The buildbot.tac file will automatically be generated to send the slave to the correct staging master (staging-master or sm-staging-try-master).


== switchover from staging to production ==
===Run the slave through staging===
* stop slave process
see [[ReleaseEngineering:BuildSlaveSetup]]
* switchover the .ssh keys to use production keys
* manually ssh to the production machines listed below and enter "yes" to the question about accepting the machine signature
# production
$ ssh -i ~/.ssh/ffxbld_dsa ffxbld@aus2-staging.mozilla.org
$ ssh -i ~/.ssh/ffxbld_dsa ffxbld@dm-symbolpush01.mozilla.org
$ ssh -i ~/.ssh/ffxbld_dsa ffxbld@stage.mozilla.org
$ ssh -i ~/.ssh/ffxbld_dsa ffxbld@stage-old.mozilla.org
$ ssh -i ~/.ssh/ffxbld_dsa ffxbld@hg.mozilla.org
* edit /e/builds/moz2_slave/buildbot.tac to change "staging-master" to "production-master".
* clobber all build trees on slave
* start slave process
Confirmed users
3,104

edits