2.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Deploying demo jira instance
This guide will outline the steps to follow to deploy a demo jira instance to an existing kubernetes cluster. For our purposes that cluster will be an existing ROSA cluster running in AWS ap-southeast-1.
Login to cluster
As mentioned above we have an existing OpenShift cluster to use for this demo, we will need to login to the cli to automate the remainder of the jira setup.
oc login --kubeconfig ~/.kube/rosa --token=<token> --server=<server>
Create kubernetes namespace
Our first step is to create a kubernetes namespace for our jira deployment.
kubectl --kubeconfig ~/.kube/rosa create namespace jira
Build and deploy jira
Once we have a namespace we can use a one line oc command to create a build process in OpenShift based on our github repository containing a Dockerfile.
This will build a container image within OpenShift and then create a Deployment of that image which will give us a single running jira pod.
Note: This deployment will not be backed by persistent storage but for demo purposes this is fine. Do not use this in production…
# Initiate the build from github
oc --kubeconfig ~/.kube/rosa --namespace jira --name jira new-app https://github.com/jmhbnz/docker-atlassian-jira
# Watch the progress
oc --kubeconfig ~/.kube/rosa --namespace jira logs --follow buildconfig/jira
Once the container image has built successfully we can verify the jira instance is running by checking the pod status.
kubectl --kubeconfig ~/.kube/rosa --namespace jira get pods
Expose jira deployment
With our jira instance now running within our cluster we can create a route to expose it outside the cluster.
oc --kubeconfig ~/.kube/rosa --namespace jira expose service jira
With our route created lets retrieve that and perform the first time setup for jira. This is currently a manual process involving obtaining a trial license from atlassian.
echo http://$(oc --kubeconfig ~/.kube/
rosa --namespace jira get route | grep apps.com | awk '{print $2}')