如您所见,hudson 网站上的链接为 死了。
所以,我希望能一步一步地设置一个 Windows 从站和一个 Linux 主站。
我设法在 Windows 机器上设置 hudson,但是如何链接从属设备以向主控设备报告并启动从主控设备的构建以在 Windows 从属设备上运行。
基本上,主/从之间的数据流是如何实现的,我知道可以做到这一点,但网上没有文档明确说明要这样做。
如果您能给出尽可能详细的答案,我将不胜感激。
拜托了,谢谢你。
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.
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.
Please, and thank you.
发布评论
评论(3)
我实际上存档了 http://wiki.hudson-ci.org/display/HUDSON/Step+by+step+guide+to+set+up+master+and+slave+machines 站点。这是供您参考:
JNLP
指南将通过 JNLP 手动启动从站。在实际生产环境中,建议从站自动启动。本指南假设主机是 Linux 机器,从机是 Windows 机器。
主机
1. 单击左侧边栏的“构建执行器状态”链接(在早期版本中转到“管理 Hudson”->“配置执行器”)
2.对于每个slave,进行以下配置
3. 按左侧边栏上的“新节点”链接(在早期版本中按“从站”部分下的“添加”按钮)
4.“名称”- 输入从站的名称,例如“slave1”
5. “# of executors” - 输入从属设备的执行程序数量,即从属设备上允许的并发构建数量。处理器的数量是一个不错的起点。
6. “remote FS root” - 输入从属设备上此工作目录的绝对路径,例如“/export/home/hudson”。该目录将在从属设备上创建,并且构建中所需的所有数据都将存储在那里。例如“c:\temp\hudson_tst”
7.“使用”-将其设置为“尽可能多地利用该从站”
8.“labels”-为从站输入任意数量的标签,例如“windows”、“linux”、“jdk”
9. 按“保存”保存所有从站配置
10. 进入主页
11.创建一个新的自由风格项目并将其配置为:
12.选中“将此项目绑定到节点”复选框
13. 在“将此项目绑定到节点”部分的组合框中选择一个从站
14.勾选“执行Windows批处理命令”
15. 在“执行 Windows 批处理命令”部分的文本区域中输入“dir”
16. 按“保存”保存配置从
机
1. 启动网络浏览器并转到 Hudson 主页(位于主机上)
2. 在Build executor列表中点击slave的名称,会显示一个描述slave的页面
3. 单击“启动从属代理”链接启动从属代理
4. 等待 Web 启动应用程序启动并显示一个窗口,表明从属服务器已连接到主服务器(“已连接”)
5. 进入主服务器上的Hudson主页
6. 验证从站是否不再标记为离线
7. 启动与从属设备相关的构建(即上面的步骤 5)。这将在从属设备上启动构建,您可以通过转到为从属设备指定的“远程 FS 根”来验证它是否在从属设备上执行。它现在应该包含一个名为“workspace”的文件夹。
8. 转到构建历史记录并验证它是否在从属设备上执行。
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
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.
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"
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.
创建节点时,在使用部分下选择[仅将此节点保留给选定的作业]并给出一些标签名称。创建作业时,检查限制该项目可以运行的位置复选框,然后在显示的文本框中给出标签名称
when creating node select [leave this node for selected jobs only] under usage section and give some label name. And when creating job check restrict where this project can run check box then give label name in textbox displayed
首先您需要创建一个新节点。您可以从 http://hudson:8080/computer/ 执行此操作,单击左边。
启动节点的最简单方法是从从属节点单击该页面上新创建的节点,然后从那里启动 Java 客户端。
First you need to create a new node. You can do this from http://hudson:8080/computer/, click "New Node" on the left.
The easiest way to start a node is to, from the slave, click on the newly created node on that page and launch the Java client from there.