Buildbot Setup for MacOSX
You are viewing an old version of this article. View
the current version here.
Setting up a Buildbot slave on Mac OS X
Install buildbot using macports or fink.
Add user buildbot:
Make sure that you do not have a buildbot user and group on your system
# Check for group with id 101 id -g -nr 101 # Check for user with id 101 id -u -nr 101
Create the group and the user buildbot
# Create group buildbot with group id 101 GROUP="buildbot" dscl . create /groups/$GROUP dscl . create /groups/$GROUP name $GROUP dscl . create /groups/$GROUP passwd "*" dscl . create /groups/$GROUP gid 101 # Create user buildbot with id 101 BUILDSLAVE_HOME=/var/lib/buildslave USER=buildbot mkdir -p $BUILDSLAVE_HOME dscl . -create /Users/$USER dscl . -create /Users/$USER RealName "Buildbot slave" dscl . -create /Users/$USER NFSHomeDirectory $BUILDSLAVE_HOME dscl . -create /Users/$USER UserShell /bin/bash dscl . -create /Users/$USER UniqueID 101 dscl . -create /Users/$USER PrimaryGroupID 101 chown 101:101 $BUILDSLAVE_HOME
To hide the user use:
defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add buildbot
Prepare environment:
sudo -i -u buildbot buildbot create-slave --usepty=0 maria-slave hasky.askmonty.org:9989 <slavename> <passwd> bzr init-repo maria-slave/<slavedirectory> $EDITOR maria-slave/info/admin $EDITOR maria-slave/info/host logout
Buildbot can be started/stopped manually with these commands (it's a good idea to start and stop it to see if it is set up correctly):
sudo -i -u buildbot
buildbot start maria-slave
buildbot stop maria-slave
logout
In order to make buildbot start on system boot, you'll need to create /Library/LaunchDaemons/net.sourceforge.buildbot.plist file with the following contents (modified example from buildbot wiki):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>StandardOutPath</key> <string>twistd.log</string> <key>StandardErrorPath</key> <string>twistd-err.log</string> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/opt/local/bin:/sbin:/usr/sbin:/bin:/usr/bin</string> <key>PYTHONPATH</key> <string>/opt/local/lib/python2.5/site-packages</string> </dict> <key>GroupName</key> <string>daemon</string> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>net.sourceforge.buildbot.slave.test</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/buildbot</string> <string>start</string> <string>maria-slave</string> </array> <key>RunAtLoad</key> <true/> <key>UserName</key> <string>buildbot</string> <key>WorkingDirectory</key> <string>/var/lib/buildslave/</string> </dict> </plist>
If you installed buildbot from fink, then you can edit and copy the plist file
$EDITOR /sw/share/doc/buildbot-py26/contrib/os-x/net.sourceforge.buildbot.slave.plist sudo cp /sw/share/doc/buildbot-py26/contrib/os-x/net.sourceforge.buildbot.slave.plist /Library/LaunchDaemons/
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.