From MozillaWiki
Jump to: navigation, search

Talos on Mac

Important: Do _NOT_ upgrade past 10.4.8. hdiutil has a bug/feature in 10.4.9 and above that prevents Talos Buildbot's from working properly.

OS Setup

  1. Change the resolution
    • System Preferences -> Displays
    • Select 1024x768
  2. Turn off the screen saver
    • System Preferences -> Desktop & Screen Saver
    • Move 'Start screen saver' to 'Never'
  3. Autohide the dock
  4. Turn off sleep
    • System Preferences -> Energy Saver
    • "Put the computer to sleep when it is inactive for..." Never
    • 'put the display to sleep' Never
    • uncheck 'Put the hard disk(s) to sleep when possible'
    • In options set dock to autohide
  5. Create a 'mozqa' account
    • System Preferences -> Accounts -> press '+' to add account
    • Username : mozqa, 'Allow user to administrate this computer' checked
    • in 'Login Items' add Terminal (Applications -> Utilities -> Terminal)
      • handy to have this on startup
  6. Enable VNC
    • System Preferences -> Sharing
    • Make sure 'Apple Remote Desktop' is checked.
    • Click 'Access Privileges'
    • Change the VNC password
  7. Install the mozqa ssh key in ~/.ssh
  8. Enable autologin
    • System Preferences -> Accounts -> Login Options -> Automatically login as 'mozqa'

XCode Installation

  1. The next step is to retrieve the Mac reference platform packages from CVS:
export CVS_RSH=ssh
ocvs -d co ref-platforms/mac
  1. Install Xcode
    1. Mount the Xcode dmg
    2. Double click on XcodeTools.mpkg
    3. In the 'Installation Type' section choose 'Customize' and enable everything under 'Cross-Development'


curl > wget-1.10.2.tar.gz
tar -zvxf wget-1.10.2.tar.gz
cd wget-1.10.2
./configure --prefix=/usr
sudo make install

BuildBot Setup

Install Python 2.4.4

  1. Download and install MacPython
hdiutil attach python-2.4.4-macosx2006-10-18.dmg
cd /Volumes/Univeral\ MacPython\ 2.4.4
sudo installer -pkg MacPython.mpkg -target /
cd ..
hdiutil detach /Volumes/Univeral\ MacPython\ 2.4.4
  • You must logout and log back in to make sure you are using the new version of Python.

Install Twisted and Zope-Interface

tar -jvxf Twisted-2.4.0.tar.bz2
cd Twisted-2.4.0
cd ZopeInterface-3.1.0c1
python build
sudo python install
cd ../TwistedCore-2.4.0/
python build
sudo python install
cd ..
python build
sudo python install
cd ..

Install BuildBot

ocvs co -d buildbot mozilla/tools/buildbot
cd buildbot
python build
sudo python install
cd ..
rm -rf buildbot/

Talos Setup

Install PyYAML

tar -zvxf PyYAML-3.05.tar.gz
cd PyYAML-3.05
python build
sudo python install

Setting up a Talos Buildbot slave

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

cd ~
mkdir talos-slave
buildbot create-slave --umask=002 talos-slave username password

Edit the buildbot.tac file to have keepalive = None

You should then start the slave once to create the proper directory structure.

buildbot start talos-slave
buildbot stop talos-slave

When running Buildbot slaves on Mac you must start it from a Terminal window in VNC and leave that window open (even though it's a daemon process). hdiutil will throw errors if you do not.

Apache Setup

Install apache from (use unix source) - the copy of apache bundled with the mac is too old.

In the apache directory:

./configure --prefix=/etc/apache2
make install

Stop the built in apache:

sudo apachectl stop

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'.


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

The rest

  • Create an empty directory so Apache doesn't complain:
cd ~/talos-slave/$BUILDDIR
mkdir talos
  • Open up /etc/apache2/httpd/httpd.conf and change both references of "/Library/WebServer/Documents" to "/Users/mozqa/talos-slave/$BUILDDIR/talos".

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

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

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

  • replace the old apache install with the new apache2 install
mv /usr/sbin/apachectl /usr/sbin/apachectl1.3
ln -s /etc/apache2/bin/apachectl /usr/sbin/apachectl

Restart apache with:

sudo apachectl start

Auto start on reboot

Install buildbot.start.talos.slave.plist in /Library/LaunchAgents/.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Updating Talos

Assuming your Buildbot master configuration is proper, Buildbot will automatically update Talos on every performance run. If the pageset is updated, you will need to refresh /home/mozqa/pages.

Post-cloning Setup for Pool

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