Install Gaia - Terraform UI on GKE using Helm
Gaia: A GUI tool that makes managing infrastructure more simple for Terraform.
Some of the features include Visual editor, dependency visualisation, administration of variables and modules, and simplified workflow.
Infrastructure described in YAML and translated into Terraform code.
Gaia Features :
Gaia Requirements:
Installation steps:
Enable APIs required for GKE -
devops@cloudshell:~ (poc-project101)$ gcloud services enable container.googleapis.com????????????????????????????????????????????????????????????????
Operation "operations/acf.p2-955994325641-b314bad1-a553-4314-8814-247792f58487" finished successfully.?
Create a Single Node GKE using gcloud -
devops@cloudshell:~ (poc-project101)$ gcloud container clusters create gke-cluster --num-nodes=1 --zone=us-east1-c
Creating cluster gke-cluster1 in us-east1-c... Cluster is being health-checked (master is healthy)...done.? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Created [https://container.googleapis.com/v1/projects/poc-project101/zones/us-east1-c/clusters/gke-cluster1].
To inspect the contents of your cluster, go to: https://console.cloud.google.com/kubernetes/workload_/gcloud/us-east1-c/gke-cluster1?project=poc-project101
kubeconfig entry generated for gke-cluster1.
NAME: gke-cluster1
LOCATION: us-east1-c
MASTER_VERSION: 1.25.8-gke.500
MASTER_IP: 35.229.30.224
MACHINE_TYPE: e2-medium
NODE_VERSION: 1.25.8-gke.500
NUM_NODES: 1
STATUS: RUNNING
devops@cloudshell:~ (poc-project101)$?
Create namespace gaia -
领英推荐
devops@cloudshell:~ (poc-project101)$ kubectl create namespace gaia
namespace/gaia created
devops@cloudshell:~ (poc-project101)$?
Install Gaia helm chart -
devops@cloudshell:~ (poc-project101)$ helm install gaia https://github.com/gaia-app/chart/archive/refs/tags/v0.1.2.tar.gz --namespace gaia
NAME: gaia
LAST DEPLOYED: Mon Jun 12 17:21:36 2023
NAMESPACE: gaia
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
? ? ?NOTE: It may take a few minutes for the LoadBalancer IP to be available.
? ? ? ? ? ?You can watch the status of by running 'kubectl get --namespace gaia svc -w gaia'
? export SERVICE_IP=$(kubectl get svc --namespace gaia gaia --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
? echo https://$SERVICE_IP:80
devops@cloudshell:~ (poc-project101)$
List helm chart -
devops@cloudshell:~ (poc-project101)$ helm ls -n gaia
NAME? ? NAMESPACE? ? ? ?REVISION? ? ? ? UPDATED? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?STATUS? ? ? ? ? CHART? ? ? ? ? ?APP VERSION
gaia? ? gaia? ? ? ? ? ? 1? ? ? ? ? ? ? ?2023-06-12 17:21:36.212321288 +0000 UTC deployed? ? ? ? gaia-0.1.2? ? ? 2.4.0? ? ??
devops@cloudshell:~ (poc-project101)$?
Get pod, deployment and service details -
devops@cloudshell:~ (poc-project101)$ kubectl -n gaia get all
NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?READY? ?STATUS? ? RESTARTS? ?AGE
pod/gaia-6589f97b6c-g4ms6? ? ? ? ? 1/1? ? ?Running? ?0? ? ? ? ? 3m4s
pod/gaia-mongo-6c85bfb5bf-vdtrv? ? 1/1? ? ?Running? ?0? ? ? ? ? 3m4s
pod/gaia-runner-69cd4897d4-jqvcj? ?1/1? ? ?Running? ?0? ? ? ? ? 3m4s
NAME? ? ? ? ? ? ? ? ? ? TYPE? ? ? ? ? ?CLUSTER-IP? ? ?EXTERNAL-IP? ? ?PORT(S)? ? ? ? AGE
service/gaia? ? ? ? ? ? LoadBalancer? ?10.84.4.78? ? ?34.138.146.21? ?80:32754/TCP? ?3m5s
service/gaia-database? ?ClusterIP? ? ? 10.84.15.157? ?<none>? ? ? ? ? 27017/TCP? ? ? 3m5s
NAME? ? ? ? ? ? ? ? ? ? ? ? ? READY? ?UP-TO-DATE? ?AVAILABLE? ?AGE
deployment.apps/gaia? ? ? ? ? 1/1? ? ?1? ? ? ? ? ? 1? ? ? ? ? ?3m6s
deployment.apps/gaia-mongo? ? 1/1? ? ?1? ? ? ? ? ? 1? ? ? ? ? ?3m6s
deployment.apps/gaia-runner? ?1/1? ? ?1? ? ? ? ? ? 1? ? ? ? ? ?3m6s
NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?DESIRED? ?CURRENT? ?READY? ?AGE
replicaset.apps/gaia-6589f97b6c? ? ? ? ? 1? ? ? ? ?1? ? ? ? ?1? ? ? ?3m6s
replicaset.apps/gaia-mongo-6c85bfb5bf? ? 1? ? ? ? ?1? ? ? ? ?1? ? ? ?3m6s
replicaset.apps/gaia-runner-69cd4897d4? ?1? ? ? ? ?1? ? ? ? ?1? ? ? ?3m6s
devops@cloudshell:~ (poc-project101)$?
In above output we can check the External IP of LB and access Gaia application on browser.
https://34.138.146.21/
Login with default credentials - admin/admin123 | user/user123
Conclusion:?We have installed Gaia Terraform UI using helm chart on GKE.
I hope you found this to be useful in some way. I’ll be back with some more interesting new articles soon.