Hudson - 分步指南设置主机和从机 [英] Hudson -- Step by step guide to set up master and slave machines

查看:178
本文介绍了Hudson - 分步指南设置主机和从机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如您所见,hudson网站上的链接为 dead

As you can see, the link to that on the hudson website is dead.

所以,我希望有一点一步

So, I was hoping for a little step by step for setting up a windows slave with a linux master.

我设法在windows机器上设置hudson,但是我如何链接从机报告给主机,并启动

I managed to setup hudson on the windows machine, but how do i link the slave to report back to the master and initiate build from the master to run on the windows slave.

基本上如何在主/从之间的数据流动实现,我知道这可以做,但没有

Basically how is the flow of data between the master/slave achieved, I know this can be done but there is no documentation online that explicitly says do this.

我非常感谢您能给出的答案。

I would appreciate as detailed as an answer you could give.

推荐答案

我实际上归档了 http://wiki.hudson-ci.org / display / HUDSON / Step + by + step + guide + to + set + up + master + and + slave +机器网站。这里供您参考:

I actually archived the JNLP section of the http://wiki.hudson-ci.org/display/HUDSON/Step+by+step+guide+to+set+up+master+and+slave+machines site. Here it is for your reference:

JNLP

本指南将通过JNLP手动启动从属。在实际的生产环境中,建议从机自动启动。该指南假定主机是linux机器,从机是Windows机器。

JNLP
The guide will start the slaves through JNLP manually. In a real production environment it is suggested that the slaves are started automatically. The guide assumes that the master is a linux machine and the slave is a Windows machine.

主机

1.单击构建执行器状态链接(在早期版本中转到管理Hudson - >配置执行器)

2.对于每个从属设备,请执行以下配置

3.按左侧边栏上的新节点链接(在早期版本中,按下从属部分下的添加按钮)

4.名称 - 输入从属名称,例如slave1

5.#of executors - 输入从站的执行程序数,即从站上允许的并发程序数。

6.remote FS root - 输入此工作目录在从站上的绝对路径,例如'/ export / home / hudson' 。该目录将在从属上创建,并且构建中所需的所有数据将存储在那里。 exc:\temp\hudson_tst

7.usage - 设置为尽可能多地使用此从站

8.labels - Enter任何数量的标签为从属,exwindows,linux,jdk

9.按保存以存储所有从配置

10.转到主页

11.创建一个新的自由样式项目并将其配置为:

12.选中将此项目绑定到节点复选框

13 。在将该项目绑定到节点部分的组合框中选择一个从设备。

14.检查执行Windows批处理命令

15.输入dir进入执行Windows批处理命令部分的文本区域

16.按保存保存配置

Master machine
1. Click the "Build Executor Status" link on the left sidebar (in earlier releases Go to "Manage Hudson"->"Configure Executors")
2. For each slave, do the following configuration
3. Press the "New Node" link on the left sidebar (in earlier releases press the "Add" button under the "Slaves" section)
4. "Name" - Enter a name for the slave, ex "slave1"
5. "# of executors" - Enter the number of executors for the slave, that is the number of concurrent builds allowed on the slave. A good value to start with would be the number of processors.
6. "remote FS root" - Enter the absolute path of this work directory on the slave, such as '/export/home/hudson'. The directory will be created on the slave and all data needed in a build will be stored there. ex "c:\temp\hudson_tst"
7. "usage" - Set it to "Utilize this slave as much as possible"
8. "labels" - Enter any number of labels for the slave, ex "windows", "linux", "jdk"
9. Press "Save" to store all slave configurations
10. Go to the main page
11. Create a new free style project and configure it as:
12. Check the "Tie this project to node" check box
13. Select one of the slaves in the combo box in the "Tie this project to node" section
14. Check the "Execute Windows batch command"
15. Enter "dir" into the text area in the "Execute Windows batch command" section
16. Save the configuration by pressing "Save"

从机

1.启动Web浏览器并转到Hudson主页(位于主机上)

2.在构建执行程序列表中单击从属程序的名称,然后单击描述从属程序的页面显示

3.通过单击启动从属代理链接启动从属代理

4.等待Web启动应用程序启动并显示一个窗口,说明从属已连接到主服务器(已连接)

5.转到主服务器上的Hudson主页面

6.验证从站是否已标记为脱机< br>
7.启动连接到从站的构建(即上面的步骤5)。这将在从设备上开始构建,您可以通过转到为从设备指定的远程FS根来验证它是否在从设备上执行。它现在应该包含一个名为工作区的文件夹。

8.转到构建历史并验证它是否在从属计算机上执行。

Slave machine
1. Start a web browser and go to the Hudson main page (located on the master machine)
2. Click on the slave's name in the Build executor list, and a page describing the slave is shown
3. Launch the slave agent by clicking on the "Launch slave agent" link
4. Wait until the web start application has started and shown a window stating that the slave is connected to the master server ("Connected")
5. Go to the Hudson main page on the master server
6. Verify that the slave is no longer marked as offline
7. Start the build that was tied to the slave (ie step 5 above). This will start a build on the slave, you can verify that it was executed on the slave by going to the "remote FS root" that was specified for the slave. It should now contain a folder called "workspace".
8. Go to the build history and verify that it was executed on the slave.

这篇关于Hudson - 分步指南设置主机和从机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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