The following guide will show steps to deploy Joget on EKS using Terraform

Prerequisites

 

Configuring Terraform Remote Backend

Disclaimer: The Terraform code provisions the minimum required infrastructure. You may have to modify some of the parameters to ensure that it works in your environment. You may refer to the official AWS and Hashicorp documentation for more details

  1. Create a terraform.tfvars file in the backend directory and ensure the following variables are included
    app_name=”<your-app-name>”
    
  2. Run terraform init
  3. Run terraform plan to observe the resources that will be deployed (optional)
  4. Once verified, run terraform apply -auto-approve
  5. Once the backend has been deployed, go to the infrastructure directory and open main.tf
  6. Find the block:
    backend "s3" {
        bucket         = "xxx"
        key            = "terraform.infrastructure.tfstate"
        region         = "xxx"
        dynamodb_table = "xxx"
    }
    
  7. Fill in the xxx with the service details that you have created on step 1 - 5


Note: This process will create a local Terraform state. The remote state will only apply for infrastructure.


Deploying AWS Infrastructure

  1. Create a terraform.tfvars file and ensure the following variables are included
    app_name=”<your-app-name>”
    cluster_name=”<your-eks-cluster-name>”
    rds_username=”<your-rds-username>”
    rds_password=”<your-rds-password>”
    
  2. Run terraform init
  3. Run terraform plan to observe the resources that will be deployed (optional)
  4. Once verified, run terraform apply -auto-approve


Note: This step will take some time, around 20-30 minutes.


Core Services and Resource Deployed

These are the core services and resources (non exhaustive) list deployed from Terraform:


Deploying Joget DX 8

  1. Download the Kubernetes manifest here.
  2. Run kubectl apply -f joget-dx8-tomcat9-deployment.yaml
  3. Wait for the containers to initialize. Run kubectl get pods -A to obtain the status of the pods.


Accessing Joget through Load Balancer

  1. Run kubectl get ingress -A . You should see the DNS under Address column as follows:
    k8s-namespace-RANDOM-STRING.REGION.elb.amazonaws.com
    
  2. Use the Address and go to /jw . It will redirect you to the database setup.
  3. Enter your database information on the above page

Note: The Terraform IaC has RDS Aurora Serverless included in the Infrastructure, and as such, it will be deployed alongside the EKS. You may use the RDS to better synergize with the VPC configuration. Ensure that you use the writer endpoint when setting up Joget database

  1. Click Save. Wait for the database to be setup
  2. Once the setup is complete, click Done. It will redirect you to the Joget main page

Using EFS with ReadWriteMany access mode

By default, the EKS cluster's Nodes will use EBS through EBS CSI Driver which only supports ReadWriteOnce. The Terraform already containing script to deploy EFS CSI Driver. To use EFS,

  1. Create a StorageClass manifest as follow:

    kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: <your-efs-sc-name> provisioner: efs.csi.aws.com parameters: provisioningMode: efs-ap fileSystemId: <efs-file-id> directoryPerms: "775" reclaimPolicy: Retain
  2. Apply the StorageClass by running kubectl apply -f <storageclass>.yaml
  3. Modify the PVC from the joget-dx8-tomcat9-deployment.yaml file to this:  

    apiVersion: v1 kind: PersistentVolumeClaim metadata: name: efs-claim spec: accessModes: - ReadWriteMany storageClassName: <your-efs-sc-name> resources: requests: storage: 5Gi
  4. Delete the current PVC - kubectl delete pvc efs-claim , then recreate it using kubectl apply -f joget-dx8-tomcat9-deployment.yaml
  5. Wait for the Persistent Volume to be created
  6. The application will now be using the EFS storage instead of EBS

Joget on AWS Marketplace

Joget is also available in AWS Marketplace. Installation guide is available on the Marketplace page. Ensure that you have installed eksctl when following the instruction


Common Errors

Terraform

Kubernetes/EKS

AWS Marketplace