Installation
This exercise provides instructions for installing the Self Hosted Controller in a Google Cloud environment.
Note
You must setup and configure a GCP virtual machine, GKE cluster, and a Postgres database before doing this exercise.
Install Self Hosted Controller¶
-
Click here to login and download the controller installation package to the instance
-
From your home directory, untar the package using the command below
tar -xf rafay-controller-*
Example:
tar -xf rafay-controller-1.13-19-gke.tar.gz
-
Copy and edit the config.yaml file.
cp -rp config.yaml-gke-tmpl config.yaml vi config.yaml
-
Customize the config.yaml. The following are settings that should be updated.
deployment: type: "GKE" # Supports "airgap", "EKS", "GKE" and "AKS". database: external-database: true postgressql: #For GKE and air gap host: "10.63.192.3" #<Enter Private Database IP> port: "5432" dns: enabled: true gke: serviceAccount: "" #Enter DNS service account email backup_restore: enabled: true restore: false schedule: "*/10 * * * *" #"*/10 * * * *" #Takes backup of rafay-core namespace every 10 min bucketName: "" #GKE Storage Bucket name gke: serviceAccount: "" #Enter GKE Bucket service account email repo: # change the paths to match the virtual machine app-config: partner: star-domain: # the DNS FQDN for the controller override-config: global.external_lb: "false"
Creating database secrets using radm
Replace the <"public ip"> placeholder with the public ip of the database instance. Default root-user is postgres
sudo ./radm database --host <"public ip"> --kubeconfig <config file from gke cluster> --port 5432 --root-password <postgres db password> --root-user <postgres db username>
Example:
sudo ./radm database --host "34.122.136.181" --kubeconfig gke-config.yaml --port 5432 --root-password postgres --root-user postgres
Installing self hosted controller dependencies
Install the self hosted controller dependencies which are required for the controller.
sudo ./radm dependency --config config.yaml --kubeconfig <gke cluster config file>
Example:
sudo ./radm dependency --config config.yaml --kubeconfig gke-config.yaml
Installing Controller Application
Install the Controller Application
sudo ./radm application --config config.yaml --kubeconfig <gke cluster config file>
Example:
sudo ./radm application --config config.yaml --kubeconfig gke-config.yaml
This will bring up all the self hosted controller services.
Note
This process will take approx 20-30 mins for all pods to be up and ready.
Before proceeding further, confirm that all pods are in running state using kubectl.
kubectl get pods -A --kubeconfig <gke cluster config file>
Example:
kubectl get pods -A --kubeconfig gke-config.yaml
Accessing the Web Console¶
Try accessing the self hosted controller https://console.
- A screen appears similar to the image below when accessing the UI
-
Click the Sign Up link to create the first Organization of the rafay air-gapped controller
-
Register a new account for the organization as below screenshot
- Try to login to this Organization with the newly registered account on the login screen
Upload Cluster Dependencies¶
Run the below command to enable support for Kubernetes cluster provisioning from the Rafay air-gapped controller and upload dependencies for Kubernetes cluster provisioning to the controller.
sudo ./radm cluster --config config.yaml --kubeconfig <gke cluster config file>
Example:
sudo ./radm cluster --config config.yaml --kubeconfig gke-config.yaml