Skip to content

dalehumby/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homelab Provisioning

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

Steps to perform when installing a new server

  • On a clean Ubuntu server
  • apt update
  • apt upgrade
  • Setup SSH keys (if going to commit)
  • git clone https://github.com/dalehumby/homelab.git
  • cd homelab

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:

  • home-stack.yaml: IoT and home automation services
  • proxy-stack.yaml: Run Traefik proxy server, including SSL termination, so can access services from the internet
  • cron-stack.yaml: Launch periodic jobs like updating DNS (dynamic DNS)

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.

  • compose.yaml: Containers that run on the primary host (Dell)
  • media-compose.yaml: Media server and download management

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

About

Homelab provisioning scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published