ReferencePlatforms/Test/Foopy

From MozillaWiki
Jump to navigation Jump to search

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 /builds
hg clone http://hg.mozilla.org/build/buildbot
cd buildbot
hg up -r production-0.8
sudo su -
cd ~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 script to populate /builds

in a temp dir, save the following as setup_foopies.sh

#!/bin/sh -x
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
if [ ! -d /builds ]; then
  mkdir /builds
fi
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@tara.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

then run the following:

cd ~/temp
if [ "$1" == "ssh" ]; then
  for i in 06 07 08 09 10 11 ; do
    ssh cltbld@foopy${i}.build.mozilla.org '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${i}.build.mozilla.org:.ssh/authorized_keys
  done
fi
for i in 06 07 08 09 10 11 ; do
  scp setup_foopies.sh cltbld@foopy${i}.build.mozilla.org:.
  ssh cltbld@foopy${i}.build.mozilla.org 'chmod +x /Users/cltbld/setup_foopies.sh ; /Users/cltbld/setup_foopies.sh'
done

helper script to create/populate tegra dirs

for i in {71..90}; do
   TNUM=0$i
   TEGRA=tegra-$TNUM
   echo processing $TEGRA
   if [ ! -d /builds/$TEGRA ]; then
       echo creating dir for $TEGRA
       mkdir /builds/$TEGRA
   fi
   cd /builds/$TEGRA
   if [ ! -f /builds/$TEGRA/clientproxy.py ]; then
       echo symlinking clientproxy
       ln -s /builds/tools/sut_tools/clientproxy.py .
   fi
   if [ ! -f /builds/$TEGRA/buildbot.tac ]; then
       echo creating buildbot.tac
       sed "s/tegra-###/${TEGRA}/" /builds/buildbot.tac.tegras > /builds/$TEGRA/buildbot.tac
   fi
done

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