ReleaseEngineering/Buildslave Startup Process
This is notes for now. It will get changed and updated in bug 605278.
Note that puppet startup and the buildslave startup are generally fairly tightly intertwined. That will need to be separated out a little bit!
Linux
Build (CentOS 5)
/etc/init.d/buildbot depends on /etc/init.d/puppet, which blocks until puppet runs. /etc/init.d/buildbot-tac will run right away. buildbot-tac is installed by puppet, so there are at least two race conditions here.
buildbot-tac runs buildbot-tac.py only on the first boot, creating the buildbot.tac file for the slave.
buildbot-tac.py is installed as part of an RPM (build-tools - bug 615301).
Builds run in /builds/slave.
Test (Fedora 12)
On startup, test boxes automatically login, and run home/cltbld/.config/autostart/gnome-terminal.desktop. This file runs /home/cltbld/run-puppet-and-buildbot.sh, which runs puppet in a loop, and when that's complete, runs 'buildbot start /home/cltbld/talos-slave'.
Darwin
Build
com.reductivelabs.puppet.plist runs /usr/local/bin/sleep-and-run-puppet.sh, which is presumably installed as part of the base image. This script sleeps for 60 seconds, then runs puppet in the foreground every 60 seconds until it succeeds.
There is a buildbot-tac launchd script which runs /usr/local/bin/buildbot-tac, which is installed by puppet. This launchd script does not wait for puppet, so there is a race condition here, although the 60-second pause in the puppet launch script probably eliminates any risk.
The buildbot launchd script waits until puppet has run, and then invokes 'buildbot start' directly.
Windows
Build
buildbot.bat is in cltbld's "Startup Items". It is installed via OPSI, but it's not in the OPSI hg repo, because it contains passwords. buildbot.bat runs buidlbot-tac.py, via a checkout of http://hg.mozilla.org/build/tools at d:\tools. That checkout is only done once.
Once buildbot-tac.py has created the tac file, buildbot.bat runs start-buildbot.bat, which sets up some VC++ variables and runs start-buildbot.sh, which finally runs 'buildbot start' in the appropriate directory.
Test
Talos windows systems are not administered by OPSI, so the various scripts are installed by hand. I don't know how they work yet