Tuesday, June 21, 2011
Download and Install Hudson as a Windows service
Download Hudson :
http://hudson-ci.org/downloads/war/latest/hudson.warInstall Hudson as a Windows service
First, you need to start Hudson before installing it. This can be done from JNLP, or by running java -jar hudson.war".
Now connect to hudson by going to the following URL http://<hostname>:8080/
Now connect to hudson by going to the following URL http://<hostname>:8080/
Once Hudson is started this way, look for the "Install as Windows Service" link in the "Manage Hudson" page (requires .net framework version >= 2.0):

Clicking this link shows you the installation screen:

Choose the directory where Hudson shall be installed (directory must already exist. If not create it before hand). This will become HUDSON_HOME and used to store data files and programs alike.
Upon successful completion of the installation, you should see a page asking you to restart Hudson.

Upon successful completion of the installation, you should see a page asking you to restart Hudson.
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:

If a restart fails for some reason, check the output from Hudson, which is stored in the installation directory that you specified. |
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:

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.
Uninstallation
To uninstall the service, run hudson-slave.exe uninstall from the command line.
Suggestions are always welcome...! Without signing also you can send your comments.
Labels:
Build Management,
Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment