Home

Awesome

Homelab Provisioning

Use Docker Swarm (and less ideally, Docker Compose) to manage deployments.

Steps to perform when installing a new server

Directory layout

Containers assume that all files are available on a mount /media/cluster. Each service has its own sub-directory in the cluster directory. (TODO describe network mount / glusterfs)

Docker Swarm

I am running 2x Raspberry Pi 4B with 4 GB RAM and 32 GB Micro SD card in Docker Swarm mode, and a Dell x86 server with 24 GB RAM.

There are several Stacks that define various services:

Deploy a stack

For example, the IoT "home" services: docker stack deploy -c home-stack.yaml home

This creates a home_default network and each service is prefixed with home_ eg home_grafana.

docker service ls to see which services are running.

Use secrets and configs so I don't have to commit sensitive info to repo.

Docker Compose

Swarm cannot pass through devices (like GPU or USB SDR dongles), and anyway the container needs to run on the host where the device is.

To deploy the services: docker compose up -d or docker compose -f media-compose.yaml up -d