ReferencePlatforms/Test/Linux: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
(37 intermediate revisions by 3 users not shown)
Line 3: Line 3:
Ubuntu 7.04 'Desktop" install
Ubuntu 7.04 'Desktop" install


== Downloaded Software Updates ==
== Configuration Changes ==
TODO
=== 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


== Configuration Changes ==
=== 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 ==
== Third-party applications ==
  sudo apt-get install openssh-server python-twisted cvs apache2 x11vnc python-yaml
== 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
  cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d buildbot mozilla/tools/buildbot
  cd buildbot
  cd buildbot
Line 17: Line 78:
  rm -rf buildbot/
  rm -rf buildbot/


== Install Talos ==
If 'apt-get install xrestop' fails :
  cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d talos mozilla/testing/performance/talos
 
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*


== Configure VNC Server ==
== Setting up a Talos Buildbot Slave ==
Set a password with:
How to setup a Buildbot Talos slave (replace the master.host, username, and password with the correct values)
vncpasswd
  cd ~
Then replace /home/mozqa/.vnc/xstartup with the following:
  mkdir talos-slave
  #!/bin/sh
  buildbot create-slave --umask=002 talos-slave master.host:9989 username password
  xsetroot -solid grey
 
  gnome-session&
Edit the buildbot.tac file to have keepalive = None
And make it executable
chmod +x /home/mozqa/.vnc/xstartup
Make vnc start on boot by adding the following to mozqa's crontab:
@reboot          tightvncserver -geometry 1280x1024 -rfbport 5900


== Configure Apache ==
= Post-cloning Setup for Pool =
Open /etc/apache2/sites-available/default and change the DocumentRoot and second <Directory> tag to '/home/mozqa/talos'.
*  Edit /home/mozqa/talos-slave/buildbot.tac.sample and update '''buildmaster_host''' and '''slavename''' appropriately
Restart Apache
* Rename buildbot.tac.sample to buildbot.tac
/etc/init.d/apache2 restart
* Reboot
Test the installation by browsing to 'http://localhost/page_load_test/framecycler.html'. The browser should cycle through many pages rapidly.

Latest revision as of 19:57, 19 November 2009

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