如何使用 HA 设置 Jenkins? [英] How to setup Jenkins with HA?

查看:21
本文介绍了如何使用 HA 设置 Jenkins?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我们使用 Jenkins 作为我们的 CI 系统,并且有一个主服务器和一个从服务器,由 Saltstack 在 Openstack 上提供.如果我们的 Jenkins 主服务器宕机,我们需要创建一个新的主服务器,我们需要从旧的主服务器中拉取文件 &换上新的,但至少需要 30 分钟.

Currently we are using a Jenkins as our CI system and there is one master server and slaves which are provisioned by Saltstack on Openstack. If our Jenkins master server goes down, we need to create a new master and we need to pull the files from the old master & put it in new ones but it's gonna take at least 30mins.

有什么方法可以设置具有高可用性的 Jenkins?

Is there any way to setup Jenkins with High Availability?

我已经检查了 Gearman 插件,但是如果 Gearman 服务器出现故障出于某种原因,我们还需要为 Gearman 设置一个 HA.

I already check with Gearman Plugin, however if the Gearman server goes down for some reason, we need to setup a HA for Gearman also.

还有其他方法可以为 Jenkins 设置高可用性吗?

Is there any other ways to setup a High Availability for Jenkins?

推荐答案

Jenkins 没有很好的 HA 故事;对于开源版本,您可以做的最好的事情是将 $JENKINS_HOME 中的所有文件放在共享文件系统上,然后拥有一台冷备用主机,如果活动主机出现故障,您可以启动它.这会将您的故障转移时间减少到主服务器重新启动所需的时间,通常只需几分钟.

Jenkins doesn't have a great HA story; the best you can do with the open source version is to put all of the files in $JENKINS_HOME on a shared file system, and then have a cold standby master machine that you can spin up if the active master goes down. That would reduce your failover time to however long it takes for the master to restart, which is usually just a few minutes.

您还可以查看 CloudBees 的 Jenkins Enterprise 产品,其中包括 高可用性插件.

You could also look at CloudBees' Jenkins Enterprise offering, which includes a High Availability Plugin.

这篇关于如何使用 HA 设置 Jenkins?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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