[llvm-commits] [zorg] r96115 - in /zorg/trunk/buildbot: README.txt osuosl/ osuosl/Config.py osuosl/__init__.py osuosl/slave/ osuosl/slave/Makefile osuosl/slave/buildbot.tac osuosl/slave/info/ osuosl/slave/info/admin osuosl/slave/info/host osuosl/slave/org.llvm.osuosl.slave.plist

Daniel Dunbar daniel at zuster.org
Sat Feb 13 12:15:32 PST 2010


Author: ddunbar
Date: Sat Feb 13 14:15:31 2010
New Revision: 96115

URL: http://llvm.org/viewvc/llvm-project?rev=96115&view=rev
Log:
Add skeleton for osuosl build slaves.


Added:
    zorg/trunk/buildbot/osuosl/
    zorg/trunk/buildbot/osuosl/Config.py
    zorg/trunk/buildbot/osuosl/__init__.py
    zorg/trunk/buildbot/osuosl/slave/
    zorg/trunk/buildbot/osuosl/slave/Makefile
    zorg/trunk/buildbot/osuosl/slave/buildbot.tac
    zorg/trunk/buildbot/osuosl/slave/info/
    zorg/trunk/buildbot/osuosl/slave/info/admin
    zorg/trunk/buildbot/osuosl/slave/info/host
    zorg/trunk/buildbot/osuosl/slave/org.llvm.osuosl.slave.plist
Modified:
    zorg/trunk/buildbot/README.txt

Modified: zorg/trunk/buildbot/README.txt
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/README.txt?rev=96115&r1=96114&r2=96115&view=diff

==============================================================================
--- zorg/trunk/buildbot/README.txt (original)
+++ zorg/trunk/buildbot/README.txt Sat Feb 13 14:15:31 2010
@@ -1,6 +1,10 @@
 This directory contains a working skeleton for setting up a buildbot system
 for testing LLVM.
 
+Actually, there are is a generic working skeleton, in 'smooshlab', and
+a specific working skeleton in 'osuosl' for talking to the public LLVM
+buildbot hosted on google1.osuosl.org.
+
 Build Slaves
 ------------
 These are the steps to install a buildslave based on this skeleton:
@@ -12,11 +16,13 @@
  3. Check out the "zorg" SVN module somewhere as the buildslave user, 
     e.g. ~buildslave/zorg.
 
- 4. Edit "zorg/buildbot/smooshlab/Config.py" and fix getBuildmasterHost to 
-    return the correct host name. You may also need to fix the buildslave 
-    name and password to match what the master expects.
+ 4. Edit "zorg/buildbot/osuosl/Config.py" and fix the buildslave name
+    and password to match what the master expects.
+
+ 5. Add host information (e.g., 'uname -a') to info/host in the slave
+    directory.
 
- 5. Configure your system to start the buildbot automatically. On Mac
+ 6. Configure your system to start the buildbot automatically. On Mac
     OS X this means copying the sample .plist to /Library/LaunchDaemons
     (editing it as appropriate if the user name or slave directories are
     different), and using 'launchctl' to load and start it.

Added: zorg/trunk/buildbot/osuosl/Config.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/Config.py?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/Config.py (added)
+++ zorg/trunk/buildbot/osuosl/Config.py Sat Feb 13 14:15:31 2010
@@ -0,0 +1,35 @@
+# Common configuration parameters (used by master and slaves).
+
+def getBuildmasterHost():
+    return 'google1.osuosl.org'
+
+def getBuildmasterPort():
+    return 9990
+
+# Slave configuration parameters.
+
+def getBuildslaveName():
+    raise NotImplementedError,'please update Config.py with the buildslave name'
+
+def getBuildslavePassword():
+    raise NotImplementedError,'please update Config.py with the buildslave password'
+
+# Master configuration parameters.
+
+def getBuildbotName():
+    return 'llvmbb'
+
+def getBuildmasterWebPort():
+    return 8010
+
+def shouldTrackChanges():
+    return True
+
+def shouldTrackLLVM():
+    return True
+
+def shouldTrackClang():
+    return True
+
+def shouldTrackLLVMGCC():
+    return True

Added: zorg/trunk/buildbot/osuosl/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/__init__.py?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/__init__.py (added)
+++ zorg/trunk/buildbot/osuosl/__init__.py Sat Feb 13 14:15:31 2010
@@ -0,0 +1,5 @@
+"""Top level module for the OSUOSL LLVM buildbot."""
+
+import Config
+
+__all__ = [Config]

