[Buildbot-devel] How to configure slaves for multiple builds with the same builder?

Jason Edgecombe jason at rampaginggeek.com
Sun Aug 22 19:28:18 UTC 2010


Hi,

I'm using Jay Soffian's excellent gerrit scheduler 
(http://github.com/jaysoffian/buildbot/commit/e4c0d458374b9a0ce34c1e9e1c9813015b2e6add) 
with buildbot 0.7.12.

I have three slaves: windows, linux, and irix. Each gerrit commit is 
built on all of the slaves, then the status is reported to gerrit. The 
workflow is working well, but the irix box is a little slower on the 
builds. The irix machine has 4 CPU's, but only one build is running at 
one time. How can I configure a slave/builder to run multiple builds at 
the same time?

When I tried using a slavelock, it only let one slave build at a time. I 
want up to 4 changes on the master branch to build concurrently on the 
irix-builder.

Here is my master.cfg with the status stuff removed:
==============================
c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("debian-i386", "fakepassword", max_builds=2)]
c['slaves'].append(BuildSlave("win2008-amd64", "fakepassword", 
max_builds=2))
c['slaves'].append(BuildSlave("sgi_irix_65-64bit", "fakepassword", 
max_builds=2))
c['slavePortnum'] = 1234
import sys
sys.path.append('/home/buildmaster/buildbot-src/contrib')
from gerrit import GerritChangeSource
from buildbot.scheduler import Scheduler, Periodic
mybuilders = []
mybuilders.append("debian-linux-i386-builder")
mybuilders.append("win2008-builder")
mybuilders.append("irix-builder")
stable14_builders = []
stable14_builders.append("debian-linux-i386-builder")
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="all", branch=None,
                                  treeStableTimer=30,
                                  builderNames=mybuilders))
from gerrit import GerritScheduler
c['schedulers'].append(GerritScheduler("gerrit_scheduler", mybuilders, 
branches=["master"]))
c['schedulers'].append(GerritScheduler("gerrit_stable_scheduler", 
stable14_builders, branches=["openafs-stable-1_4_x"]))
repourl="git://git.openafs.org/openafs.git"
from buildbot.process import factory
from buildbot.steps.source import Git
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Configure
from buildbot.steps.shell import ShellCommand
f1 = factory.BuildFactory()
f1.addStep(ShellCommand(command=["sleep","120"]))
f1.addStep(Git(repourl=repourl, mode="update", ignore_ignores=True, 
retry=[120,60]))
f1.addStep(ShellCommand(command=["sh","regen.sh"]))
f1.addStep(Configure(command=["./configure","--enable-checking","--enable-supergroups","--enable-namei-fileserver"]))
f1.addStep(Compile(command=["make"]))
f1.addStep(ShellCommand(command=["make","dest"]))
b1 = {'name': "debian-linux-i386-builder",
       'slavename': "debian-i386",
       'builddir': "full",
       'factory': f1,
       }
c['builders'] = [b1]
irix_configure_env={'CC':"cc"}
irixfactory = factory.BuildFactory()
irixfactory.addStep(ShellCommand(command=["sleep","120"]))
irixfactory.addStep(Git(repourl=repourl, mode="update", 
ignore_ignores=True, retry=[120,60]))
irixfactory.addStep(ShellCommand(command=["sh","regen.sh"]))
irixfactory.addStep(Configure(command=["./configure","--enable-checking","--enable-supergroups","--enable-namei-fileserver","--with-krb5=/usr/nekoware"],env=irix_configure_env))
irixfactory.addStep(Compile(command=["gmake"]))
irixfactory.addStep(ShellCommand(command=["make","dest"]))
irixbuilder = {'name': "irix-builder",
       'slavename': "sgi_irix_65-64bit",
       'builddir': "irix-65-64bit",
       'factory': irixfactory,
       }
c['builders'].append(irixbuilder)
win_amd64_free_factory = factory.BuildFactory()
win_amd64_free_factory.addStep(ShellCommand(command=["ping","-n","120","localhost"]))
win_amd64_free_factory.addStep(Git(repourl=repourl, mode="update", 
ignore_ignores=True, retry=[120,60]))
win_amd64_free_factory.addStep(Compile(command=["build-openafs.cmd", 
"amd64", "free"]))
win_amd64_free_builder = {'name': "win2008-builder",
       'slavename': "win2008-amd64",
       'builddir': "win-amd64-free",
       'factory': win_amd64_free_factory,
       }
c['builders'].append(win_amd64_free_builder)
===============================

Any help is appreciated.

Thanks,
Jason




More information about the devel mailing list