Migrating Jira and Confluence from Tomcat to Glassfish

I have had jira and confluence running under tomcat 5.5.23 (behind apache over AJP13/mod_jk) for a while now. The aim is to migrate them over to glassfish (behind the same apache but with mod_proxy).

Software versions:

  • Atlassian Jira 3.12.2
  • Atlassian Confluence 2.8.0
  • Apache Tomcat 5.5.23
  • Glassfish 2.1 build 39

First - some links I found useful:

So - what changes had to be made?

Jira

In the jira download area (where you build the war) - I had only one file in edit-webapp from when building for tomcat - edit-webapp/WEB-INF/classes/entityengine.xml. In this file I had to change the JNDI names for UserTransaction and the datasource - removing java:comp/env (this seems to be a difference between tomcat and glassfish, tomcat wants the whole path where glassfish assumes you are in the env section of the JNDI tree - affects confluence too - see below).

Then a simple ./build.sh war and a new war was generated. I deployed the dist-generic rather than the dist-tomcat war file to glassfish using the GUI.

Confluence

Easier than JIRA - just deploy the same expanded directory that tomcat was using (I had confluence expanded on disk and had used a config in tomcat/conf/Catalina/localhost to point to it).

Changes required - in confluence_home there is a confluence.cfg.xml - defines amongst other things the datasource. You need to make the same change here to the JNDI name - remove java:comp/env

Datasources

Remember that for both you must have:

  1. Defined your datasource in glassfish resources (admin GUI)
  2. Have the correct JDBC driver in glassfish/lib

mod_jk -> mod_proxy

Mod proxy was already available on the server (debian makes it very simple to enable) - so all I had to do was to replace

JkMount /jira tomcat_worker

with

ProxyPass /jira http://localhost:8080/jira
ProxyPassReverse /jira http://localhost:8080/jira

Other changes

Both jira and confluence are displayed under https using a self-certified certificate in apache2. The jiraissues macro in confluence will call jira over this. Therefore glassfish JVM must trust the certificate. Under tomcat I had the certificates in the default JVM stores $JAVA_HOME/jre/lib/security/cacerts and jssecerts. Glassfish has its own under domains/domain1/config (see http://www.chrissearle.org/blog/technical/adding_self_signed_https_certi...).

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <strike> <caption>
  • Lines and paragraphs break automatically.
  • Replace [debbug:xxxxx] with a link to the relevant debian bug.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • You may link to Gallery2 items on this site using a special syntax.
  • Insert Google Map macro.
  • Images can be added to this post.
  • You can link nodes to other nodes using the following syntax:
    [node:node_id,param_1="val1",param_2="val2"]

More information about formatting options