buildbot 使用什么算法将构建者分配给奴隶?
我有一个带有一些构建器和两台从机的构建机器人。
有些构建器可以在一台从机上运行,有些可以在两台机器上运行。
buildbot 将使用什么算法来安排构建?它是否会注意到某些构建器只能在一个从属设备上运行,并且它应该将那些可以在两个从属设备上运行的构建器分配给需求较少的构建器?
(我知道 buildbot 可用于在多种架构(例如 Windows、Linux 等)上运行相同的构建。我们使用它来分发构建以提高性能,因为单个构建对我们来说就足够了)。
I have a buildbot with some builders and two slave machines.
Some of the builders can run on one slave, and some of them can run on both machines.
What algorithm will buildbot use to schedule the builds? Will it notice that some builders can run on just one slave and that it should assign those that can run on both slaves to the less demanded one?
(I know buildbot can be used to run the same build on multiple architectures, say Windows, Linux, etc. We are using it to distribute builds for performance, because a single build is enough for us).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,它获取附加到该构建器的所有从属的列表。然后它随机选择一个。如果从服务器已经运行超过
slave.max_builds
版本,它会选择另一个。您可以重写
Builder
上的nextSlave
方法来更改选择从属设备的方式。传递给函数的参数将是Builder
对象和buildbot.buildslave.BuildSlave
对象的列表
。您必须返回后一个列表中的一项,或者None
。First it gets a list of all the slaves attached to that builder. Then it picks one at random. If the slave is already running more than
slave.max_builds
builds, it picks another.You can override the
nextSlave
method on theBuilder
to change the way slaves are chosen. The arguments passed to your function will be theBuilder
object, and alist
ofbuildbot.buildslave.BuildSlave
objects. You have to return one of the items of the latter list, orNone
.