quote

giovedì, aprile 03, 2008

Installing cruisecontrol as service on windows XP


Here the steps I have followed in order to install and run cruisecontrol as a windows service.

  1. Download cruisecontrol. I used the version 2.6.2 windows installer.
  2. Run the installer and check the windows service box.
  3. Remove the service using the command: $ sc delete CruiseControl
  4. Go to <CRUISE_HOME> folder and edit the wrapper.conf file and be sure it contains the following entry:

    # Application parameters.
    # Add parameters as needed starting from 1
    wrapper.app.parameter.1=CruiseControlWithJetty
    wrapper.app.parameter.2=-jmxport
    wrapper.app.parameter.3=8000
    wrapper.app.parameter.4=-configfile
    wrapper.app.parameter.5=config.xml
    wrapper.app.parameter.6=-rmiport
    wrapper.app.parameter.7=1099
    wrapper.app.parameter.8=-webport
    wrapper.app.parameter.9=8180

  5. I set the listening port of cruisecontrol to 8180, you can change the value as you like.
  6. Open a dos windows corresponding to <CRUISE_HOME> folder and type: $ wrapper -i wrapper.conf
  7. You should read the message: "wrapper | CruiseControl Service installed."
  8. Try to open a browser at the url: http://localhost:8180
  9. If you see the normal screen of cruisecontrol you have been lucky (not like me) and you are done!.
  10. ...Otherwise...If you see an error like 500 code open the wrapper.log under the log folder. Check for a message like:
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.

    proceed with the following item.
  11. Copy the file tools.jar to <JAVA_HOME>\jre\lib\ext folder. I found this solution here.
  12. Restart the service, it should be works.
  13. If still doesn't work... copy the tools.jar also under the folder /lib/ext

Maybe there is a faster and easier process to have cruisecontrol running as service. Anyway if you follow this guide you will successfully configure cruise as service.