I wanted to run multiple Hudson instances side-by-side. It was easy enough to get them running kicked off via batch files, but I wanted them to run as services, because I’m lazy and greedy.
Turns out it’s easy, though non-obvious.
- Install 1 Hudson instance as a Service.
- Stop the running Hudson service (net stop hudson)
- Copy the original hudson installation ($HUDSON_HOME) to another directory where you want the new service to reside
- Modify the copied hudson.xml in the new hudson install directory to give it a new service name. Change service/id from “hudson” to “hudson2”. Not the service name, the service id.
- Now run the following from the command shell in your new hudson directory: hudson.exe install
- Start your new server: net start hudson2
- Start your old server: net start hudson
- Finished!
Now if you want to uninstall it you simply run “hudson.exe uninstall” from the service $HUDSON_HOME directory. The mailing lists are good.