In this repo, I codified some of the knowledge needed to set up my own bare metal computing cluster. This knowledge should help future me and others being interested in this project. Furthermore, this code tries to make the taken steps reproducible.
The overall plan is to run Kubernetes on a bare metal cluster of thin clients. The thin clients are managed by Metal as a Service (MAAS) running on a separate machine, and the Kubernetes cluster running on top of the is a high availability K3s cluster.
MAAS simplifies provisioning these machines with minimal physical interaction. The Ansible playbook maas_ops.yaml is
for setting up the MAAS controller machine. The Makefile simplifies the relevant Ansible command options.
MAAS is used to provision the thin clients in a usable state. To avoid unreproducable point-and-click configuration in
the MAAS web UI, Terraform is used to trigger the MAAS APIs. Furthermore, it shows an understandable model of the
infrastructure with the machine data in data/machines.csv.
I decided to deploy the K3s Kubernetes cluster with Ansible on top of
the machines provisioned by MAAS. The cluster is implemented as a
high availability cluster based on data in data/machines.csv.
To visualise the idea of how the different components are architected for deploying a K3s Kubernetes cluster, have a look at the architecture explanation.