Jenkins主/从配置 [英] Jenkins Master/Slave configuration

查看:170
本文介绍了Jenkins主/从配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读有关Jenkins主/从配置的信息,但是我仍然有一些疑问:

I've been reading about Jenkins master/slave configurations but I still have some questions:

  1. 是不是这样,从属Jenkins却没有像主Jenkins那样实际安装和启动?我假设我将以相同的方式安装一个主Jenkins和另一个从属Jenkins,然后主Jenkins将控制从属,例如通过SSH?所以我无法通过GUI查看从属詹金斯吗?

  1. Is it so that the slave Jenkins is not actually installed and started up the way master Jenkins is? I assumed I would install one master Jenkins and another slave Jenkins in the same way, and then master Jenkins would control the slave e.g. through SSH? So I cannot view the slave Jenkins through a GUI?

之所以考虑在另一个VM上添加一个从属Jenkins,是因为该VM包含我们的应用程序服务器(许多测试环境).从主Jenkins部署和启动/停止应用程序服务器很痛苦,因为主Jenkins和应用程序服务器位于不同的计算机上.因此,如果我将从属Jenkins添加到应用程序服务器所在的机器上,则这些服务器实际上将在本地部署和启动/停止(由从属Jenkins进行).我想知道我是否错过了某些事情,或者我的推定是否仍然有效.

The reason why I have thought about adding a slave Jenkins on another VM is because the VM contains our application servers (many test environments). Deploying and starting/stopping application servers from master Jenkins is a pain because master Jenkins and application servers are on different machines. Therefore, if I would add a slave Jenkins to the machine where our application servers are, these would actually be deployed and started/stopped locally (by slave Jenkins). I wonder if I have missed something, of if my presumptions are still valid.

推荐答案

在标准的Jenkins主/从设置中,Jenkins仅安装在主服务器上.在那可以看到用户界面并启动/配置构建作业.

In a standard Jenkins master/slave setup, Jenkins is only installed on the master. That is where you see the user interface and start/configure build jobs.

从站执行作业.除了一个小型Java应用程序之外,这里没有安装Jenkins,可以让Jenkins与从属进行通信.詹金斯通过例如slave.jar应用程序与这些奴隶进行对话.通过 SSH Slaves Plugin 进行SSH,并可以监视从站是否正在运行,等等.

The slaves execute the jobs. There is no Jenkins installation here other than a small Java app to have Jenkins communicate to/from the slave. Jenkins talks to these slaves through the slave.jar app over e.g. SSH via the SSH Slaves Plugin and can monitor if the slave is running, etc.

因此,在您的情况下,您可以从将在应用程序服务器上执行的主服务器启动作业.

So in your case, you can start jobs from the master that will execute on the application servers.

主/从设置还允许您托管具有不同操作系统,不同硬件等的全部不同的从设备,您可以通过

The master/slave setup also allows you to host all whole bunch of different slaves, with different OSes, different hardware, etc. You can communicate job results (artifacts) from one slave to another via the Copy Artifacts Plugin.

在繁重的使用场景中,还有一些方法可以通过负载平衡来复制实际的Jenkins母版.那不是您想要的.

There are also ways to duplicate the actual Jenkins master with load balancing in a heavy use scenario. That is not what you seem to be looking for.

这篇关于Jenkins主/从配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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