Installing and Using the Hudson build server

Version 99.1 by Paul Hoadley on 2010/07/31 07:36
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Hudson is an "extensible continuous integration server".  It monitors repeated executions of jobs, such as building software projects, and can be used to build WebObjects applications and frameworks.  Hudson is an open source project, and can be used at no cost.  An introductory presentation on building WebObjects projects with Hudson was given by Mike Schrag at WOWODC-West in 2009, and the video can be purchased from wocommunity.org.

There are a couple different ways to run Hudson. The easiest is to run it as a standalone application.

Standalone Installation

Information

These instructions are based on David Avendasora's setup. You may have different preferences as to where to install Hudson at or where to set its home directory to.

  1. Create a /Developer/Hudson/Home directory
  2. Download Hudson From http://hudson.dev.java.net. Save the hudson.war file to /Developer/Hudson
  3. Launch Hudson with the following command in Terminal.app:

java -DHUDSON_HOME=/Developer/Hudson/Home -jar /Developer/Hudson/hudson.war
Information

If you have an instance of tomcat or AJP running in a different process you can also use the \-httpPort= and \ajp13Port= options to change the ports used.
{code}
java -DHUDSON_HOME=/Developer/Hudson/Home -jar /Developer/Hudson/hudson.war -httpPort=9080 
ajp13Port=9009
{code}

  1. Point your browser to: http://localhost:8080/
  2. Start setting up jobs

Servlet Container Installation

  1. Install Tomcat from http://www.macports.org with the command

Unknown macro: noformat. Click on this message for details.

  1. Create an administrative user in /opt/local/share/java/tomcat6/conf/tomcat-users.xml (20 mins to find out where the user should be and how not to restart tomcat). Something along the line of:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="admin,manager"/>
</tomcat-users>

Don't forget to change the username and password after you have finished checking out the build server and start using it in production.

  1. Start tomcat

Unknown macro: noformat. Click on this message for details.

  1. download Hudson from http://hudson.dev.java.net, take care that you use the contextual menu to download the link hudson war file
  2. create a folder /opt/local/var/db/hudson (this will be the place where hudson will store it's stuff
  3. change ownership of that folder with ownership www:_www
  4. add to /opt/local/share/java/tomcat6/conf/setenv.local:

Unknown macro: noformat. Click on this message for details.

  1. Install Hudson in Tomcat: goto http://localhost:8080, login with the user and password that you have created in the tomcat-users.xml, and upload hudson.war to the tomcat server.
  2. Goto http://localhost:8080/hudson and you can start configuring your Hudson build server

Building WO Apps

  • Check out sh