Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Starting Jira using Kubernetes

Ahmed Magdy
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!
August 12, 2024

This is a guide on how to start Jira using Kubernetes:

Prerequisites:

  • Download and Install Kubernetes, here we will use Minikube.

for the scripts used in this demo please refer to: 

you can pull/download the files and start Jira using the instructions bellow

Note: you need to open the terminal on the same directory where the folders exists.
Note: This will start  a full environment you can edit the files to use your own environment. 


 

Database

Database credentials:

           username :  sa

           Password: P@ssw0rd

run the following command to startup the database engine:

    kubectl apply - f mssql-statfulset.yaml

after starting the Pod you will wait till the container is created and running you can check by using :

kubectl get pod

if you run the 2 commands immediately after each other you will get:

Screenshot 2024-07-29 134053.png

you can wait for a while and try again till you get:

Screenshot 2024-07-29 134004.png

this means that the container is running and the database engine started.

Connect to Database

the next step is to create the database for jira:

for this example we will be using "Microsoft SQL Server Management studio":

start the application and click on connect then configure as following:

     Server name: node IP,31433

Screenshot 2024-07-29 134419.png

you can get the node IP using this command:

node IP:

kubectl get node -o wide

Screenshot 2024-07-28 175530.png

after connecting the database click on database folder and select New Database: 

Screenshot 2024-07-29 135435.png

and create new database with the name Jira and the owner is SA

Screenshot 2024-07-29 135345.png

Now the database is ready to go

and can be used in any database configuration.


Jira service

before you start update the ip in the jira-svc.yml file with the node ip

kubectl apply -f jira-svc.yml

check that the service is created and running

kubectl get svc

Screenshot 2024-07-29 151448.png


Shared files folder

kubectl apply -f nfs-server-deployment.yaml

Screenshot 2024-07-29 142232.png

wait for a while and check that the nfs-server is running

kubectl get pod

Screenshot 2024-07-29 142343.png

Now we can use the nfs to create the volume that will be mounted in the Jira containers as the shared-folder.

NFS-Server IP

before we start we need to know the nfs-server ip:

kubectl get svc

Screenshot 2024-07-29 142845.png

next we will add this ip to the PV file.


PV (Persistent volume)

update nfs-pv.yml with nfs-server ip

then create the PV

kubectl apply -f nfs-pv.yaml

check that the PV created:

kubectl get pv

Screenshot 2024-07-29 143846.png


PVC (persistent Volume Claim)

next we will create the PVC (persistent Volume Claim) and Map it to the PV we just created:

kubectl apply -f nfs-pvc.yaml

check that the PVC created:

kubectl get pvc

Screenshot 2024-07-29 144925.png


Starting Jira

after creating every thing you need to make sure that Database is running and having database named Jira with the credentials you added and the NFS-Server is running along with PV and PVC, Make sure that the Jira Port is Exposed correct

Update the Database configuration in the file with the database ip

kubectl get svc

Screenshot 2024-07-29 155404.png

Now you can start jira:

kubectl apply -f jira-values.yaml

kubectl get pod

you can now wait till the pod is running and access jira from you web browser using the node ip.


Cluster

After starting jira and configuring the applictation now you can scale the statefulset and have more than one instance and start you cluster.

you can do it fromthe Dashboard or you can use:

kubectl scale statefulset jira --replicas=2

 

Feel free to ask for any questions and give your feedback.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events