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?

Monday, December 13, 2010

Hudson – Creating users with no CAPTCHA

There was a requirement from one of the clients to have no CAPTCHA while signing up for new users in Hudson. A few searches showed that many had requested for this feature, and it was implemented using the security-no-captcha.hpi plugin.

I also heard from the client that they use open JDK and that the CAPTCHA doesn't show up when using this. I also saw a bug report on Hudson's issue list at the following link:

* Hudson, OpenJDK and CAPTCHA
* A second issue

Attached below are steps to install this plugin.

1. Open up a web browser and go to URL http://yourserver:yourhost where yourserver is the name of the system running Hudson. In my case it http://localhost:7223. This should bring the Hudson dashboard, click on the Manage Hudson link on the left hand side. This opens up the following page:

2.Click on Manage Hudson - Manage Plugins. Click now on the Available tab,
in the Authentication and User Management, check the Security No CAPTCHA check box, scroll all the way down click on the Install button at the far right hand corner.
3. Restart Hudson and you should be able to see the plugin in the Installed tab.
4. Within the Manage Hudson -> Configure System, now select the “Hudson’s own user database (Without a CAPTCHA)” check box. Within the Authorization tab, create a User, and check all options.

7. Save this configuration. And when you click on sign up at the right hand corner, no CAPTCHA is shown.
Hudson has been amazing me from day one, I just love to use this CI tool, and recommend every client to do so.

Thanks, Kohsuke Kawaguchi for such a wonderful tool.