ReferencePlatforms/Test/Foopy
Set up a Snow Leopard foopy
Rescued from Aki's text file. Will probably change to be linux at some point.
Todo: flesh this out further.
Initial setup
- Rev{1,2} mini -- install Snow Leopard
- File bug for DNS/static IP in DHCP with MAC address
Setup steps
- set up cltbld account; remove passwordless Mozilla Corporation account
- System Preferences -> Accounts
- Add cltbld account, check "Allow user to administer this computer"
- Make sure to turn off Automatic Login for Mozilla Corporation before logging out
- Log out, log in as cltbld
- This may log you in as moco again; turn off Automatic Login and try again
- Remove Mozilla Corporation account
- Disable Guest Account sharing (needed ?)
- Add Terminal to the dock. Not needed, just a preference.
- Finder -> Applications -> Utilities, drag Terminal into dock
- remote login
- System Preferences -> Sharing
- Set computer name
- Enable Remote Login
- remote desktop
- Still in System Preferences -> Sharing
- Enable Remote Management
- Click all checkboxes
- Computer Settings
- VNC viewers may control screen with password: (enter cltbld pass)
- turn off bluetooth
- System Preferences -> Bluetooth
- Uncheck "On".
- turn off energy saver
- System Preferences -> Energy Saver
- Computer sleep: Never
- Uncheck Put the hard disk(s) to sleep when possible
- Start up automatically after power failure
- xcode
- I'm scping XCode 3.2.2 to the various foopys and installing (since that's the dmg I have), and depending on the following software update to bring me up to date.
- Installed defaults
- software update, then turn off updates
- Close the prompted software update, then recheck after installing XCode
- Apple menu -> Software Update
- System Preferences -> Software Update
- Uncheck 'Check for updates'
- macports
sudo port selfupdate sudo port install mercurial wget py26-lint py26-virtualenv py26-yaml sudo port select --set python python26
cd ~/ hg clone http://hg.mozilla.org/build/buildbot cd ~/buildbot hg up -r production-0.8 sudo su - cd /Users/cltbld/buildbot/master /opt/local/bin/python setup.py install # (need to sudo su -; sudo python setup.py won't work) cd ../slave /opt/local/bin/python setup.py install # (need to sudo su -; sudo python setup.py won't work) exit
helper scripts to populate /builds
on your local computer, in a temp dir, save the following scripts and files:
#!/bin/bash
# foopies.sh
cd ~/temp/foopy
if [ "$1" == "ssh" ]; then
echo "setting up initial ssh config for foopy$2"
ssh cltbld@foopy$2 'mkdir /Users/cltbld/.ssh ; chmod 0700 /Users/cltbld/.ssh ; touch /Users/cltbld/.ssh/authorized_keys ; chmod 0644 /Users/cltbld/.ssh/authorized_keys'
scp foopy-authorized_keys cltbld@foopy$2:.ssh/authorized_keys
scp id_rsa id_rsa.pub cltbld@foopy$2:/Users/cltbld/.ssh/
exit
fi
if [ -z $1 ] ; then
FOOPIES="12"
else
FOOPIES=$*
fi
for f in ${FOOPIES} ; do
case "$f" in
"05" | "5" )
FOOPY=foopy05
TEGRAS="001 002 003 004 005 006 007 008 009 010 011 012 013"
;;
"06" | "6" )
FOOPY=foopy06
TEGRAS="014 015 016 017 018 019 020 021 022 023 024 025 026"
;;
"07" | "7" )
FOOPY=foopy07
foopy07="027 028 029 030 031 032 033 034 035 036 037 038 039"
;;
"08" | "8" )
FOOPY=foopy08
TEGRAS="040 041 042 043 044 045 046 047 048 049 050 051 052"
;;
"09" | "9" )
FOOPY=foopy09
TEGRAS="053 054 055 056 057 058 059 060 061 062 063 064 065"
;;
"10" )
FOOPY=foopy10
TEGRAS="066 067 068 069 070 071 072 073 074 075 076 077 078"
;;
"11" )
FOOPY=foopy11
TEGRAS="079 080 081 082 083 084 085 086 087 088 089 090 091"
;;
"12" )
FOOPY=foopy12
FOOPYIP=10.250.48.212
TEGRAS="092 093 094 095 096 097 098 099 100 101 102 103 104"
;;
"13" )
FOOPY=foopy13
FOOPYIP=10.250.48.213
TEGRAS=""
;;
"14" )
FOOPY=foopy14
FOOPYIP=10.250.48.214
TEGRAS=""
;;
"15" )
FOOPY=foopy15
FOOPYIP=10.250.48.217
TEGRAS=""
;;
"16" )
FOOPY=foopy16
FOOPYIP=10.250.48.218
TEGRAS=""
;;
"17" )
FOOPY=foopy17
FOOPYIP=10.250.48.219
TEGRAS=""
;;
* )
FOOPY=""
TEGRAS=""
echo "You must specify a foopy ID"
exit
esac
echo "Setting up ${FOOPY} ${FOOPYIP}"
scp setup_foopy.sh cltbld@${FOOPY}:.
ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/setup_foopy.sh ; /Users/cltbld/setup_foopy.sh'
cp create_dirs.sh.in create_dirs.sh.sed
sed "s/sedTEGRALISTsed/${TEGRAS}/" create_dirs.sh.sed > create_dirs.sh
scp create_dirs.sh buildbot.tac.tegras check.sh start_cp.sh stop_cp.sh crontab.foopy cltbld@${FOOPY}:.
scp pushfile.py cltbld@${FOOPY}:/builds/sut_tools/
ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/create_dirs.sh ; /Users/cltbld/create_dirs.sh'
ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/setup_foopy.sh ; /Users/cltbld/setup_foopy.sh'
ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/create_dirs.sh ; /Users/cltbld/create_dirs.sh'
cp tegra_stats.sh.in tegra_stats.sh.sed
sed "s/sedFOOPYNNsed/${FOOPY}/" tegra_stats.sh.sed > tegra_stats.sh
cp SUTAgent.ini.in SUTAgent.ini.sed
sed "s/sedFOOPYIPsed/${FOOPYIP}/" SUTAgent.ini.sed > SUTAgent.ini
cp watcher.ini.in watcher.ini.sed
sed "s/sedFOOPYIPsed/${FOOPYIP}/" watcher.ini.sed > watcher.ini
scp tegra_stats.sh SUTAgent.ini update_sutagentini.sh cltbld@${FOOPY}:/builds/
rm -f create_dirs.sh create_dirs.sh.sed
rm -f tegra_stats.sh tegra_stats.sh.sed
rm -f watcher.ini watcher.ini.sed
rm -f SUTAgent.ini SUTAgent.ini.sed
done
#!/bin/sh -x # setup_foopies.sh export PATH=/opt/local/bin:/opt/local/sbin:$PATH if [ ! -d /builds ]; then mkdir /builds fi cd /builds if [ ! -d /builds/talos-data ]; then mkdir /builds/talos-data cd /builds/talos-data hg clone http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark bench@taras.glek hg clone http://hg.mozilla.org/build/pageloader pageloader@mozilla.org hg clone http://hg.mozilla.org/build/talos talos fi if [ ! -d /builds/tools ]; then cd /builds hg clone http://hg.mozilla.org/build/tools tools cd /builds/tools/sut_tools ln -s /builds/talos-data/talos/devicemanager.py . fi if [ ! -d /builds/sut_tools ]; then cd /builds ln -s /builds/tools/sut_tools sut_tools fi cd /builds
To initialize a foopy, run
./foopies.sh ssh ## ./foopies.sh ##
where ## is the foopy number. The ssh step can only be run once and seperately
Future reference
Rev 1 mini foopy port list
For future reference:
foopy02:~ cltbld$ sudo port list active Warning: port definitions are more than two weeks old, consider using selfupdate bzip2 @1.0.6 archivers/bzip2 db46 @4.6.21 databases/db46 expat @2.0.1 textproc/expat gdbm @1.8.3 databases/gdbm gettext @0.18.1.1 devel/gettext gperf @3.0.4 devel/gperf libiconv @1.13.1 textproc/libiconv libidn @1.19 mail/libidn mercurial @1.7.2 devel/mercurial ncurses @5.7 devel/ncurses ncursesw @5.7 devel/ncursesw openssl @1.0.0c devel/openssl py26-distribute @0.6.14 python/py26-distribute py26-lint @0.22.0 python/py26-lint py26-logilab-astng @0.21.0 python/py26-logilab-astng py26-logilab-common @0.53.0 python/py26-logilab-common py26-virtualenv @1.5.1 python/py26-virtualenv py26-yaml @3.09 python/py26-yaml python26 @2.6.6 lang/python26 readline @6.1.002 devel/readline sqlite3 @3.7.3 databases/sqlite3 wget @1.12 net/wget zlib @1.2.5 archivers/zlib