Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Running Cruise Control as a Windows Service

There are a number of solutions to get cruise control running as a windows service, but I found it the easiest to download Java Service Wrapper (http://wrapper.tanukisoftware.org/doc/english/index.html) and configure one file.

You then need to do the following:

1) Extract the file wrapper-windows-x86-32-3.2.0 to a temporary location.
2) Copy the conf and bin directory into your cruise control directory eg. C:\cc-sandbox\cruisecontrol-bin-2.4.0.
3) Copy the wrapper.jar and wrapper.dll in the lib directory to your cruise control lib directory.
4) Edit the wrapper.conf file and configure it with the following example as a guideline:

Code Block
borderStylesolid
\#*******************************************************************\*
# TestWrapper Properties
\#
# NOTE - Please use src/conf/wrapper.conf.in as a template for your
# own application rather than the values used for the
# TestWrapper sample.
\#*******************************************************************\*
# Java Application
wrapper.java.command=java

# Java Main class.  This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized.  Helper
# classes are provided to do this for you.  See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=C:/cc-sandbox/cruisecontrol-bin-2.4.0/lib/wrappertest.jar
wrapper.java.classpath.2=C:/cc-sandbox/cruisecontrol-bin-2.4.0/lib/wrapper.jar
wrapper.java.classpath.3=C:/cc-sandbox/cruisecontrol-bin-2.4.0/lib/*.jar
wrapper.java.classpath.4=C:/j2sdk1.4.2_08/lib/tools.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=C:/cc-sandbox/cruisecontrol-bin-2.4.0/lib

# Java Additional Parameters
wrapper.java.additional.1=-cp "%CRUISE_PATH%"

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=128

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=256

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=CruiseControl
wrapper.app.parameter.2=-configfile ../config.xml

\#*******************************************************************\*
# Wrapper Logging Properties
\#*******************************************************************\*
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=../logs/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes.  The default value
# of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
# files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

\#*******************************************************************\*
# Wrapper Windows Properties
\#*******************************************************************\*
# Title to use when running as a console
wrapper.console.title=Cruise Control 2.4.0

\#*******************************************************************\*
# Wrapper Windows NT/2000/XP Service Properties
\#*******************************************************************\*
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section.  The
# service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=cruisecontrol

# Display name of the service
wrapper.ntservice.displayname=Cruise Control Application (2.4.0)
# Description of the service
wrapper.ntservice.description=Cruise Control Description

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

5) Now run the InstallTestWrapper-NT.bat file. This will install the service.
6) Go to the windows services under computer management, and you will see your new cruise control service.
7) Set the service to automatic start.

FYI : You might need to hard code all the pathings in your config.xml file.