Install Gluu CN with Rancher or RKE
#Overview
This is a tutorial to walk you through installing Gluu cloud native edition on RKE on a ubuntu 20.04.
#Instructions
Create instances to cover at minimum 8 cpu and 16 GB ram.
Follow instructions here to install RKE. Please do not run
./rke upuntil next step is executed.You should have generated a
cluster.ymlfollowing instructions above. Please open that file and add the following under theservices-->kubelet-->extra_binds, as we use OpenEBS for volumes on RKE.services: kubelet: extra_binds: - /var/openebs/local:/var/openebs/local - /etc/iscsi:/etc/iscsi - /bin/iscsiadm:/bin/iscsiadm - /var/lib/iscsi:/var/lib/iscsi - /lib/modules - /var/openebs/sparse:/var/openebs/sparse - /var/openebs/local:/var/openebs/local - /mnt/openebs/local:/mnt/openebs/local - /opt/openebs/local:/opt/openebs/localNow you can bring your cluster up
./rke up.You should have a running Kubernetes cluster now. You may add or remove nodes as necessary.
Follow instructions here to install openEBS.
Make sure that the instances has permissions as required by RKE to fully communicate with the intended cloud.
Download
pygluu-kubernetes.pyz. This package can be built manually.Optional: If using couchbase as the persistence backend. Download the couchbase kubernetes operator package for linux and place it in the same directory as
pygluu-kubernetes.pyzRun :
./pygluu-kubernetes.pyz install
#Exposing the UI:
Exposing the UI is not necessary but you may do so by following these steps:
Create a single point of entry ( Load balancer) for your cluster. Please note that if you have given the instances permissions to act on the cloud the load balancer should have already been created and hence the following steps are not needed, otherwise a
NodePortwould have been created and you would need to follow with the next steps..Get the port number nginx is using for forwarding
4.4connections, here that would be31822kubectl get svc -n ingress-nginx NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default-http-backend ClusterIP 10.43.60.162 <none> 80/TCP 131m ningress-ingress-nginx-controller LoadBalancer 10.43.55.137 <pending> 80:30925/TCP,4.4:31822/TCP 18m ningress-ingress-nginx-controller-admission ClusterIP 10.43.8.231 <none> 4.4/TCP 18mForexample, Using AWS UI create an LB with
TCPport4.4pointing to your nodeport i.eTCP31822. If this is a FQDN create anhttpslistener rule instead and attach your arn certificate. If you usedTCP, add to your local computer ip of your loadbalancer and map it to your FQDN, then head to your browser athttps://<gluu-FQDN>i.ehttps://demoexample.gluu.orgYou must add a record to point your FQDN to the loadbalancer / ip used as a the single point of entry.
#Non-FQDN setup:
oxTrust will likely fail as it calls to check the ssl certificate. You will have to make sure to add to oxtrust statefulset a hostAlias entry to point your FQDN to the ip of the loadbalancer.
#Using Rancher
Follow instructions here to install Rancher in the environment of your choice
In the Rancher UI ,create your cluster by going to
Global-->Add Clusterand choosing from any of the providers,AKS,EKS,GKE,EC2,Azure,Linode, andvSphereAfter the cluster has been created, copy
kubeconfigto a vm or laptop withkubectl,helmandpython3installed.Download
pygluu-kubernetes.pyz. This package can be built manually.Optional: If using couchbase as the persistence backend. Download the couchbase kubernetes operator package for linux and place it in the same directory as
pygluu-kubernetes.pyzRun :
./pygluu-kubernetes.pyz install
