Installing and Using the Hudson build server

Version 81.1 by Johan Henselmans on 2009/06/10 10:20

Hudson is a build server that takes the chore of the building and can do it automatically, based on all kinds of variables. 

The complete introduction has been show on wowodc-west in 2009. 

Installing Hudson

To get Hudson running, the easiest way is to start running tomcat on a server. 

  • Install Tomcat from http://www.macports.org  with the command
    ==========================================
    sudo /opt/local/bin/port install tomcat6
    ====================================
  • 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>
========================
(remember this is testing)

  • Start tomcat, (1 min)

========================
sudo launchctl load w /Library/LaunchDaemons/org.macports.tomcat6.plist
========================

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

========================
export HUDSONHOME=/opt/local/var/db/hudson
export JAVA
OPTS=-Djava.awt.headless=true
========================

  • install Hudson in Tomcat: goto 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. 

Next