简体   繁体   English

Jenkins主/从配置

[英]Jenkins Master/Slave configuration

I've been reading about Jenkins master/slave configurations but I still have some questions: 我一直在阅读有关Jenkins主/从配置的信息,但仍然有一些问题:

  1. Is it so that the slave Jenkins is not actually installed and started up the way master Jenkins is? 是不是使得从属Jenkins并未像主Jenkins那样实际安装和启动? I assumed I would install one master Jenkins and another slave Jenkins in the same way, and then master Jenkins would control the slave eg through SSH? 我假设我将以相同的方式安装一个主Jenkins和另一个从属Jenkins,然后主Jenkins将通过SSH控制从属? So I cannot view the slave Jenkins through a GUI? 因此,我无法通过GUI查看从属詹金斯吗?

  2. 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). 我之所以考虑在另一个VM上添加一个从属Jenkins,是因为该VM包含我们的应用程序服务器(许多测试环境)。 Deploying and starting/stopping application servers from master Jenkins is a pain because master Jenkins and application servers are on different machines. 从主Jenkins部署和启动/停止应用程序服务器很痛苦,因为主Jenkins和应用程序服务器位于不同的计算机上。 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). 因此,如果我将从属Jenkins添加到应用程序服务器所在的机器上,则实际上将在本地部署和启动/停止(由从属Jenkins)。 I wonder if I have missed something, of if my presumptions are still valid. 我想知道我是否错过了某些事情,或者我的推定是否仍然有效。

In a standard Jenkins master/slave setup, Jenkins is only installed on the master. 在标准的Jenkins主/从设置中,Jenkins仅安装在主服务器上。 That is where you see the user interface and start/configure build jobs. 那是您看到用户界面和启动/配置构建作业的地方。

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. 除了一个小型Java应用程序之外,这里没有安装Jenkins,可以让Jenkins与从设备通信。 Jenkins talks to these slaves through the slave.jar app over eg SSH via the SSH Slaves Plugin and can monitor if the slave is running, etc. Jenkins通过例如通过SSH Slaves Plugin通过SSH的slave.jar应用程序与这些奴隶进行对话,并可以监视奴隶是否正在运行等。

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 . 主/从设置还允许您托管具有不同操作系统,不同硬件等的所有不同从服务器,您可以通过Copy Artifacts Plugin将作业结果(工件)从一个从服务器传递到另一个从服务器。

There are also ways to duplicate the actual Jenkins master with load balancing in a heavy use scenario. 在繁重的使用场景中,还有一些方法可以通过负载平衡来复制实际的Jenkins母版。 That is not what you seem to be looking for. 那不是您想要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM