# Castaldi Family Homelab
> **A GitOps-managed, self-hosted infrastructure running media services, container orchestration, and automation across distributed ARM and x86 nodes.**
[](https://komo.do)
[](#architecture)
[](documentation/)
---
## π Why This Homelab?
- **Zero-Touch Deployments:** Push to Git β Auto-deploy via webhooks β Containers update automatically
- **Infrastructure as Code:** All services defined in version-controlled `compose.yaml` files
- **GPU Transcoding:** Hardware-accelerated media streaming with NVIDIA GTX 1060
- **Distributed Architecture:** Services intelligently distributed across VM, physical server, and Raspberry Pi
- **Self-Hosted Git:** No external dependenciesβGitea runs on-premise with automated backups
- **Production-Grade Networking:** Traefik reverse proxy with automatic SSL (Cloudflare DNS challenge)
---
## ποΈ Architecture
```mermaid
graph TB
subgraph Internet
CF[Cloudflare DNS]
end
subgraph "Heimdall (Proxmox VM - 10.0.0.151)"
Traefik[Traefik Reverse Proxy
:80, :443]
Komodo[Komodo Core
Container Orchestrator]
Gitea[Gitea
Self-Hosted Git]
Redis[Redis Cache]
end
subgraph "Waldorf (Physical Server - 10.0.0.251)"
Plex[Plex Media Server
GPU Transcoding]
Tunarr[Tunarr
IPTV Channels]
GPU[NVIDIA GTX 1060]
end
subgraph "Watchtower (Raspberry Pi 5 - 10.0.0.200)"
Periphery[Komodo Periphery
Remote Agent]
end
subgraph "TerraMaster NAS (10.0.0.250)"
NFS[NFS Storage
/Volume1/appdata]
end
CF -->|HTTPS| Traefik
Traefik --> Gitea
Traefik --> Komodo
Traefik --> Plex
Traefik --> Tunarr
Komodo <-->|WebSocket| Periphery
Gitea -->|Webhook| Komodo
Plex --> GPU
Tunarr --> GPU
Heimdall -.->|NFSv3| NFS
Waldorf -.->|NFSv3| NFS
Watchtower -.->|NFSv3| NFS
style Traefik fill:#326ce5,color:#fff
style Komodo fill:#ff6b6b,color:#fff
style GPU fill:#76b900,color:#fff
style NFS fill:#f9a825,color:#000
```
---
## π¦ Infrastructure Inventory
| Node | IP | Hardware | Role | Services |
|------|------|----------|------|----------|
| **Heimdall** | `10.0.0.151` | Proxmox VM
Intel N100, 16GB RAM | Core Services | Komodo, Gitea, Traefik, Redis |
| **Waldorf** | `10.0.0.251` | Physical Server
i7-7820HQ, GTX 1060, 16GB | Media Processing | Plex, Tunarr (GPU transcoding) |
| **Watchtower** | `10.0.0.200` | Raspberry Pi 5
ARM Cortex-A76, 16GB | Periphery Node | Komodo Agent |
| **TerraMaster** | `10.0.0.250` | NAS | Shared Storage | NFSv3 (`/Volume1/appdata`) |
---
## β‘ Quick Start
### Prerequisites
- SSH access to nodes
- Git configured with credentials:
```bash
git config --global credential.helper wincred # Windows
git config --global core.autocrlf true
```
### Clone & Deploy
```bash
# Clone from self-hosted Gitea
git clone https://git.castaldifamily.com/nathan/homelab.git
cd homelab
# Deploy a service (via Komodo UI or SSH)
ssh chester@10.0.0.251
cd /etc/komodo/stacks/tunarr
docker compose up -d
```
### Automated GitOps Workflow
1. **Edit** `nodes/{node}/{service}/compose.yaml`
2. **Commit** and push to `main` branch
3. **Webhook** triggers Komodo pull
4. **Auto-deploy** updates running containers
---
## π― Active Missions
> **Traffic Light System:** π’ Complete | π‘ In Progress | π΄ Blocked
| Status | Mission | Details |
|--------|---------|---------|
| π’ | **GitOps Migration** | All production stacks migrated to Git-based deployment |
| π’ | **Webhook Automation** | Gitea webhooks trigger auto-deploy on push |
| π’ | **GPU Passthrough** | NVIDIA GTX 1060 accessible in Plex/Tunarr containers |
| π’ | **Documentation Structure** | KBAs and SOPs organized in `documentation/` |
| π‘ | **Hardware Transcoding Validation** | Monitor Plex for `(hw)` indicator during active streams |
| π’ | **NFS Mount Stability** | NFSv3 forced on Raspberry Pi to prevent ID-domain errors |
| π’ | **Credential Security** | Secrets managed via Komodo Environment Variables (not Git) |
---
## π Repository Structure
```
homelab/
βββ nodes/ # Service definitions per node
β βββ heimdall/ # Core infrastructure (VM)
β β βββ core/ # Komodo, Traefik, Redis
β β βββ gitea/ # Self-hosted Git
β βββ waldorf/ # Media services (Physical)
β β βββ plex/ # Media server + GPU
β β βββ tunarr/ # IPTV channels + GPU
β βββ watchtower/ # Periphery agent (Pi 5)
βββ documentation/ # Technical knowledge base
β βββ KBAs/ # Troubleshooting guides
β βββ SOPs/ # Operational procedures
β βββ TECHNICAL_RUNBOOK.md # Emergency reference
βββ ansible/ # (Future) Automated provisioning
βββ scripts/ # Utility scripts
```
---
## π§ Common Operations
### Deploy a New Stack
```bash
# 1. Create directory structure
mkdir -p nodes/waldorf/sonarr
# 2. Create compose.yaml
cat > nodes/waldorf/sonarr/compose.yaml <