Updating Jira

If you are upgrading jira locally

which is highly recommended before you try upgrading the live version.

Attach into the container

lxc-attach container-name

Change to the root user using the following command: su

We then need to head on over to server.xml to get rid of the proxy line to access the local version

cd /opt/atlassian/jira/conf

vim server.xml

Change the following line:

proxyName="jira.ec.edmondscommerce.net" proxyPort="80"

So that it looks more like:

"address=192.168.122.***" "port=8080" The address is the container IP and the port is 8080.

based on https://confluence.atlassian.com/adminjiraserver/upgrading-jira-applications-using-the-installer-938846937.html

And then continue onto the next steps which can be done on the cluster container itself (updating live) as well as locally (updating locally):

Upgrading Jira on the cluster.

We need to download the jira upgrade tool. Do this in a directory that isn't within anything jira related.

First go here to get a link to the latest Jira. Make sure the drop down box is on linux and and the you can right click "Download" and then copy link address. https://www.atlassian.com/software/jira/download

We need to make sure we are downloading the tool to a sensible place so we can find it but also not lose it when the upgrade moves around files.

I suggest changing the directory to /opt/atlassian/ which can be done with cd /opt/atlassian

wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-7.10.0-x64.bin

Change the "x" to the right number for the next set of commands.

Then we need to change the permissions of the tool.

chmod a+x atlassian-jira-software-x.x.x-x64.bin

And then run it

/.atlassian-jira-software-x.x.x-x64.bin

You will get some questions and you will need to give the following answers:

```Unpacking JRE ... This will install JIRA Software 7.8.0 on your computer. OK [o, Enter], Cancel [c]

1
Input: `o`
Choose the appropriate installation or upgrade option. Please choose one of the following: Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2], Upgrade an existing JIRA installation [3, Enter]
1
2
3
4
Input `3`

``Existing installation directory:
[/opt/atlassian/jira]
Just press Enter for this unless you know it's wrong.

```Back up JIRA home directory The upgrade process will automatically back up your JIRA installation directory. You can also choose to back up your existing JIRA home directory. Both directories are backed up as zip archive files in their respective parent directory locations.

We strongly recommend choosing this option in the unlikely event that you experience problems with the upgrade and may require these backups to restore your existing JIRA installation.

If you have many attachments in your JIRA home directory, the zip archive of this directory may consume a significant amount of disk space. Back up JIRA home directory? Yes [y, Enter], No [n]

1
2
3
4
5
6
Input: `y`     

When it asks about the list of modified files, just hit enter.

``Do you want to proceed?
Upgrade [u, Enter], Exit [e]
Input u

1
2
Start JIRA Software 7.8.0 now?
Yes [y, Enter], No [n]
Input: n

We say no to this as we need a driver for the database.

Oracle JDBC driver is no longer bundled with JIRA, which makes life a little harder.

Starting JIRA without the new driver will result in an error until you replace the driver, and restart.

Jira can have dashboard and other issues if we don't have the proxy

"The connection URL in your dbconfig.xml file contains the storage_engine parameter, which has been deprecated. This needs to be replaced with the default_storage_engine parameter"

This error has popped up a few times and can be fixed by

cd /var/atlassian/application-data/jira/ 

IGNORE FOR NOW - NEEDS FACT CHECKING

The below instructions are based on our internal ec jira update that required a new driver. This hasn't happened since but worth keeping for some guidance.

Need to change this.We need the MySQL database driver. NOT ORACLE

To get the driver head on over to:

http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html

Hit Accept Licenser Agreement and select the option under "getting Started"

This is what that option looks like at the moment. ojdbc8.jar (4,036,257 bytes) - (SHA1 Checksum: 60f439fd01536508df32658d0a416c49ac6f07fb) Certified with JDK 8; It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection

When you click that you will need to log in to a Oracle account which you can find here: https://docs.google.com/spreadsheets/d/1ARMdHOEL72oJV6QhPzgT6kje2v7xs7maPA2gI4i7VAM/edit#gid=0&range=12:12

Once that is downloaded, we need to put it into /opt/atlassian/jira/lib.

We need to use the scpContainerPush command to do this.

When I used the command locally to push to the ec-internal-jira container it was limited to the ec user. I had the file I needed from Oracle downloaded inside /home/simon/Downloads. So I used the following command to move the file into a folder on the container owned by the ec user.

1
[root@mirror Downloads]# scpContainerPush ec-internal-jira /home/simon/Downloads/ojdbc8.jar /home/ec
I then used the sshContainer command to get inside the container

sshContainer ec-internal-jira

used the mv command as root

su to change to root

then went into the home/ec directory to check the file was there.

cd /home/ec

and the list the files

/ll/

see that the file we need is there so we then move it

mv ojdbc8.jar /opt/atlassian/jira/lib

1
2
3
4
5
6
After the upgrade
7. Upgrade the database driver
If you're using an Oracle or MySQL database, download the JDBC driver and place it in <JIRA-installation-directory>/lib.

Oracle: JDBC driver 12.1.0.1.
MySQL: the latest JDBC driver.