Wednesday, December 15, 2010

Hudson - Setting up Windows Slave

Several of my colleagues  had trouble installing Hudson slave on a Windows machine. I was at a client site, and so decided to write step-by-step instructions for installing the same. It worked, and everyone was happy. So, here comes the instructions with screen shots.

1.    Log into the windows machine where the slave needs to be setup.
2.    Open up a browser and connect to the master. http://yourmaster:yourport. In my case, it is http://windowsserver:7223
3.    Click on Manage Hudson -> Manage Nodes. This will bring the following page:



4. Click on New Node. Provide a slave name and check on Dumb Node, and click OK.


5.Next, provide all the details for this slave


6. Save the setting. Put the slave.jar in a folder. From this folder run the following command:
java -jar slave.jar -jnlpUrl http://yourmasterserver:7223/computer/windowsslave/slave-agent.jnlp
windowsslave is the name you gave for the slave machine

7. This will start the slave, and you should see it running as follows:

 8.    And the slave should be listed on your Hudson Master dashboard as shown below:

The folder specified while configuring the slave will have the following slaves libraries downloaded:
  • maven2.1-interceptor.jar
  • maven-agent.jar
  • maven-interceptor.jar
Wasn't that easy?

4 comments:

  1. From Where we will get slave.jar file.and which path we need to specify in Remote FS root.

    ReplyDelete
  2. When you connect to the Master from the slave machine, it downloads the slave.jar as well.

    ReplyDelete
  3. saved a buch of time !! Thanks! :)

    ReplyDelete
  4. Thanks a lot, I configured as mentioned but I face a problem.

    When I close the slave command prompt
    I get a error message as " hudson slave connection was broken " on the master node

    Why is this happening ?

    ReplyDelete