I’m building a home lab and I want to self host a few websites and several services like NextCloud, Joplin, PhotoPrism, etc. I plan to run each service in a Docker swarm for high availability and load balancing. I’d like to run all these containers on a HA cluster of servers; I have several older SFF/UCFF (Intel NUC, etc.) machines and I want to put them to use in a cluster so that all of these high value services will remain available and performant even if one or more containers/nodes fail and/or if one or more of the physical servers fails.
Although I won’t fully understand how all this works until I roll up my sleeves and start getting my hands dirty, I think I understand the basics of Docker swarms. I’m struggling, though, to wrap my head around the server clusters. I found some articles/tutorials/guides but they all seem to revolve around setting up a web server. That’s fine; I want/need to setup a web server but these guides seem to want the web stack to sit on top of the hardware cluster - non-containerized - and that’s not how I want to do things. They make it seem like the service is/has to be integrated into the cluster setup. Can’t I just setup the server cluster, then whatever I run on it (swarms for the various services) just automatically has the benefits of the HA cluster? Or am I missing something?
I think this is how I intend to approach things…
Although I won’t fully understand how all this works until I roll up my sleeves and start getting my hands dirty, I think I understand the basics of Docker swarms. I’m struggling, though, to wrap my head around the server clusters. I found some articles/tutorials/guides but they all seem to revolve around setting up a web server. That’s fine; I want/need to setup a web server but these guides seem to want the web stack to sit on top of the hardware cluster - non-containerized - and that’s not how I want to do things. They make it seem like the service is/has to be integrated into the cluster setup. Can’t I just setup the server cluster, then whatever I run on it (swarms for the various services) just automatically has the benefits of the HA cluster? Or am I missing something?
I think this is how I intend to approach things…
- Setup a Debian server on a single machine.
- Install Docker and get a LAMP container running with a single, very simple, static website
- Setup a Cloudflare secure tunnel to serve that website up to the world.
- Setup a swarm and get the web server/website running on the swarm (confirming that it’s still publicly accessible).
- Back all that up then add a couple more physical machines and try to create the server cluster
- Once that’s done, get the web server/site back up
- Deploy other container/nodes/swarms/services