Prerequisites:
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:
you can wait for a while and try again till you get:
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
you can get the node IP using this command:
node IP:
kubectl get node -o wide
after connecting the database click on database folder and select New Database:
and create new database with the name Jira and the owner is SA
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
Shared files folder
kubectl apply -f nfs-server-deployment.yaml
wait for a while and check that the nfs-server is running
kubectl get pod
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
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
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
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
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.