使用共享从站池的多个Jenkins主站 [英] Multiple Jenkins Masters using a Shared Slave pool

查看:139
本文介绍了使用共享从站池的多个Jenkins主站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Jenkins扩展到一个大型组织.有没有办法让多个Jenkins主节点共享一个从属池?例如,如果我有200个Jenkins Master,并且希望他们共享同一组50个Linux从属.

I am trying to scale Jenkins for a large organization. Is there a way to have multiple Jenkins masters share a slave pool? For example, if I had 200 Jenkins Masters and I want them to share the same set of 50 Linux slaves.

也就是说,假设每个从站只有一个执行程序,如果主站A向从站池提交作业,并且它正在从站1上运行,如果主站B向从站池提交作业,它将尝试在一个从站池上运行其他自由奴隶,因为奴隶1已经被占领.

That is, assuming each slave only has 1 executor, if Master A submits a job to the slave pool and it is running on Slave 1, if Master B submits a job to the slave pool, it would try to run on one of the other free slaves, since Slave 1 is already occupied.

我知道,如果我将从属服务器配置为每个主服务器都有一个新的工作区和执行程序,则多个主服务器可以共享一个从属服务器.但是,我希望能够设置一次从属服务器,而不是为每个主服务器在从属服务器上运行slave.jar.

I know multiple masters could share a single slave if I configured the slave to have a new workspace and executor for each master. However, I want to be able to set the slave up once, instead of having a slave.jar running on the slave for each master.

Cloudbees Op Center似乎提供了此功能,但是正在寻找一种使用开放源代码版本实现此功能的方法.如果没有,您认为扩展Jenkins来具有此功能将有多困难?我有Java开发经验,并且在Jenkins插件开发方面做了一些工作.

Cloudbees Op Center appears to provide this functionality, but looking for a way to do this with the Open Source version. If not, how difficult do you think it would be to extend Jenkins to have this functionality? I have Java development experience and have done a little work with Jenkins plugin development.

谢谢

推荐答案

您已经注意到在主服务器之间共享从服务​​器并不难,只需设置多个工作区,每个主服务器将安装自己的从属jar.诀窍是正确共享资源.

As you've noted it's not hard to share slaves between masters, just setup multiple workspaces and each master will install it's own slave jar. The trick is to share resources properly.

一个这样的资源管理器是 Apache Mesos . Jenkins Mesos插件存在,可以在托管集群上创建从属.

One such resource manager is Apache Mesos. A Jenkins Mesos plugin exists enabling the creation of slaves on a managed cluster.

这种方法是非常新颖的,Ebay已在博客中介绍了他们如何改进其詹金斯设置以使用Mesos:

This approach is very new and Ebay have blogged on how they've evolved their Jenkins setup to use Mesos:

  • Ebay CI solutin part 1
  • Ebay CI solution part 2

希望这会有所帮助.

这篇关于使用共享从站池的多个Jenkins主站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