This directory contains scripts to set up and tear down a local environment for go-deploy.
The setup.sh script will set up an entire local environment with every service installed in a Kind Kubernetes cluster on your local machine.
It is only supported on Linux distributions with apt or dnf package managers.
Run ./setup.sh --help to see the available options.
The following packages will be installed on your machine:
| Package | Description |
|---|---|
| Dnsmasq | DNS forwarder |
The following CLI tools will be installed:
| Tool | Description | Version |
|---|---|---|
| kind | Kubernetes in Docker | v0.23.0 |
| kubectl | Kubernetes CLI | latest |
| helm | Kubernetes package manager | latest |
| jq | JSON processor | latest |
The following services will be installed in the Kubernetes cluster:
| Service | Description | Version |
|---|---|---|
| NFS Server | Network File System server | 0.8 |
| NFS CSI Driver | Network File System Container Storage Interface driver | v4.6.0 |
| Ingress NGINX | Ingress controller | 1.0.0 |
| Harbor | Container image registry | v1.14.2 |
| MongoDB | NoSQL database | 6.0 |
| Redis | In-memory data structure store | 6.2 |
| Keycloak | Identity and Access Management | 24.0.1 |
| cert-manager | Certificate management | v1.14.4 |
| KubeVirt | VM-extension for Kubernetes | latest |
| CDI | Containerized Data Importer | latest |
| kubemacpool | Kubernetes MAC address pool | latest |
The setup script creates a local directory $HOME/go-deploy-data/go-deploy-dev to store the data for the NFS server.
This is done using a mix of manually provisioning the storage and using the NFS CSI driver to create a PersistentVolumeClaim.
The following storage classes are created:
| Storage Class | Description |
|---|---|
deploy-misc |
Storage class for miscellaneous data |
deploy-vm-disk |
Storage class for VM disks |
deploy-vm-scratch |
Storage class scratch space for VMs |
The setup script generates a cluster-config.rc with random ports in the NodePort range 30000-32767. The ports are used to expose the services in the Kubernetes cluster and VM ports in go-deploy.
The teardown.sh script will remove the entire local environment created by the setup.sh script. It will remove the Kind cluster and all the services installed in the cluster.
Run ./teardown.sh --help to see the available options.