3 ms·
We use Docker Swarm for our deployments, so I will answer the questions based on that. We have built some tooling around setting up and maintaining the swarm u
by ancieque 4y ago
We use Docker Swarm for our deployments, so I will answer the questions based on that.
We have built some tooling around setting up and maintaining the swarm using ansible [0]. We also added some Hetzner flavour to that [1] which allows us to automatically spin up completely new clusters in a really short amount of time.
deploy from source repo:
- We use Azure DevOps pipelines that automate deployments based on environment configs living in an encrypted state in Git repos. We use [2] and [3] to make it easier to organize the deployments using `docker stack deploy` under the hood.
keep software up to date:
- We are currently looking into CVE scanners that export into prometheus to give us an idea of what we should update
load balancing:
- depending on the project, Hetzner LB or Cloudflare
handle scaling:
- manually, but i would love to build some autoscaler for swarm that interacts with our tooling [0] and [1]
automate backups:
- docker swarm cronjobs either via jobs with restart condition and a delay or [4]
maintain security:
- Hetzner LB is front facing. Communication is done via encrypted networks inside Hetzner private cloud networks
- [0] https://github.com/neuroforgede/swarmsible https://github.com/neuroforgede/swarmsible
- [1] https://github.com/neuroforgede/swarmsible-hetzner https://github.com/neuroforgede/swarmsible-hetzner
- [2] https://github.com/neuroforgede/nothelm.py https://github.com/neuroforgede/nothelm.py
- [3] https://github.com/neuroforgede/docker-stack-deploy https://github.com/neuroforgede/docker-stack-deploy
===================
EDIT - about storage:
We use cloud volumes.
For drivers:
We use https://github.com/costela/docker-volume-hetzner https://github.com/costela/docker-volume-hetzner which is really stable.
CSI support for Swarm is in beta as well and already merged in the Hetzner CSI driver (https://github.com/hetznercloud/csi-driver/tree/main/deploy/docker-swarm https://github.com/hetznercloud/csi-driver/tree/main/deploy/...). There are some rough edges atm with Docker + CSI so I would stick with docker-volume-hetzner for now for prod usage.
Disclaimer: I contributed to both repos.