Thursday, January 13, 2011

Installing Hudson with Django

The latest Hudson Ubuntu repositories seem to be available here: The site,, at one point seems to have all the links unavailable. They seem to be downloadable now, but in the interim, I ended up downloading from the first site.

The Caktus blog at does a pretty good job explaining the basic steps of getting Hudson up and running. One thing to do after install the Debian package is to change HTTP_PORT to 8081. This way using the Django test dev server, you don't need to remind yourself to change the port # to 8080.

If you setup a virtual domain, you can then setup a reverse proxy with the following Apache config.


  ProxyPass         /  http://localhost:8081/
  ProxyPassReverse  /  http://localhost:8081/
  ProxyRequests     Off

    Order deny,allow
    Allow from all

Another thing to note is that when using virtualenvwrapper, invoking the 'workon' function within the Hudson script triggers a non-zero exit code. If you invoke the shell script with "#!/bin/bash -ex", the non-zero exit code will cause Hudson to abort prematurely. This Google discussion group at talks about the different ways to resolve the issue within the virtualenvwrapper script but not how you can bypass this issue until virtualenvwrapper is truly fixed. One way to do it is to simply put a "|| true" statement to bypass the issue.

#!/bin/bash -ex
source /usr/local/bin/ || true
workon hudson-dev || true

./ test setup --settings=settings.hudson

No comments:

Post a Comment