Deploy Jira in OpenShift/OpenStack

zachary_m_toelkes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 25, 2020

I have done a bunch of research and googling and cannot find any "How to" on deploying Jira Data Center in OpenShift or OpenStack. Does anyone know how to do this? Please help

2 answers

0 votes
Alberto Aragón March 23, 2022

Hi all!

 

Do you have any update about this? I'm trying to deploy and run Jira in Openshift with no results.

 

The unique useful information about this topic in whole Internet is this answer in StackOverflow but, sadly, It doesn't work for me:

 

https://stackoverflow.com/questions/59555279/how-to-install-jira-server-on-open-shift-docker-image

 

Thank you in advance!

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2022

@Alberto Aragón OpenShift isn't officially supported but it is possible to deploy. Can you please share info on what exactly fails when you deploy to OpenShift?

Alberto Aragón March 24, 2022

Hi @Yevhen !

First, thank you so much for your interest.

I applied the solution proposed in the StackOverflow post to make the image compatible to run as an arbitrary uid (I modified both, Dockerfile and entrypoint._helpers.py files).

First time the pod is launched I can configure the admin user, the database, etc... but when the instance is Initializating the plugin system it suddenly reboot.

2022-03-21_14h55_16.png

After that, the pod enter in a infinite loop of reboots at this point.

2022-03-21_14h57_44.png

One trace I capture is this:

INFO:root:Generating /etc/container_id from template container_id.j2
WARNING:root:Could not chown path /etc/container_id to jira:jira due to insufficient permissions.
WARNING:root:Could not chmod path /etc/container_id to 420 due to insufficient permissions.
INFO:root:Generating /opt/atlassian/jira/conf/server.xml from template server.xml.j2

WARNING:root:Could not chown path /opt/atlassian/jira/conf/server.xml to root:root due to insufficient permissions.
WARNING:root:Could not chmod path /opt/atlassian/jira/conf/server.xml to 420 due to insufficient permissions.

INFO:root:Generating /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2

WARNING:root:Could not chown path /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/seraph-config.xml to root:root due to insufficient permissions.
WARNING:root:Could not chmod path /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/seraph-config.xml to 420 due to insufficient permissions.

INFO:root:/var/atlassian/application-data/jira/dbconfig.xml exists; skipping.
INFO:root:Running Jira with command '/opt/atlassian/jira/bin/start-jira.sh', arguments ['/opt/atlassian/jira/bin/start-jira.sh', '-fg']
executing as current user

 

 How can we modify the Dockerfile to make the image compatible with Openshift 4?

 

Thank you in advance. Regards.

 

 

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 24, 2022

@Alberto Aragón  is allowing anyiud for the service account an option for you? I mean leat the container run as 2001 user (or whatever user is defined in the Dockerfile)?

You may also make /opt/atlassian/jira writable for root group in your custom Dockerfile.

 

The chunks of log you have shared are warnings and not critical errors. Nothing interesting in the log when you see this infinite loop?

Alberto Aragón March 29, 2022

Hi Yevhen!

Allow anyiud in Openshift is not an option y my company :(

 

In relation with /opt/atlassian/jira directory, in Dockerfile I do:

&& chmod -R "u=rwX,g=rX,o=rX" ${JIRA_INSTALL_DIR}/ \
&& chown -R root. ${JIRA_INSTALL_DIR}/ \
.....
&& chgrp -R 0 ${JIRA_INSTALL_DIR} \
&& chmod -R g=u ${JIRA_INSTALL_DIR} \

The log doesn't provide much information. You can see here:

https://pastebin.com/yfRx2bm7

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 29, 2022

@Alberto Aragón  I don't see any permission issues or anything related to OpenShift (yes, I understand anyuid isn't an option due to security concerns).

So, logs are stuck at Starting the Jira plugin system? Have you waited long enough and made sure it's stuck there?

Also, can you check logs in Jira install dir perhaps (in addition to container logs)?

Also, what are your mem/cpu requests and limit for Jira container?

Alberto Aragón April 18, 2022

Hi Yevhen!

I'm sure it's stuck there since the process automatically restart over and over again at this point.

I think is not a memory issue. I tried in both: our Openshift cluster and Redhat developer sandbox. The result is the same.

By the moment, I think I'm going to hold the project of running Jira in Openshift in stand by. It seems the process is not straightforward and there is very little information about this on the internet.

Again, thank you so much for your interest and help.

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2022

Yes, a liveness probe would restart the container since the server never listens on 8080. Once again - the logs you shared show no errors at all, and perhaps it's worth grabbing logs from 

${JIRA_INSTALL_DIR}/logs

Though Jira isn't officially supported on OpenShift I have been running it in OCP 4.8+ (and a local CodeReady Containers) without any issues (though in my setup I'm using a Postgres DB rather than an embedded H2).

I'd be happy to help once you decide to get back to Jira-in-OpenShift project

Like Dina ElMowafy likes this
Alberto Aragón April 25, 2022

Hi Yevhen!

I've tried again and now, I really don't know why and waiting enough time, It works!

I get to configure the H2 database and create some dummy project and issues. Sadly, after a few minutes, some errors appear and redirect to me to login page. I will investigate this looking at the logs but, at least, the instance is runnning. It's a big step forward for me :)

Now I would like to figure out if It is posible to dinamically add Data Center nodes considering that a different cluster.properties file is needed in each node. Besides, the Docker image is prepared to install Jira when is launched and I think, considering my little knowledge of K8s and Openshift, It is not useful for a PODs repplication model.

Thank you for your help!

Yevhen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2022

@Alberto Aragón you don't need to worry about cluster.properties. When Jira container starts an entrypoint script is executed and among other things it grabs pod IP address and writes it to cluster.properties. This way, you can add Jira nodes by scaling jira statefulset.

Like Alberto Aragón likes this
Dina ElMowafy July 17, 2023

Hi @Yevhen ,

I see that you have been running Jira in OCP 4.8+, so I have a question regarding that.

We have jira running on docker compose and we're planning to have a jira data center cluster running in OCP. I need to know to do that, what are the hardware requirements and what is the expected time for that migration?

Many thanks in advance!

0 votes
Frédéric Danna March 26, 2020

Hello @zachary_m_toelkes 

I'm looking for quite the same thing: Helm/Helmfile Charts for deploying Jira and Confluence into our Openshift/Kubernetes/OpenStack cluster.

I found some info on the Atlassian support:

Please, let me know me if you've got more info, or contradictory info.

Regards,
Fred

zachary_m_toelkes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2020

Sounds good! I will, I will be digging into this pretty hard today so I will make sure to keep you updated.

Frédéric Danna March 26, 2020

Maybe a few interesting information when typing "openshift" in the search bar :

  • Jira Deployment Error using OpenShift - missing access to /opt/atlassian/jira
  • Is their any possibility to install jira on to openshift container
  • is the official docker image supported by Atlassian when running in Production (OpenShift)?
  • Receiving error 500 when accessing to Confluence hosted on Openshift platform
  • ...

Unfortunately, a lot of these questions have no answer.  :-(

Keep in touch!
Regards

Like Hiwad Said [venITure] likes this

Suggest an answer

Log in or Sign up to answer