ReferencePlatforms/Test/Leopard
Contents
Talos on Leopard
OS Setup
- Change the resolution
- System Preferences -> Displays
- Select 1024x768
- Turn off the screen saver
- System Preferences -> Desktop & Screen Saver
- Move 'Start screen saver' to 'Never'
- Autohide the dock
- 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
- 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
- Enable VNC
- System Preferences -> Sharing
- Make sure 'Remote Management' is checked.
- Click 'Access Privileges'
- Change the VNC password
- Install the mozqa ssh key in ~/.ssh
- Enable SSH
- System Preferences -> Sharing -> check 'Remote Login'
- Enable autologin
- System Preferences -> Accounts -> Login Options -> Automatically login as 'mozqa'
- Disable "... is an application you downloaded from the Internet. Are you sure you want to open it?" prompt
- defaults write com.apple.LaunchServices LSQuarantine -bool NO
- Disable "... was downloaded from the Internet. Are you sure you open it?" prompt
- Create a file in ~/Library/Preferences/com.apple.DownloadAssessment.plist that contains
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>LSRiskCategoryNeutral</key> <dict> <key>LSRiskCategoryContentTypes</key> <array> <string>public.item</string> </array> </dict> </dict> </plist>
XCode Installation
- The next step is to retrieve the Mac reference platform packages from CVS:
export CVS_RSH=ssh ocvs -d :ext:unittest@cvs.mozilla.org:/mofo co ref-platforms/mac
- Install Xcode
- Mount the Xcode dmg
- Double click on XcodeTools.mpkg
- In the 'Installation Type' section choose 'Customize' and enable everything under 'Cross-Development'
Wget
curl https://ftp.gnu.org/pub/gnu/wget/wget-1.10.2.tar.gz > wget-1.10.2.tar.gz tar -zvxf wget-1.10.2.tar.gz cd wget-1.10.2 ./configure --prefix=/usr make sudo make install
BuildBot Setup
Install Python 2.4.4
- Download and install MacPython
wget https://www.python.org/ftp/python/2.4.4/python-2.4.4-macosx2006-10-18.dmg 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
wget https://twistedmatrix.com/Releases/Twisted/2.4/Twisted-2.4.0.tar.bz2 tar -jvxf Twisted-2.4.0.tar.bz2 cd Twisted-2.4.0 cd 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 ..
Install BuildBot
ocvs -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/
Talos Setup
Install PyYAML
wget https://pyyaml.org/download/pyyaml/PyYAML-3.05.tar.gz tar -zvxf PyYAML-3.05.tar.gz cd PyYAML-3.05 python setup.py build sudo python setup.py install
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
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
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 /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 </Directory>
Turn off logging, remove any lines that begin with "CustomLog"
Restart apache with:
sudo apachectl start
Force correct screen size on reboot
Leopard sometimes loses screen resolution settings on reboot. Grab a copy of cscreen.dmg (http://browsershots.org/downloads/thirdparty/cscreen.dmg)
Install cscreen into /Users/mozqa/. Install cscreen.resize.plist to /Library/LaunchAgents/.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</string> </dict> <key>Label</key> <string>cscreen.resize</string> <key>ProgramArguments</key> <array> <string>/Users/mozqa/cscreen</string> <string>-x</string> <string>1280</string> <string>-y</string> <string>1024</string> <string>-r</string> <string>60</string> <string>-d</string> <string>32</string> <string>-f</string> </array> <key>RunAtLoad</key> <true/> <key>UserName</key> <string>mozqa</string> <key>WorkingDirectory</key> <string>/Users/mozqa/</string> </dict> </plist>
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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</string> </dict> <key>Label</key> <string>buildbot.start.talos.slave</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/buildbot</string> <string>start</string> <string>/users/Mozqa/talos-slave</string> </array> <key>StartInterval</key> <integer>600</integer> <key>RunAtLoad</key> <true/> <key>UserName</key> <string>mozqa</string> <key>WorkingDirectory</key> <string>/Users/mozqa/</string> </dict> </plist>
Post-cloning Setup for Pool
- verify that screensaver is turned off
- verify that spotlight is disabled
- verify Bluetooth Assistent is disabled on boot (System Preferences -> Bluetooth -> Advanced -> "Open Setup Assistant...")
- Edit /Users/mozqa/talos-slave/buildbot.tac.sample and update buildmaster_host and slavename appropriately
- Rename buildbot.tac.sample to buildbot.tac
- Reboot
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 the osx talos puppet-manifests repository may help if you are having trouble.
Mercurial
- Mercurial 1.2.1 got deployed to all talos r3 Leopard slaves.
cd /Library/Python/2.5/site-packages /usr/bin/tar -xzf /N/talos/mac/darwin9/mercurial-1.2.1.tar.gz # as root cd /usr/local/bin cp /N/talos/mac/hg .
com.apple.DownloadAssessment.plist
- TODO document the following:
https://bug561350.bugzilla.mozilla.org/attachment.cgi?id=461529
com.apple.LaunchServices.plist
- TODO document the following:
https://bug586567.bugzilla.mozilla.org/attachment.cgi?id=465123
Manage dock and screen resolution
- Deployed with 04612be9bfeb
- The files deployed are:
/Library/LaunchAgents/cscreen.resize.plist /Users/cltbld/cscreen /Users/cltbld/Library/Preferences/com.apple.dock.plist
Disable bluetooth
TODO: Document this.
See bug 570843.