1.7 KiB
1.7 KiB
Deployment Conventions
This document describes the GitOps-lite deployment process for the homelab.
Principles
- Git as Source of Truth: All infrastructure definitions (Docker Compose, configurations) are stored in Git.
- Unidirectional Flow: Changes flow from SATURN (commit node) to execution nodes.
- Lightweight: No complex orchestrators (no Kubernetes). Use
docker composeand simple shell scripts. - Tailscale Mesh: All hosts are connected via Tailscale, allowing secure communication without public port exposure.
Deployment Process
1. Preparation (on SATURN)
- Modify or create service definitions in
services/. - Assign services to hosts by creating/updating
hosts/<hostname>/services.txt(or similar mapping). - Commit and push changes to the Forgejo instance.
2. Deployment (on Execution Node)
Execution nodes run a deployment script (e.g., via cron or manual trigger) that:
- Performs a
git pullfrom the source of truth. - Identifies services assigned to this host.
- Symlinks or copies
services/<service>/docker-compose.ymlto/opt/homelab/services/. - Runs
docker compose up -d --remove-orphans.
Host-Local Overrides
If a service requires host-specific configuration (e.g., unique device paths for GPUs on SOLARIA):
- Create a
docker-compose.override.ymlin/opt/homelab/config/<service>/. - The deployment script should include this override if it exists.
Secrets Management
- Do NOT commit secrets to Git.
- Secrets should be placed in
/opt/homelab/config/<service>/.envon the target host. - The deployment script should ensure these are sourced by Docker Compose.