|
Note that there is no requirement that the Hudson master server is running as a Windows service in order to run agents as a Windows service. For more information on how to set up just an agent go to Hudson agent service Hudson master serverRunning Hudson master server as a windows service can be done in several ways, either through the servlet containers or using the Winstone container. This section describes how to run Hudson master server using the Winstone container. To run the Hudson master server as a windows service using Winstone the Java Service Wrapper can be used to integrate Hudson as a Windows service. The below parts will get you up and running with Hudson as a Windows service but for more information please see the JSW site. Installation
ConfigurationThe JSW reads from the conf/wrapper.conf and is ready to be used. The default home path for Hudson is data, and if you want to change that you need to edit the configuration. If you don't have a java.exe on your PATH, change the wrapper.java.command in conf/wrapper.conf from just "java" to e.g. wrapper.java.command=C:/jdk1.6.0_03/bin/java. Below is a condensed version of the configuration file for the Hudson options, the conf/wrapper.conf will also contain options for the Wrapper library. # Change below line to change the Hudson home path wrapper.java.additional.1=-DHUDSON_HOME=../data Service handling
Frequently asked questionsTroubleshooting / LogsIf the service doesn't start, have a look at the wrapper.log which will be created in the bin directory when the service attempts to start. I want to run on a different port than default 8080.Open up the conf/wrapper.conf and add the following line. wrapper.app.parameter.2=--httpPort=8090 When I try to run the application I get wrapper | OpenSCManager failed - Access denied?This is because you don't have the necessary permissions, please ask an administrator to install the service. How can I run the service as a specified user?Open up the conf/wrapper.conf and change the following properties wrapper.ntservice.account = accountname wrapper.ntservice.password = password Why doesnt the Hudson server start in Windows 64bit?Unfortunately the JSW does not support 64 bits Windows (as of now, 4th november 2007). You can install a 32bits version of Java and specify the Java in the conf/wrapper.conf. wrapper.java.command=c:\program files(x86)\java\bin\java.exe Hudson agent serviceTo install the Hudson agents as a windows service the Java Service Wrapper can be used for integrating with Windows and Netx for starting the agent using the Hudson JNLP application. It is almost as simple installing the Hudson master server, but there is one extra configuration step for each agent machine. Installation
ConfigurationThe JSW reads from the conf/wrapper.conf which must be updated before service is started. When installing the above packages on each agent, you must specify the JNLP file that should be started in the service. The JNLP file is unique for each agent, and the link can be found in the agent machine page.
Below is a condensed version of the configuration file for the Hudson options, the conf/wrapper.conf will also contain options for the Wrapper library. # Application parameters. Add parameters as needed starting from 1 wrapper.app.parameter.1=netx.jnlp.runtime.Boot wrapper.app.parameter.2=-headless wrapper.app.parameter.3=-basedir wrapper.app.parameter.4=../cache wrapper.app.parameter.5=-nosecurity wrapper.app.parameter.6=-jnlp wrapper.app.parameter.7=http://akira:8090/computer/WS-1/slave-agent.jnlp Service handling
Frequently asked questionsThe master server has been updated, how do I update all agents?Stopping and starting the services will initiate a download of the new JNLP agent application. Other Service OptionsFireDaemon Lite V1.6Summary: Allows managing/creating/deleting all Windows services and using any application as a service, free of charge http://www.google.com/search?hl=en&q=FireDaemon-Lite-1_6-GA.exe&btnG=Google+Search Pros:
Cons:
ServiceAllSvcSummary: Installs/removes any program as a service, free of charge http://home.arcor.de/blackwell/current.html Pros:
Cons:
Example: cd c:\hudson copy c:\ServiceAllSvc\ServiceAllSvc.exe MyHudsonService.exe MyHudsonService.exe -install "Hudson Build System" "cmd.exe /c c:\hudson\start.cmd" "cmd.exe /c c:\hudson\stop.cmd" sc.exe (included in Windows XP)Summary: Installs/removes/manages services, runs any program as a service Pros:
Cons:
Example: |

Comments (1)
Dec 13, 2007
Anonymous says:
For changing the service to run as a specified user, we can also change it from ...For changing the service to run as a specified user, we can also change it from the Window Service -> hudson -> Properties -> Log On. That way, you don't have to put the password in the wrapper.conf file.