views:

277

answers:

4

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.

A: 

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.

sbi
Where did I crest that new node on the slave or the master?
garbagecollector
@garbagecollector: You do this using the web interface on the master.
sbi
then where is the connection between slave and master?
garbagecollector
@garbagecollector: From the _slave_, using a browser, you go to the newly created node's page on the master's web interface, and click onto the launch icon. This will start a slave which will connect to the master automatically. Why don't you simply try the steps I lined out?
sbi
No, I have no idea. You might find better help in the hudson mailing list.
sbi
A: 

Here's a blog post I wrote after finding that dead link - hopefully it will get you started.

gareth_bowles
nice blog post, any idea how to setup a windows slave w/ linux master, and manage the "/" vs. "\" I would really appreciate any help you could provide, I am in the same position you were in the blog post. :)
garbagecollector
Hmm, my post is a bit Linux specific as it relies on SSH, which you don't get by default on Windows. I'll try to play around with this a bit later, but I'm afraid I haven't tried setting up a slave on Windows yet.
gareth_bowles
thanks anyways. i will report back if i find anything new. Please do the same.
garbagecollector
+1  A: 

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.

William Leara
exactly how to do it. i figured it out just before i read you post.what does the dir in batch command do? how can I run shell scripts in a windows build.
garbagecollector
I think the point of the "dir" is just to demonstrate that the build is working. For Windows, add 1 or more "Execute Windows batch command" sections. Use them just like you were running a batch file in CMD.EXE.
William Leara
A: 

this blog is a life saver .... Been spending some time to figure out how to connect a window slave...really, thanks a lot for this post.

Nelms