Deploying JIRA/Confluence on Kubernetes

Tram Ho

JIRA is an application to track, manage errors, problems arising in projects, making project development management easier for any organization. For organizations/individuals deploying a project today, JIRA is almost the number one tool to control, monitor and optimize the development process.

Included with JIRA is Confluence, a teamwork space where knowledge is shared, combined, and team-collaborative. Confluence is a great tool that allows creating group spaces for the purpose of structuring, organizing and sharing documents and project ideas. the fastest and most convenient way.

Both JIRA/Confluence are owned by Atlasssian — a giant in project management and development tools. JIRA/ Confluence is suitable for all types of projects, from small to large, from startups to large companies.

Deployment method to install JIRA / Confluence is usually on a physical server, or on a virtual machine. However, nowadays microservices architecture is gradually becoming a trend, along with it is the presence of Kubernetes with outstanding advantages in organizations and projects. If we still install JIRA / Confluence on physical / virtual machines the old way, we will lose some of the resources for these management tools. This may not be a problem for a large company with abundant resources, but can be wasteful for a team with more modest resources who want JIRA/Confluence to manage the project. , and want to maintain Kubernetes for application deployment.

To take advantage of the power of Kubernetes, without wasting resources, why not deploy JIRA/Confluence on Kubernetes itself? And within the framework of this article, I will introduce you to how to deploy JIRA / Confluence on Kubernetes.

Setting

Assuming that you have installed Kubernetes before, if not, you can refer to other articles on installing Kubernetes. Since there are already many tutorials, I will not present them here.

Install Helm

Method 1: Deploy the installation of Helm with a script, you can skip it if you have already installed Helm before

$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh

Or more concise

$ curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Method 2: Install Helm with Apt

$ curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
$ sudo apt-get install apt-transport-https --yes
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
$ sudo apt-get update
$ sudo apt-get install helm

Install Database

JIRA/Confluence needs a backend database. Skip this step if you want to use the database outside of Kubernetes

JIRA/Confluence supports quite a few types of databases, in this section will guide you to deploy postgresql using Helm

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo update
$ helm install postgresql --set auth.postgresPassword=secretpassword --set auth.username=username --set auth.password=password --set auth.database=database bitnami/postgresql

Add Helm chart repository

Add Helm chart repository

$ helm repo add atlassian-data-center 
 https://atlassian.github.io/data-center-helm-charts

Update repository

$ helm repo update

Download the file values.yaml

Download the default values.yaml file from the chart using the following command

$ helm show values atlassian-data-center/<product> > values.yaml

Where < product> is the name of the service you want to deploy, including

  • Jira
  • Confluence

Database Configuration

To use the Database with JIRA/Confluence, we need to import the Database configuration into the values.yaml file obtained from the above step.

Create a Kubernetes secret to store username/password information to access the database

$ kubectl create secret generic jira-connect --from-literal=username='username' --from-literal=password='password'

After creating the secret, fill in the database information in the corresponding fields in the values.yaml file as follows

database:
  type: <db_type>
  url: <jdbc_url>
  driver: <engine_driver>
  credentials:
    secretName: jira-connect
    usernameSecretKey: username
    passwordSecretKey: password

Ingress configuration

To use the URL to access JIRA/Confluence, we need to configure the Ingress Controller into the values.yaml file

ingress:
  create: true #1. Chọn true để tạo Ingress
  nginx: true #2. Nếu sử dụng ingress-nginx controller
  maxBodySize: 250m
  host: <dns_host_name> #2. Địa chỉ host để truy cập vào JIRA/ CONFLUENCE
  path: "/"
  annotations:
    cert-manager.io/issuer: <certificate_issuer>
  https: true
  tlsSecretName: <tls_certificate_name>

Configure Persistent Storage (Optional)

If deploying JIRA/Confluence in a cluster, you need to configure Persistent Storage

There are 2 Storage that need to be configured: share-home and local-home

With share-home , we need to create a Persistent Volume using the EFS filesystem and configure the storage in the values.yaml file

volumes:
  sharedHome:
    customVolume:
      persistentVolumeClaim:
        claimName: <pvc_name>

Each pod in JIRA/ Confluence cluster needs local-home storage, need to configure StorageClass for local-home in values.yaml file

volumes:
  localHome:
    persistentVolumeClaim:
      create: true
      storageClassName: <storage-class-name>

Cluster configuration

If you want to deploy JIRA/Confluence in a cluster, you can configure it in the values.yaml . file

clustering:
    enabled: true

Configure License

Create a Kubernetes secret containing License information

$ kubectl create secret generic jira-license --from-literal=license-key='<product_license_key>'

Update license information in values.yaml . file

license:
  secretName: jira-license
  secretKey: license-key

Configure container images

If you want to specify the version of JIRA/Confluence, enter the tag name in the values.yaml file or enter the latest to use the new version.

Conclude

At this point, you have completed the steps to deploy JIRA / Confluence on Kubernetes. The rest is to add users and create projects according to the needs of the job.

For those of you who are not qualified to deploy Kubernetes but still want to experience JIRA on a container platform, there is another choice for you, which is to use Sunteco Cloud’s Sun Spinner platform.

Try Sun Spinner for free right here .

Share the news now

Source : Viblo