ReferencePlatforms/Test/Linux

From MozillaWiki
Jump to: navigation, search

Configuration Details

Ubuntu 7.04 'Desktop" install

Configuration Changes

Assumptions

  • a user named 'mozqa' is logged in and has administrative privileges - this will be the default user for this machine, default home directory is thus /home/mozqa

Make the following changes

  • System -> Preferences -> Screen Resolution
    • 1280 x 1024/60Hz/Normal
  • System -> Preferences -> Screen Saver
    • disable 'Activate screensaver when computer is idle'
  • System -> Preferences -> Power Management
    • 'Never' put computer to sleep
    • 'Never' put display to sleep
  • System -> Administration -> Login Window
    • in Security tab select 'Enable Automatic Login' for user mozqa
  • System -> Administration -> Synaptic Package Manager
    • install cpufrequtils (002-5)
  • configure vnc server
    • Set a password with:
vncpasswd
  • edit /etc/rc.local, add the following lines:
#set up vnc
x11vnc -display :0 -shared -forever -rfbauth /home/mozqa/.vnc/passwd -auth /var/lib/gdm/:0.Xauth -bg
#replace random with urandom
rm /dev/random
mknod /dev/random c 1 9
#set up throttling
cpufreq-set -g performance
cpufreq-set -c 1 -g performance
  • rm /usr/share/hal/fdi/policy/10osvendor remove 10-cpufreq.fdi (this allows the cpufreq-set commands to take precedence)
  • open Terminal
    • from Terminal menu select Edit -> Profiles
    • select 'Default'
    • from 'Title and Command' tab set 'When command exits' to 'Hold the terminal open'
  • System -> Preferences -> Sessions
    • in 'Startup Programs' tab click 'Add'
      • name: 'start talos slave', command: 'gnome-terminal -x buildbot start talos-slave'
  • Reboot to ensure that all settings have been correctly set

Configure Apache

The DocumentRoot will be dependent on the builddir of your Buildbot slave. In this section that directory will be referred to as $BUILDDIR.

For machines in the pool of slaves, $BUILDDIR should be 'talos-data'.

Pageset

You will need to install a pageset in /home/mozqa/pages

The rest

  • Create an empty directory so Apache doesn't complain:
cd ~/talos-slave/$BUILDDIR
mkdir talos
  • Open /etc/apache2/sites-available/default and change the DocumentRoot and second <Directory> tag to '/home/mozqa/talos-slave/$BUILDDIR/talos'.

Open up /etc/apache2/conf.d/charset and comment out the AddCharset line as so:

#AddDefaultCharset UTF-8

Add an alias so Apache knows where the pageset is. Add this to your configuration file:

Alias /page_load_test/pages /home/mozqa/pages
<Directory /home/mozqa/pages>
   Options Indexes
   Order allow,deny
   Allow from all
</Directory>

Turn off logging, remove any lines that begin with "CustomLog"

Restart Apache

/etc/init.d/apache2 restart

Third-party applications

xrestop

sudo apt-get install xrestop
sudo apt-get install openssh-server cvs apache2 x11vnc python-yaml python-dev libc6-dev
cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d buildbot mozilla/tools/buildbot
cd buildbot
python setup.py build
sudo python setup.py install
cd ..
rm -rf buildbot/

If 'apt-get install xrestop' fails :

wget https://launchpad.net/ubuntu/+source/xrestop/0.4-1/+build/212407/+files/xrestop_0.4-1_i386.deb
sudo dpkg -i xrestop_0.4-1_i386.deb

Python Twisted

Do not use the Python Twisted package from apt-get. It uses Twisted 2.5.0, which is buggy.

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 Twisted-2.4.0/ZopeInterface-3.1.0c1/
python setup.py build
sudo python setup.py install
cd ../TwistedCore-2.4.0
python setup.py build
sudo python setup.py install
cd ../
python setup.py build
sudo python setup.py install
cd ..
rm -rf Twisted*

Setting up a Talos Buildbot Slave

How to setup a Buildbot Talos slave (replace the master.host, username, and password with the correct values)

cd ~
mkdir talos-slave
buildbot create-slave --umask=002 talos-slave master.host:9989 username password

Edit the buildbot.tac file to have keepalive = None

Post-cloning Setup for Pool

  • Edit /home/mozqa/talos-slave/buildbot.tac.sample and update buildmaster_host and slavename appropriately
  • Rename buildbot.tac.sample to buildbot.tac
  • Reboot