Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Hudson-ci/Installing Hudson Windows Service"

m
Line 7: Line 7:
 
Once Hudson is started, click the manage Hudson link and look for the "Install as Windows Service" link on the management page.  
 
Once Hudson is started, click the manage Hudson link and look for the "Install as Windows Service" link on the management page.  
  
[[Image:Hudson_Windows_Service_1]]
+
[[Image:Hudson_Windows_Service_1.png]]  
  
 
Clicking this link shows you the installation screen:  
 
Clicking this link shows you the installation screen:  
  
[[Image:Hudson_Windows_Service_2]]
+
[[Image:Hudson_Windows_Service_1.png]]  
  
 
Choose the directory where Hudson shall be installed (the directory must already exist). This will become {{code|HUDSON_HOME}} and will be used to store data files and programs.  
 
Choose the directory where Hudson shall be installed (the directory must already exist). This will become {{code|HUDSON_HOME}} and will be used to store data files and programs.  
Line 17: Line 17:
 
Upon successful completion of the installation, you should see a page asking you to restart Hudson. Note that you will need administrator privileges to complete this operation.  
 
Upon successful completion of the installation, you should see a page asking you to restart Hudson. Note that you will need administrator privileges to complete this operation.  
  
[[Image:Hudson_Windows_Service_3]]
+
[[Image:Hudson_Windows_Service_1.png]]  
  
 
<br> Hudson will then be relaunched as a Windows service.  
 
<br> Hudson will then be relaunched as a Windows service.  
Line 25: Line 25:
 
At this point you can use the service manager to confirm that Hudson is running as a service.  
 
At this point you can use the service manager to confirm that Hudson is running as a service.  
  
[[Image:Hudson_Windows_Service_4]]
+
[[Image:Hudson_Windows_Service_1.png]]  
  
 
h1. Install Slave as a Windows service (require .Net 2 framework)  
 
h1. Install Slave as a Windows service (require .Net 2 framework)  

Revision as of 02:41, 20 August 2011

Hudson Continuous Integration Server
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source
Hudson-bust.png Installing Hudson as a Windows Service











Install Hudson as a Windows service

First, you need to start Hudson before installing it. This can be done by running java -jar hudson.war. Now connect to hudson by going to the following URL http://locahost:8080/

Once Hudson is started, click the manage Hudson link and look for the "Install as Windows Service" link on the management page.

Hudson Windows Service 1.png

Clicking this link shows you the installation screen:

Hudson Windows Service 1.png

Choose the directory where Hudson shall be installed (the directory must already exist). This will become HUDSON_HOME and will be used to store data files and programs.

Upon successful completion of the installation, you should see a page asking you to restart Hudson. Note that you will need administrator privileges to complete this operation.

Hudson Windows Service 1.png


Hudson will then be relaunched as a Windows service.

Note.png
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.

Hudson Windows Service 1.png

h1. 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: \\  !slave-launch-icon.png|align=center!\\ \\

From the slave machine, launch a slave agent. You should see a window like this: \\  !slave.png|align=center!\\ \\

Choose "File" > "Install as Windows Service" from the menu: \\  !slave-install-menu.png|align=center!\\ \\

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.) \\  !slave-install-confirm.png|align=center!\\ \\

Once the installation succeeds, you'll be asked if you'd like to stop the current slave agent and immediately start a slave agent. \\  !slave-reboot-confirm.png|align=center!\\ \\

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: \\  !slave-service.png|align=center!\\ \\

h1. Install Slave as a Windows service (cmd version)

-In a cmd execute the following command:- {noformat} 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 {noformat}{-}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...-

{error}This information is false. Service created like this will never report back their status to Windows service manager, so the service will reported as not responding and gets terminated. If you have done this, run "sc delete HudsonSlave" to delete the service created. {error} h1. Changing the configuration of services

The JVM launch parameters of these Windows services are controlled by an XML file Template:Hudson.xml and Template:Hudson-slave.xml respectively. These files can be found in Template:$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.

h1. Uninstallation

To uninstall the service, run Template:Hudson-slave.exe uninstall from the command line.

Back to the top