Install Hudson as a Windows serviceFirst, you need to start Hudson before installing it. This can be done from JNLP, or by running java -jar hudson.war". ![]() Clicking this link shows you the installation screen:
![]() Choose the directory where Hudson shall be installed. This will become HUDSON_HOME and used to store data files and programs alike. ![]() This is to re-launch Hudson as a newly installed Windows service. When you click yes, you'll be asked to wait until the restart completes:
![]()
At this point you can use the service manager to confirm that Hudson is running as a service. ![]() Install Slave as a Windows service (require .Net 2 framework)Hudson also allows you to install a slave agent as a Windows service. (See Distributed builds for more about how to do distribute builds in general.) First, you configure your slave to run as a JNLP slave agent. This should create a JNLP launch icon in the corresponding page, as shown below:
From the slave machine, launch a slave agent. You should see a window like this:
![]() Choose "File" > "Install as Windows Service" from the menu:
![]() Confirm your intention to install as a service. The installation will place the program files to the directory designated as the slave root directory (from the "configure executors" screen.)
![]() Once the installation succeeds, you'll be asked if you'd like to stop the current slave agent and immediately start a slave agent.
![]() When you click "OK", the slave agent window will terminate. The new slave agent runs as a service without showing a window, so head over to the service manager from the control panel and confirm that the slave agent is indeed running as a service:
![]() Install Slave as a Windows service (cmd version)In a cmd execute the following command : sc.exe create HudsonSlave binPath= "C:\WINDOWS\system32\java.exe -jar C:\hudson\slave.jar -jnlpUrl http://SERVER:PORT/computer/MACHINE/slave-agent.jnlp" start= auto This is a very simple version, you can elaborate start scripts which use some program to hide the CMD window, select the good server and try to ping it, get the MACHINE variable with %computername% ,etc... Changing the configuration of servicesThe JVM launch parameters of these Windows services are controlled by an XML file hudson.xml and hudson-slave.xml respectively. These files can be found in $HUDSON_HOME and in the slave root directory respectively, after you've install them as Windows services. The file format should be self-explanatory. Tweak the arguments for example to give JVM a bigger memory. Stdout and stderr from the service processes go to log files in the same directory. UninstallationTo uninstall the service, run hudson.exe uninstall from the command line. |











Comments (6)
Nov 07, 2008
Peter Kahn says:
If you run into an authentication problem (perhaps because you are using apachea...If you run into an authentication problem (perhaps because you are using apache-auth on your SVN server) you can force the service to cache the auth credentials by going to the *script console* and executing some groovy code that auths as the user you'd like to use.
"cmd /c svn ls \--username builder \--password blah http://svn.host.com/svn/repos".execute()Feb 18
Liya says:
I work with version 1.276 installed on Windows XP and i don't have this option i...I work with version 1.276 installed on Windows XP and i don't have this option in the Manage Hudson page..
VisualStudio 2008 is installed on the machine.
Do i need to configure anything else?
Mar 30
gust says:
I noticed that Hudson slave as a service must be configured Log on as account to...I noticed that Hudson slave as a service must be configured Log on as account to get slave's other drives to work. If Local System Account used Hudson job did not find other drives (E
.
Also there must be free space 1Gb
available in slave Windows, otherwise connection (master<->slave) won't work. Pls correct me if I am wrong.
-gust-
Apr 07
Jochen Kapaun says:
where can i find the hudson.war file for the installation? under download i jus...where can i find the hudson.war file for the installation?
under download i just find a hudson.zip file.
also, which version should be downloaded? they are all marked as stable? seems quite strange to me.
Apr 21
David Dull says:
All you have to do is change the extension from zip to hpi. Windows is helping y...All you have to do is change the extension from zip to hpi. Windows is helping you!
Apr 21
David Dull says:
Is anyone having problems w/ environment variables not matching?...Is anyone having problems w/ environment variables not matching? (windows XP)
If I go to manage hudson -> system information and display the environment variables the list is incomplete as compared to the list given when I just do a set command from DOS. (what's missing is the embedded compiler license)
Thank you