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.mediuminstance type. Please make sure that you have all theIAMpolicies 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#
-
The above guide should also walk you through installing
kubectl,aws-iam-authenticatorandaws clion the VM you will be managing your cluster and nodes from. Check to make sure.aws-iam-authenticator help aws-cli kubectl version -
After setting up your EKS cluster start with installing the ALB controller following this guide
-
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.
-
Create an Amazon Aurora database with MySQL compatibility version >=
Aurora(MySQL 5.7) 2.07.1and capacity typeServerless. 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. -
Prepare required kubernetes cluster as shown here.
Warning
Do not run
helm installbefore completing next steps below! -
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: falseNote
Disable/enable other ingress rules by changing the value of
global.alb.ingress.*Enabledattributes. -
Install the chart (refer to guide from step 5):
helm install <release-name> gluu/gluu --version <version> -f override-values.yaml -n <namespace> -
Once the installation has finished and you can access the GUI. Head to
Configuration > JSON Configuration > OxTrust Configuration, then setrptConnectionPoolUseConnectionPoolingtofalse. -
Restart oxTrust.
kubectl rollout restart statefulset <helm-name>-oxtrust -n <namespace> # kubectl rollout restart statefulset gluu-oxtrust -n gluu