I have been in search for the perfect docker setup for home lab and production environments when Kubernetes doesn’t really make sense in every situation. Also, especially for a lot of self-hosted services, many of these do not work well with Kubernetes. Home Assistant is one that comes to mind among others. I have found arguably the best docker container environment in most cases is not Kubernetes, but a Docker Swarm cluster with Microceph installed with distributed storage running CephFS, and Portainer is the management tool that brings it all together. I step you guys through how you can build all of this, including Docker Swarm configuration, CephFS configuration, networking, high availability, and the nuggets of management from the Portainer side.
If you want to copy the commands used in this tutorial, check out the following written blogs that encompass the steps:
– https://www.virtualizationhowto.com/2024/10/docker-swarm-is-awesome-with-portainer/
– https://www.virtualizationhowto.com/2024/10/try-microceph-for-an-easy-ceph-install/
– https://www.virtualizationhowto.com/2024/10/cephfs-for-docker-container-storage/
If you want to know how to install Docker in Ubuntu: https://docs.docker.com/engine/install/ubuntu/
Introduction – 0:00
Prerequisites for the config – 0:42
Overview of Docker Swarm – 1:28
Kubernetes vs Docker Swarm – 2:00
Initializing Docker Swarm – 2:48
Promoting multi-manager nodes in Docker Swarm – 3:22
Installing Keepalived – 3:41
Configuring Keepalived – 4:18
Creating the backup Keepalived nodes – 5:00
Starting and enabling Keepalived – 6:10
Pinging the virtual IP – 6:58
Introducing shared storage with Microceph – 7:00
Ceph with Proxmox – 7:52
Listing the disks on each Docker Swarm node – 8:41
Installing Microceph – 8:52
Bootstrapping the microceph cluster – 9:47
Adding the 2nd and 3rd microceph cluster hosts – 10:13
Adding the disks for each node to microceph – 11:18
Checking the status of microceph cluster – 11:55
Creating the microceph storage pools – 12:08
Creating the CephFS data storage for Docker Swarm – 12:27
Creating the mount directory for mounting CephFS storage on each node – 12:49
Getting the Ceph client admin token – 13:05
Adding the mount command in the fstab file – 13:24
Force mounting FSTAB and reloading system then checking storage – 13:48
Introducing Portainer – 15:28
Looking at the free 3-node license for business edition – 16:18
Looking at the Portainer to manage your Docker, Docker Swarm, and Kubernetes environments – 16:40
Looking at container information – 17:23
Looking at outdated images shown in Portainer – 17:47
Quick actions in Portainer – 18:17
Performance stats in Portainer – 18:47
Swarm details and cluster visualizer – 19:02
Draining or pausing nodes – 19:52
Using templates in Portainer – 20:22
Pulling compose files from a Git repository – 20:44
Discussing how it all fits together & wrapping up – 21:14