1 There are Jason's notes for setting up the buildbot master
3 The buildbot master was installed in a VM on debian lenny. The VM has the following configuration:
5 * 10GB disk (partitions: 3GB root, 500MB swap, the rest for /home
8 When installing lenny, uncheck desktop system and check web server
10 edit sources.list and comment out the cdrom source
12 root# apt-get build-dep buildbot
13 root# apt-get install git-core
14 root# apt-get install openssh-server
16 login as buildmaster user
17 % git clone git://github.com/jaysoffian/buildbot.git buildbot-src
19 % git checkout -b gerrit e4c0d458374b9a0ce34c
21 // fix a debugclient bug
22 % git cherry-pick 9ab140a03378baa5ec98
24 // allow for not clobbering the git tree each build
25 % git cherry-pick 7fa5137bbc449144d76334bd366920d8b6a7c2c0
28 http://buildbot.net/buildbot/docs/0.8.1/Installing-the-code.html#Installing-the-code
30 % python setup.py build
31 root# python setup.py install
32 root# apt-get install python-json
33 root# apt-get install python-jinja
35 // cvs is required to make the buildbot test suite go all clear
36 root# apt-get install cvs
39 % PYTHONPATH=. trial buildbot.test
41 % mkdir $HOME/buildbot/master/openafs
42 // create the buildbot master
43 % buildbot create-master $HOME/buildbot/master/openafs
48 repourl="git://git.openafs.org/openafs.git"
50 from buildbot.process import factory
51 from buildbot.steps.source import Git
52 from buildbot.steps.shell import Compile
53 from buildbot.steps.shell import Configure
55 f1 = factory.BuildFactory()
56 f1.addStep(Git(repourl=repourl, mode="clobber"))
57 f1.addStep(Configure(command=["sh","regen.sh"]))
58 f1.addStep(Configure(command=["./configure","--enable-checking"]))
59 f1.addStep(Compile(command=["make"]))
60 f1.addStep(Compile(command=["make","dest"]))
62 b1 = {'name': "buildbot-full",
63 'slavename': "debian-i386",
69 =================================================
72 % buildbot checkconfig master.cfg
73 // start the buildmaster
74 % /usr/bin/buildbot start $HOME/buildbot/master/openafs
76 check http://localhost:8010 for web output
78 //install openafs builddeps
79 root# apt-get build-dep openafs
80 root# apt-get install automake1.9 linux-headers-2.6-686 flex bison dblatex docbook-xsl
82 root# useradd -d /home/buildslave -m buildslave
84 buildslave% mkdir -p $HOME/buildbot/slave/openafs
85 buildslave% buildbot create-slave $HOME/buildbot/slave/openafs localhost:9989 debian-i386 PASSWORD
87 edit files in /home/buildslave/buildbot/slave/openafs/info
89 // start the buildslave
90 buildslave% buildbot start $HOME/buildbot/slave/openafs
94 /// begin setting up gerrit stuff
95 // create ssh key for buildbot
96 // sign in to gerrit and add buildbot ssh key
97 buildmaster% touch ~buildmaster/buildbot-src/contrib/__init__.py
99 Here is a working config snippet (minus the slave passwords) for gerrit+buildbot:
102 sys.path.append('/home/buildmaster/buildbot-src/contrib')
104 from gerrit import GerritChangeSource
105 #c['change_source'] = GerritChangeSource()
107 ## configure the Schedulers
109 from buildbot.scheduler import Scheduler, Periodic
112 mybuilders.append("debian-linux-i386-builder")
113 mybuilders.append("win2008-builder")
115 stable14_builders = []
116 stable14_builders.append("debian-linux-i386-builder")
121 c['schedulers'].append(Scheduler(name="all", branch=None,
123 builderNames=mybuilders))
126 c['schedulers'].append(Periodic("every_4_hours", ["irix-builder"], 4*60*60))
128 from gerrit import GerritScheduler
129 c['schedulers'].append(GerritScheduler("gerrit_scheduler", mybuilders, branches=["master","openafs-devel-1_5_x"]))
131 c['schedulers'].append(GerritScheduler("gerrit_stable_scheduler", stable14_builders, branches=["openafs-stable-1_4_x"]))
135 repourl="git://git.openafs.org/openafs.git"
137 from buildbot.process import factory
138 from buildbot.steps.source import Git
139 from buildbot.steps.shell import Compile
140 from buildbot.steps.shell import Configure
141 from buildbot.steps.shell import ShellCommand
143 f1 = factory.BuildFactory()
144 #f1.addStep(ShellCommand(command=["git","clean","-xdf"]))
145 #f1.addStep(Git(repourl=repourl, mode="clobber"))
146 f1.addStep(ShellCommand(command=["sleep","120"]))
147 f1.addStep(Git(repourl=repourl, mode="update", ignore_ignores=True, retry=[120,60]))
148 f1.addStep(ShellCommand(command=["sh","regen.sh"]))
149 f1.addStep(Configure(command=["./configure","--enable-checking","--enable-supergroups","--enable-namei-fileserver"]))
150 f1.addStep(Compile(command=["make"]))
151 f1.addStep(ShellCommand(command=["make","dest"]))
153 b1 = {'name': "debian-linux-i386-builder",
154 'slavename': "debian-i386",
161 irix_configure_env={'CC':"cc"}
163 irixfactory = factory.BuildFactory()
164 irixfactory.addStep(ShellCommand(command=["sleep","120"]))
165 irixfactory.addStep(Git(repourl=repourl, mode="update", ignore_ignores=True, retry=[120,60]))
166 irixfactory.addStep(ShellCommand(command=["sh","regen.sh"]))
167 irixfactory.addStep(Configure(command=["./configure","--enable-checking","--enable-supergroups","--enable-namei-fileserver","--with-krb5=/usr/nekoware"],env=irix_configure_env))
168 irixfactory.addStep(Compile(command=["gmake"]))
169 irixfactory.addStep(ShellCommand(command=["make","dest"]))
172 irixbuilder = {'name': "irix-builder",
173 'slavename': "sgi_irix_65-64bit",
174 'builddir': "irix-65-64bit",
175 'factory': irixfactory,
178 c['builders'].append(irixbuilder)
181 ###### win_amd64 free builder
183 win_amd64_free_factory = factory.BuildFactory()
186 win_amd64_free_factory.addStep(ShellCommand(command=["ping","-n","120","localhost"]))
187 win_amd64_free_factory.addStep(Git(repourl=repourl, mode="update", ignore_ignores=True, retry=[120,60]))
188 win_amd64_free_factory.addStep(Compile(command=["build-openafs.cmd", "amd64", "free"]))
190 win_amd64_free_builder = {'name': "win2008-builder",
191 'slavename': "win2008-amd64",
192 'builddir': "win-amd64-free",
193 'factory': win_amd64_free_factory,
195 c['builders'].append(win_amd64_free_builder)
197 ####### STATUS TARGETS
199 # 'status' is a list of Status Targets. The results of each build will be
200 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
201 # including web pages, email senders, and IRC bots.
205 # Use allowForce=True (boolean, not a string. ie: not 'True') to allow
206 # Forcing Builds in the Web User Interface. The default is False.
207 from buildbot.status import html
208 c['status'].append(html.WebStatus(http_port=8010,allowForce=True))
210 from gerrit import GerritStatusPush
211 c['status'].append(GerritStatusPush('gerrit-prod'))
214 from buildbot.status import client
215 c['status'].append(client.PBListener(9988))
218 ####### PROJECT IDENTITY
219 c['projectName'] = "OpenAFS"
220 c['projectURL'] = "http://www.openafs.org/"
221 c['buildbotURL'] = "http://buildbot.openafs.org:8010/"