r/devops•
mathstuf

What to use for an at-home cloud deployment?

Apologies if this isn't the right subreddit to ask.

I'd like to convert my current at-home service setup using FreeBSD jails to containers. However, information for deploying groups of containers seems to be either at the "how to use docker compose to run 2 containres" or "here's how to set up a Google-level infrastructure" end of the spectrum. Nothing for "how to deploy a personal cloud" that I can find.

I'm trying to use docker-compose for this, but it has limitations due to Docker not supporting the full OCI spec. Basically, I just want to gather logs with journald on the host and inside of containers use systemd for restarting failed services. Due to Docker not supporting/caring about OCI hooks, it doesn't seem like it's going to work in the long run. Monitoring "at scale" with something like Prometheus seems quite heavy handed (5+ containers to monitor my (maybe) 10 containers?). Kubernetes is way too complicated for what I want since pretty much everything is just a single instance and no elasticity is necessary or wanted.

I did find rkt-compose, but it seems…ignored. This state does not seem unique for projects with this name.

Suggestions? Is there some search term I just don't know to find the information in this apparent gulf?

Posted Oct 1, 2018, 3:54 PM UTC

210
kongslund•

Docker Swarm combined with Portainer. The latter is a management UI.

1
mathstufOP•

Docker Swarm just seems to be an even more complicated docker-compose? And Portainer does look nice, but it seems to be more complicated than necessary. Users, teams, etc. And I have a single "stack" in its parlance, so it still seems way too heavy for what I need.

Also, if I use the demo to deploy an nginx container from the template, where do I provide things like SSL certs, vhost configuration, etc.? I fail to see how such a generic nginx instance is very useful… So I have to make my own Dockerfile setup anyways AFAICS. Plus I need things like backups of data and then of the volumes which "stock" containers tend to just not support.

I feel like there's this whole use case that isn't being handled here. Is it just the ecosystem being nascent for those not running datacenter level workloads?

0
stonebraker_ultra•

Docker Swarm is for managing a cluster of nodes. docker-compose essentially defines the services that you want to run on those nodes. See: https://docs.docker.com/engine/swarm/stack-deploy/#deploy-the-stack-to-the-swarm

Personally, I would just use Kubernetes.

2
mathstufOP•

Personally, I would just use Kubernetes.

Even when the number of nodes and stacks are both 1? That seems like quite overkill unless there are some docs that I'm missing.

FWIW, my "personal cloud" has been happy on a P4 and got upgraded to a Core 2 Duo with 4G of RAM a number of years ago (mainly to help with build times of FreeBSD ports), so any kind of budget machine today is likely perfectly fine as a host. It's just that upgrading from FreeBSD N to FreeBSD N+1 is a PITA.

1
roignac•

4 Gb should be enough for the master and node on a single machine. The only thing you'd need is to have SSD for etcd.

The benefit of k8s would fairly easy scale up - you could be able to add more nodes later on

1
stonebraker_ultra•

While I didn't realize you were only talking about one node at the time, there are some aspects of Kubernetes that I think may benefit you for the pain points it seems like you're having: secret and configuration resources which can be injected into your containers (for TLS certs, etc.), much more configurable with regard to storage, and declarative availability so that you can always make sure an instance is restarted if it fails. Also allows you to use a different container runtime, potentially one that supports the OCI hooks that you want, without having to depend on Docker.

1
mathstufOP•

From Kubernetes docs, first sentence of the "walkthrough":

Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.

This does not describe my use case at all.

1
Kerb3r0s•

Depends on what you mean by a “cloud,” but check out NextCloud. There are multiple docker solutions out there, including one that uses docker compose to build an SSL deployment with LetsEncrypt.

1
mrcrassicConsultant a.k.a "The Enemy"•

You can use something like Ansible to create systemd units on the hosts your containers will be running on that essentially do docker run .... stdout for the processes running on those containers will automatically go to journald, so you should be able to do journalctl -u <service> and get your logs that way with this approach.

If those containers are related to each other, then Docker Compose really is the best solution for this, as doing docker-compose up <service> can support instantiating all of the containers at once.

If those VMs are only going to run containers, I would look into something like Docker Swarm (it's kind-of like clustered Docker Compose) or HashiCorp Nomad + Consul + Vault (which might be more involved than you're looking for, but it is also easy to get going with).

1
runrep•

'containers' and 'cloud' are not the same thing o_O on-prem cloud would be like openstack. & good luck running that at home.

0