Eating our own dog food – Running JIRA on MariaDB

A couple of weeks ago we announced that we were moving from a hosted instance of JIRA to our self hosted instance. The main reason was that we hit 2000 active users in the hosted instance of JIRA and that is the upper limit that it  supports. We obviously wanted to allow more people to be active in reporting and commenting on bugs and features for MariaDB. That’s why we set up our own instance, which now is up and running at jira.mariadb.org.

Thank you Atlassian, the company behind JIRA, for providing the hosted instance of JIRA for the MariaDB project over the last three years! It has served us well! At the same time we’re of course happy that the MariaDB project has outgrown the hosted instance.

Atlassian does not yet officially support MariaDB as a database for JIRA although some installations already use MariaDB Server as the database for JIRA. There is also demand being built up for official support of MariaDB Server for JIRA. Check out the request(s) about it in Atlassian’s own JIRA. The “Support for MariaDB” request is found here. If you think it’s important you can vote and comment on that issue to give it some more attention.

For the tracking of the MariaDB development project itself we of course wanted to use MariaDB as the database beneath JIRA.

jira.mariadb.org has been up and running for a week now with MariaDB Server 10.1.12 as the database server and MariaDB’s Java Connector as the database driver. The setup has been very successful so far, i.e. we haven’t experienced any problems. Below are a few instructions on how to use MariaDB as the database server for JIRA.

First of all install MariaDB. If you’re on one of the major Linux distributions the MariaDB Repository Tool will help you install the latest version of MariaDB. It’s found here.

Start installing JIRA as you would following the installation instructions.

  1. Install JIRA executables on the server as described but do not yet open the Setup Wizard in the browser.
  2. Download MySQL Connector/J. You’ll need it temporarily during the setup process. At the time of writing I used the following commands to get it and put it in the right place:
    wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.37.tar.gz
    tar -xvzf mysql-connector-java-5.1.37.tar.gz
    sudo cp mysql-connector-java-5.1.37/mysql-connector-java-5.1.37-bin.jar /opt/atlassian/jira/lib/
  3. Now continue in the browser with JIRA’s Setup Wizard, usually at this point found at http://localhost:8080 . On the first page make sure to choose the option I’ll set it up myself (for production environments). You’ll next be confronted with the screen Configure a database for JIRA. Do the following selections:
    Database setup: My Own Database
    Database type: MySQL
    Hostname: localhost
    Database: [name of database]
    Username: [username]
    Password: [password]
    

    Click Test connection to confirm it’s working and then Next. After clicking Next the database configuration file will be created in JIRA’s data directory. At this point don’t go any further in the wizard since now you’ll want to switch to MariaDB’s Java Connector.

  4. Now it’s time to install the MariaDB Java Connector. You’ll get the jar -file from https://mariadb.com/my_portal/download/java-client . Notice that you’ll need to log in. I used version 1.3.5 of the connector, but now 1.3.6 is available.
  5. Put the connector in JIRA’s directory for drivers/libraries, by default /opt/atlassian/jira/lib/
  6. Modify dbconfig.xml which is found in JIRA’s data directory, by default /var/atlassian/application-data/jira . Update driver-class to refer to the MariaDB Connector:
    <driver-class>org.mariadb.jdbc.Driver</driver-class>
  7. Restart JIRA, if you’re on Debian/Ubuntu as I am this is the command
    sudo service jira stop
    sudo service jira start
    
  8. Now you can continue with the Setup Wizard in the browser and when you come to the end you should have JIRA running on MariaDB using the MariaDB Java connector.

The MariaDB JIRA is open to anyone and has surpassed the amount of 2000 active users. This means that it’s a very active JIRA instance where a lot is going on all the time. We’ll regularly update JIRA itself, but also MariaDB and the connector to make sure that everything is running smoothly in future versions as well. I hope this encourages others to also run JIRA on top of MariaDB.