ReleaseEngineering/Buildslave Startup Process: Difference between revisions

Line 22: Line 22:


= Darwin =
= Darwin =
== [[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.
[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.
== Build ==
== Build ==
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.
canmove, Confirmed users
1,394

edits