Creating the tooling infrastructure for https://devnet3.themerge.dev/
The terraform directory contains an example on how to create a Kubernetes cluster on Digitalocean.
# Move to terraform dir
$ cd terraform
# Initialize terraform
$ terraform init
# See what's going to happen
$ terraform plan
# If all looks good, apply changes to create your cluster
$ terraform apply
Once the stack is created you can obtain your ~/.kube
config file by using the doctl
cli.
# Initialize authentication
$ doctl auth init
# List available clusters
$ doctl kubernetes cluster list
# Save your connection iformation to ~/.kube/config
$ doctl kubernetes cluster kubeconfig save <CLUSTER_ID>
# Check that it works
$ kubectl get nodes
The helmsman directory contains an example on how to deploy the helm charts using helmsman.
# Install shared services (e.g. Kube Prometheus Stack, Cert-manager, External-DNS, Ingress Nginx)
helmsman -f shared-services.yaml --show-diff --apply
# Install the charts defined in ethereum.yaml
# Note: You should check the file before applying it and adjust values to your requirements
helmsman -f ethereum.yaml --show-diff --apply
The following is an example on how to destroy everything created by a given stack:
# Delete everything that was applied by the "ethereum.yaml" stack
helmsman --no-banner -f ethereum.yaml --destroy
# Delete any PVC that was created
kubectl -n ethereum delete pvc --all
Destroy the whole kubernetes cluster
# Destroy all terraform resources
cd terraform && terraform destroy