Skip to content

ALPHA-How to setup Gluu Cloud Native with ALB controller and Aurora serverless#

Overview#

The Gluu Server has been optimized with several container strategies that allow scaling micro-services and orchestrating them using Kubernetes. This tutorial will walk through installation of Gluu on AWS EKS (Elastic Kuberentes service ) with ALB controller.

Warning

In recent releases we have noticed that the ALB does not properly work with the oxtrust admin UI. Functions such as access and cache refresh do not work. There is an issue open but the main issue is in the fact that ALB does not support rewrites.

Installation#

Set up the cluster#

Resources#

  • Follow this guide to install a cluster with worker nodes. We used four nodes of on all three available zones of instance type t2.medium instance type. Please make sure that you have all the IAM policies for the AWS user that will be creating the cluster and volumes.

Create the Kubernetes cluster. We will be using EKS but GKE is also fine to use. Example eksctl command.

eksctl create cluster --name gluualbcluster --version 1.19 --nodegroup-name standard-workers --node-type t2.medium --zones eu-central-1a,eu-central-1b,eu-central-1c --nodes 4 --nodes-min 1 --nodes-max 5 --region eu-central-1 --ssh-public-key "~/.ssh/id_rsa.pub"

Requirements#

  1. The above guide should also walk you through installing kubectl , aws-iam-authenticator and aws cli on the VM you will be managing your cluster and nodes from. Check to make sure.

    aws-iam-authenticator help
    aws-cli
    kubectl version
    
  2. After setting up your EKS cluster start with installing the ALB controller following this guide

  3. Amazon Aurora is a MySQL and PostgreSQL-compatible relational database built for the cloud, that combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open source databases. Gluu fully supports Amazon Aurora, and recommends it in production.

  4. Create an Amazon Aurora database with MySQL compatibility version >= Aurora(MySQL 5.7) 2.07.1 and capacity type Serverless. Make sure the EKS cluster can reach the database endpoint. You may choose to use the same VPC as the EKS cluster. Save the master user, master password, and initial database name for use in Gluus helm chart.

  5. Prepare required kubernetes cluster as shown here.

    Warning

    Do not run helm install before completing next steps below!

  6. Modify override-values.yaml:

    global:
      isDomainRegistered: true
      alb:
        ingress:
          enabled: true
          openidConfigEnabled: true
          authServerEnabled: true
          additionalAnnotations:
            # adjust the value if using AWS ARN
            alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxx:certificate/xxxxxx
    config:
      configmap:
        # adjust the AWS loadbalancer address only if `global.isDomainRegistered` is set to `false`
        lbAddr: axx-109xx52.us-west-2.elb.amazonaws.com
        # adjust the database connection attributes to match your database environment.
        cnSqlDbName: gluu
        cnSqlDbPort: 3306
        cnSqlDbDialect: mysql
        cnSqlDbHost: mysql.gluu.svc
        cnSqlDbUser: root
        cnSqlDbTimezone: UTC
        cnSqldbUserPassword: Test1234#
    nginx-ingress:
      ingress:
        enabled: false
    

    Note

    Disable/enable other ingress rules by changing the value of global.alb.ingress.*Enabled attributes.

  7. Install the chart (refer to guide from step 5):

    helm install <release-name> gluu/gluu --version <version> -f override-values.yaml -n <namespace>
    
  8. Once the installation has finished and you can access the GUI. Head to Configuration > JSON Configuration > OxTrust Configuration, then set rptConnectionPoolUseConnectionPooling to false.

  9. Restart oxTrust.

    kubectl rollout restart statefulset <helm-name>-oxtrust -n <namespace>
    # kubectl rollout restart statefulset gluu-oxtrust -n gluu