Docker Swarm Setup
Running workloads in [[Docker Swarm]] gives us some level of resiliency without having to manage a complex orchestrator like [[Kubernetes]]. The downside is fewer features and not the same level of stability when the cluster becomes large and complex.
The current setup focus on virtual machines as a basis. I also considered [[LXC]] Containers. While very quick to set up, I came to the conclusion that this approach might have hard to debug [side effects to deal with]:
- Gist and comments: Docker Swarm in LXC Containers
- Proxmox Forum: Another docker experience on Proxmox
I also considered some alternatives:
- Nomad looks like a solid option but it is not very widely adopted and I could not find another user with the setup I had in mind: running HA on Kubernetes with a minimal setup (no [[Vault]], no [[Consul]])
- MicroK8s looks like an attractive solution when going for a small Kubernetes cluster. However, it still comes with the complexity inherent to running a Kubernetes cluster.
- Talos Linux could also provide an out of the box Kubernetes cluster. However, I do not have any experience with that system.
- Coolify is an interesting PaaS project which would be an even higher level of abstraction providing an experience similar to Heroku or Vercel. Will take a look at some point in the future.
Some resources that could be starting points for alternative approaches:
General¶
MicroK8s¶
- Gist: Installing microk8s in an LXC container
- Terraform module: microk8s-lxc-proxmox
- Gist: Installing microk8s in an LXC container
[[Nomad]]¶
- Hubble Homelab (Nomad, Consul and Vault on Proxmox)
- Hashi-Homelab (Nomad, Consul, Traefik and Tailscale with GitOps)
[[Talos]]¶
Resources¶
- Docker Swarm documentation
- YouTube: Best Docker Container Server Setup // Docker Swarm, CephFS, and Portainer with accompanying blog posts one, two, and three.
- YouTube: Use Docker Swarm! Auto Deploy Script with Highly Available Storage - GlusterFS
- Ansible Playbook for Deploying Docker Swarm and GlusterFS
- Docker Swarm Terraform
- Terraform and Ansible for Docker Swarm Cluster Installer in Proxmox
- Ansible Docker Swarm modules
- Docker Swarm over Tailscale