Added: zorg/trunk/buildbot/osuosl/slave/Makefile
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/slave/Makefile?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/slave/Makefile (added)
+++ zorg/trunk/buildbot/osuosl/slave/Makefile Sat Feb 13 14:15:31 2010
@@ -0,0 +1,32 @@
+# -*- makefile -*-
+
+# This is a simple makefile which lives in a buildmaster/buildslave
+# directory (next to the buildbot.tac file). It allows you to start/stop the
+# master or slave in a launchd-friendly way by doing 'make start' or 'make stop'
+# and includes some other targets for convenience.
+
+start:
+	launchctl start org.llvm.osuosl.slave
+
+start-standalone:
+	/usr/bin/twistd \
+	  --nodaemon \
+	  --python=buildbot.tac \
+	  --logfile=twistd.log \
+	  --prefix=osuosl
+
+# This stops the buildbot cleanly so launchd will not restart it, use
+# 'make start' to restart it correctly via launchctl
+stop:
+	buildbot stop .	
+
+restart: stop start
+
+# Reloads the master.cfg and associated files.
+sighup:
+	buildbot sighup .	
+
+reconfig: sighup
+
+checkconfig:
+	buildbot checkconfig

Added: zorg/trunk/buildbot/osuosl/slave/buildbot.tac
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/slave/buildbot.tac?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/slave/buildbot.tac (added)
+++ zorg/trunk/buildbot/osuosl/slave/buildbot.tac Sat Feb 13 14:15:31 2010
@@ -0,0 +1,27 @@
+# -*- Python -*-
+
+from twisted.application import service
+from buildbot.slave.bot import BuildSlave
+import os, sys
+
+basedir = os.path.dirname(os.path.abspath(__file__))
+
+# Allow finding osuosl module.
+sys.path.append(os.path.join(basedir,
+                             "../.."))
+
+# Import osuosl to get configuration info.
+import osuosl
+
+buildmaster_host = osuosl.Config.getBuildmasterHost()
+port = osuosl.Config.getBuildmasterPort()
+slavename = osuosl.Config.getBuildslaveName()
+passwd = osuosl.Config.getBuildslavePassword()
+keepalive = 600
+usepty = 1
+umask = None
+
+application = service.Application('buildslave')
+s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
+               keepalive, usepty, umask=umask)
+s.setServiceParent(application)

Added: zorg/trunk/buildbot/osuosl/slave/info/admin
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/slave/info/admin?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/slave/info/admin (added)
+++ zorg/trunk/buildbot/osuosl/slave/info/admin Sat Feb 13 14:15:31 2010
@@ -0,0 +1 @@
+Zorg Buildslave <llvm-testresults at llvm.org>

Added: zorg/trunk/buildbot/osuosl/slave/info/host
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/slave/info/host?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/slave/info/host (added)
+++ zorg/trunk/buildbot/osuosl/slave/info/host Sat Feb 13 14:15:31 2010
@@ -0,0 +1 @@
+INSERT YOUR HOST INFORMATION HERE

Added: zorg/trunk/buildbot/osuosl/slave/org.llvm.osuosl.slave.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/osuosl/slave/org.llvm.osuosl.slave.plist?rev=96115&view=auto

==============================================================================
--- zorg/trunk/buildbot/osuosl/slave/org.llvm.osuosl.slave.plist (added)
+++ zorg/trunk/buildbot/osuosl/slave/org.llvm.osuosl.slave.plist Sat Feb 13 14:15:31 2010
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+         <key>Label</key>
+         <string>org.llvm.osuosl.slave</string>
+
+         <!-- Change this to the user you want to run buildbot as -->
+         <key>UserName</key>
+         <string>buildslave</string>
+
+         <!-- Change this to your buildbot working directory -->
+         <key>WorkingDirectory</key>
+         <string>/Users/buildslave/zorg/buildbot/osuosl/slave</string>
+
+         <key>ProgramArguments</key>
+         <array>
+                 <string>/usr/bin/twistd</string>
+                 <string>--nodaemon</string>
+                 <string>--python=buildbot.tac</string>
+                 <string>--logfile=twistd.log</string>
+                 <string>--prefix=osuosl</string>
+         </array>
+
+         <key>KeepAlive</key>
+         <dict>
+                 <key>SuccessfulExit</key>
+                 <false/>
+         </dict>
+
+         <key>RunAtLoad</key>
+         <true/>
+
+        <dict>
+                <key>NumberOfFiles</key>
+                <integer>1024</integer>
+        </dict>
+	<key>HardResourceLimits</key>
+        <dict>
+                <key>NumberOfFiles</key>
+                <integer>1024</integer>
+        </dict>
+</dict>
+</plist>





More information about the llvm-commits mailing list