Post

7 followers Follow
1
Avatar

Install Deployit as a Windows Service

  1. Download Tanuki Java Service Wrapper Community Edition
  2. Unzip it
  3. Copy this deployit.conf file into the conf directory of Java Service Wrapper
  4. Edit deployit.conf and fill the 4 first environment value (JAVA_HOME, DEPLOYIT_HOME, JAVASERVICEWRAPPER_HOME and SERVICE_TITLE)
  5. Testing the configuration (running Console in %JAVASERVICEWRAPPER_HOME%):  bin\wrapper.exe -c ..\conf\deployit.conf
  6. Installing Deployit as a Windows Service (running Console in %JAVASERVICEWRAPPER_HOME%):  bin\wrapper.exe -i..\conf\deployit.conf
  7. Uninstalling Deployit as a Windows Service (running Console in %JAVASERVICEWRAPPER_HOME%):  bin\wrapper.exe -r..\conf\deployit.con

Note: the stdout & stderr are now put in %DEPLOYIT_HOME%wrapper.log

Benoit Moussaud

Please sign in to leave a comment.

13 comments

0
Avatar

Attached a similar configuration file for YAJSW (Yet Another Java Service Wrapper), tested against Deployit 3.7.2 on Windows.

  1. Download YAJSW and extract to a directory (referred to as YAJSW_HOME)
  2. Download the attached wrapper-yajsw.conf file into YAJSW_HOME/conf and rename it to wrapper.conf
  3. Open wrapper.conf and set the JAVA_HOME and DEPLOYIT_HOME configuration variables
  4. Follow the YAJSW Quick Start from step "Execute your wrapped application as console application by calling..."

The default location of the wrapper log file will by DEPLOYIT_HOME/log/wrapper.log.

Happy deploying!

Andrew Phillips
XebiaLabs

XebiaLabs Support 0 votes
0
Avatar

Note that version 11.01 of YAJSW has a known issue related to log rolling. This has been fixed in 11.02, according to the issue.

 

Andrew

XebiaLabs Support 0 votes
0
Avatar

In newer versions of YAJSW (verified against 11.03), the property jna.tmpdir has been rename to jna_tmpdir.

Replace the line

wrapper.tmp.path = ${jna.tmpdir}

with

wrapper.tmp.path = ${jna_tmpdir}

in the wrapper.conf configuration file.

 

Andrew

XebiaLabs Support 0 votes
0
Avatar

Updated Tanuki configuration file for using a repository password under the parameters section.

XebiaLabs Support 0 votes
0
Avatar

In the updated TANUKI configuration file, deployit.conf, a number of parameters are specified, including the repository password. The first parameter is the start class: com.xebialabs.deployit.DeployitBootstrapper. According to the TANUKI documentation there should also be a stop class specification. In the above configuration file both the start and the stop class are identical. Is this correct? If not, what should be the name of the stop class? Whenever we try to stop the windows service the wrapper tries to start Deployit again, which results in a fault message.  

Sim Dijkstra 0 votes
0
Avatar

Hi Sim,

Which deployit.conf are you currently using? And can you also specify which Deployit version you're using?

Regards,

Joris

XebiaLabs Support 0 votes
0
Avatar

For YAJSW, you can also create the default wrapper.conf and custom it afterwards like *.jar by using the examples here.

Levent Tutar 0 votes
0
Avatar

I'm currently upgrading to XL Deploy version 4.0 from an existing POC install that did not have it running as a service. Is the above deployit.conf ok to use with it?

Brian Cooperider 0 votes
0
Avatar

It should be. The directory structure of xldeploy is still the same as deployit 9.x.

Levent Tutar 0 votes