JIRA instance migration phase3: upgrading jira

URL Link //n.sfs.tw/15599

2022-02-01 22:36:15 By

step1. upgrade from 7.6.1 to 7.13.18

accroding to jira upgrade matrix, 7.13 is the long term support version

so I start with upgrading to 7.13.18 the last updated version of 7.13 series.

these actions need to be done,

1-1. unzip jira software package to target directory.

1-2. modify property file in order to guide new application to same jira home directory,

normally is located under /var/atlassian/

this is the default path to it: /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/jira-application.properties

1-3. check dbconfig.xml to make sure your database user and password are both correct.

1-4. java jre path nee to be set as: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/

only point to java directory path, not java execute program location.

1-5 modify setenv.sh memory allocation and other JVM arguments

1-6 license need to upgrade, but a trial key can be applied

working on missing board function tab problem now...

everything is fine, next issue is upgrade to 8.x version,

those steps above are invalid,

only need to unzip jira web home to /var directory

then unzip jira8.x software package to /opt or target directory

here are settings need to be modified

2-1. setup start-jira.sh

file is located at jira core directory, normally at /opt/atlassian/jira/bin

in order to make jira web program to find jira home data at /var/atlassian/

in this file, one line need to be added,

under: export START_JIRA_JAVA_OPTS="-Datlassian.plugins.startup.options='${@}'"

add this line to pointing to jira home data:

export JIRA_HOME=/var/atlassian/application-data/jira

2-2. setup setenv.sh

same step as above, to provide more memory allocation for jira program.

 

next step is the most important one, if you want to setup nginx as reverse proxy for jira instance

3. setup nginx as reverse proxy

3-1. install nginx on centos7

vi /etc/yum.repos.d/nginx.repo

------------------------------------------

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

------------------------------------------

yum install nginx -y

systemctl start nginx && systemctl enable nginx

3-2. setup selinux policy

yum install policycoreutils-python

yum install audit2allow

setsebool -P httpd_can_network_connect 1

cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M mynginx

semodule -i mynginx.pp

systemctl restart nginx

3-3. setup reverse proxy

vi /etc/nginx/conf.d/default.conf

add following lines:

on the top of file, need to include upstream function at first,

--------------------------

upstream $your_server_hostname {
      server $ip:192.168.2.80:8080 weight=100 max_fails=5 fail_timeout=5;
    }

//ingore the $ sign for reminder, just add hostname and ip to match nginx protocal

--------------------------

$your_server_hostname is variable depends on your setting

server's $ip is also variable

inside the server embrace settings, add following lines,

--------------------------

    location / {
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://$your_server_name;
        }

---------------------------

proxy_pass function read the same name used in upstream $your_server_hostname

ignore the $ sign

 

references:

https://confluence.atlassian.com/adminjiraserver/setting-your-jira-application-home-directory-938847747.html