使用 ccnet 建立农场
是否可以使用 CruiseControl.Net 来建立构建场? 我们目前有 4 台不同的构建机器在不同的时间构建不同的东西,并且以某种方式手动平衡负载有点令人头痛。 我更愿意指定其中一台作为主构建机器,当其他机器空闲时,它会将工作委托给其他机器。
Is it possible to use CruiseControl.Net to set up a build farm? We currently have 4 different build machines building different things at different times and have a bit of a headache to manually balance the load somehow. I would prefer to designate one of them to be the master build machine, which would delegate work to the other ones when they are free.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,CruiseControl.Net 不支持构建农场 - 至少不按照您描述的方式操作。 CCNet 对“农场”的解释似乎假设项目是手动分配给一台机器的,并且给定的项目将始终构建在同一台机器上。
如果您想动态选择实际执行构建的机器,则需要创建自己的机制来选择该机器并在其上触发构建。 与此相关的可能相当复杂。 例如,如果在前一次提交仍在处理期间发生第二次提交,您可能需要确保同一项目不会同时在两台不同的计算机上构建。
如果有一个所有构建机器都可以访问的共享位置,则可以使用文件系统源代码控制块或 CCNet 的 ForceBuild 机制在指定机器上启动构建,但让所有构建机器发布给定机器的输出投影到相同的最终位置。
As far as I can determine, there is no support in CruiseControl.Net for build farms - at least not operating the way you describe. CCNet's interpretation of "farm" seems to assume that projects are assigned manually to a machine and a given project will always be built on the same machine.
If you wanted to dynamically select which machine actually performs the build, you would need to create your own mechanism to select that machine and trigger the build on it. There is likely to be quite a bit of complexity associated with this. For instance you would probably need to ensure that the same project does not get built simultaneously on two different machines if a second commit occurs while the previous commit is still being processed.
If there is a shared location that all the build machines can access, it may be possible to use the Filesystem source control block or CCNet's ForceBuild mechanism to start the build on the designated machine, but have all the build machines publish their output for a given project to the same final location.
请参阅使用 CruiseControl 对构建农场进行负载平衡。 NET 博客文章寻找可能的解决方案
See load-Balancing the Build Farm with CruiseControl.NET blogpost for a possible solution