Sunday, February 24, 2013

Deploy Trac on OpenShift in under 5 minutes

If you have't played with Openshift yet, you should.  PaaS is going to change custom application development cycles and deployment processes in a much needed way.

One of the best things about PaaS is being able to fire up applications very quickly, and get straight to writing code.  But you still need to tools to support the process... like defect tracking.

I didn't see development tool for defect tracking on OpenShift so I decided to create a Trac quickstart.  This quickstart will have you running Trac in under 5 minutes.

The GitHub URL for my quickstart is here:

Here is how you deploy it:
  • If you haven't already, register for a free account at
  • Create a new application.
  • "Choose type of application" -> scroll to bottom and select 'do it yourself'.
  • For public URL, name the application name what you would want your Trac repo to be named, i.e. ProjectX
  • Click Create application

The following steps...
  • Clone the GitHub repository
  • cd into the git dir
  • Add your openshift application git repo as a remote git repository
  • Overwrite your openshift repo with the openshift-diy-trac one
git clone
cd openshift-diy-trac
git remote add openshift [your openshift git REPO URL here]
git push -f openshift

Let me know how this goes for you in the comments.  I'm interested in feedback on this quickstart or others that you would like to see.


  1. Hi Brian Cook, i got 503 error after deployed and view on my url. Could you please help me to sovle this problem? thanks

  2. Thank you so much for this tutorial, Brian. After following the steps you explained I got an error.
    When I open my website a 503 error appears. I tried to restart the application, but it continues showing the error. Could you please provide some further information about this error? Thanks =)

  3. The action hooks require some updating as they refer to wrong openshift env variables. I.e. the start script under $OPENSHIFT_REPO_DIR/.openshift/action_hooks should look like what I attached below. Note the use of $OPENSHIFT_DIY_IP instead of $OPENSHIFT_INTERNAL_IP and $OPENSHIFT_DIY_PORT instead of $OPENSHIFT_INTERNAL_PORT. Best to change in your local repository and then commit/ add and push to openshift.

    Seems to solve at least the 503 problem ... But need to test to see how everything else is working.

    [ action_hooks]\> cd $OPENSHIFT_REPO_DIR/.openshift/action_hooks
    [ action_hooks]\> cat start
    echo "Starting TRAC:"


  4. How do i setup authentication using this? I am using the following command :- /var/lib/openshift/54970d81fcf9333ceb00000e/app-root/runtime/repo/trac/tracd -b -p 8080 -s /var/lib/openshift/54970d81fcf9333ceb00000e/app-root/data/foundationissues --auth="foundationissues,/var/lib/openshift/54970d81fcf9333ceb00000e/app-root/runtime/repo/passwords,foundationdriven"