ReleaseEngineering/Buildslave Startup Process: Difference between revisions

Jump to navigation Jump to search
Line 25: Line 25:
= Darwin =
= Darwin =
== [[ReleaseEngineering/PuppetAgain|PuppetAgain]] ==
== [[ReleaseEngineering/PuppetAgain|PuppetAgain]] ==
Puppet runs as root during startup, from [http://hg.mozilla.org/build/puppet/file/tip/modules/puppet/files/puppet-atboot.plist /Library/LaunchDaemons/com.mozilla.puppet.plist].  This runs [http://hg.mozilla.org/build/puppet/file/tip/modules/puppet/templates/puppet-darwin-run-puppet.sh.erb run-puppet.sh], which runs puppet repeatedly until it succeeds, rebooting after too many failures.  When this script is finished, it touches /var/tmp/puppet.finished, which signals the buildslave startup launchd script to start.
Puppet runs as root during startup, from [http://hg.mozilla.org/build/puppet/file/tip/modules/puppet/files/puppet-atboot.plist /Library/LaunchDaemons/com.mozilla.puppet.plist].  This runs [http://hg.mozilla.org/build/puppet/file/tip/modules/puppet/templates/puppet-darwin-run-puppet.sh.erb run-puppet.sh], which runs puppet repeatedly until it succeeds, rebooting after too many failures.  When this script is finished, it touches /var/tmp/puppet.finished, which signals the runner [http://hg.mozilla.org/build/puppet/file/1185781bb6c1/modules/runner/templates/runner.plist.erb startup launchd script] to start.


[http://hg.mozilla.org/build/puppet/file/tip/modules/buildslave/templates/org.mozilla.build.buildslave.plist.erb That script] is a LaunchAgent, which means it will run as any logged-in user.  Using ''users::builder::autologin'', the builder user is logged in.  The script is configured to run when /var/tmp/puppet.finished is changed.  It merely invokes runslave.py.
[http://hg.mozilla.org/build/puppet/file/tip/modules/buildslave/templates/org.mozilla.build.buildslave.plist.erb That script] is a LaunchAgent, which means it will run as any logged-in user.  Using ''users::builder::autologin'', the builder user is logged in.  The script is configured to run when /var/tmp/puppet.finished is changed.  It merely invokes runslave.py.
Line 32: Line 32:
The /Library/LaunchDaemons/com.reductivelabs.puppet.plist runs /usr/local/bin/sleep-and-run-puppet.sh as root, 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.
The /Library/LaunchDaemons/com.reductivelabs.puppet.plist runs /usr/local/bin/sleep-and-run-puppet.sh as root, 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.


The buildbot launchd script, /Library/LaunchAgents/org.mozilla.build.buildslave.plist, waits until puppet has run, and then invokes 'buildbot start' directly.  It runs as whatever user logs in on the GUI console, which had best be cltbld.
The buildbot launchd script, /Library/LaunchAgents/org.mozilla.build.runner.plist, waits until puppet has run, and then invokes runner which starts buildslave via its [http://hg.mozilla.org/build/puppet/file/1185781bb6c1/modules/runner/templates/tasks/buildbot.py.erb buildbot task].  It runs as whatever user logs in on the GUI console, which had best be cltbld.


= Windows =
= Windows =
78

edits

Navigation menu