# Castaldi Family Homelab
> **A GitOps-managed, Ansible-automated infrastructure running media services, container orchestration, and hypervisor management across distributed ARM and x86 nodes.**
[](https://komo.do)
[](#automation)
[](#architecture)
[](documentation/)
---
## π Why This Homelab?
- **Zero-Touch Deployments:** Push to Git β Auto-deploy via webhooks β Containers update automatically
- **Ansible Automation:** All nodes managed by Ansible from watchtower control plane
- **Infrastructure as Code:** Services defined in `compose.yaml` + infrastructure managed with Ansible playbooks
- **GPU Transcoding:** Hardware-accelerated media streaming with NVIDIA GTX 1060 Mobile
- **Distributed Architecture:** Services across Proxmox hypervisor, VMs, physical servers, 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)
- **Hypervisor Management:** Proxmox VE for VM orchestration with automated post-install configuration
---
## ποΈ Architecture
```mermaid
graph TB
subgraph Internet
CF[Cloudflare DNS]
end
subgraph "PVE01 - Proxmox VE Hypervisor (10.0.0.201)"
subgraph "Heimdall VM (10.0.0.151)"
Traefik[Traefik Reverse Proxy
:80, :443]
Komodo[Komodo Core
Container Orchestrator]
Gitea[Gitea
Self-Hosted Git]
Redis[Redis Cache]
Trek[Trek]
Vault[Vaultwarden]
end
end
subgraph "Waldorf - Physical Server (10.0.0.251)"
Plex[Plex Media Server
GPU Transcoding]
Tunarr[Tunarr
IPTV Channels]
GPU[NVIDIA GTX 1060 Mobile
6GB VRAM]
KomodoW[Komodo Periphery]
end
subgraph "Watchtower - Raspberry Pi 5 (10.0.0.200)"
Ansible[Ansible Control Node
Infrastructure Automation]
KomodoP[Komodo Periphery]
VSCode[VS Code Server]
end
subgraph "TerraMaster NAS (10.0.0.250)"
NFS[NFS Storage
Volume1: /appdata
Volume2: /media]
end
CF -->|HTTPS| Traefik
Traefik --> Gitea
Traefik --> Komodo
Traefik --> Plex
Traefik --> Tunarr
Komodo <-->|WebSocket| KomodoW
Komodo <-->|WebSocket| KomodoP
Gitea -->|Webhook| Komodo
Ansible -.->|SSH| PVE01
Ansible -.->|SSH| Heimdall
Ansible -.->|SSH| Waldorf
Plex --> GPU
Tunarr --> GPU
Heimdall -.->|NFS v4| NFS
Waldorf -.->|NFS v4| NFS
Watchtower -.->|NFS v3| NFS
style NFS fill:#f9a825,color:#000
style PVE01 fill:#e57000,color:#fff
```
---
## π¦ Infrastructure Inventory
| Node | IP | Hardware | Platform/OS | Role | Services |
|------|------|----------|----------|------|----------|
| **PVE01** | `10.0.0.201` | Physical Server
Intel i5-13500T (14c), 15GB RAM | Proxmox VE 9.1.7 | Hypervisor | Hosts Heimdall VM |
| **Heimdall** | `10.0.0.151` | Proxmox VM on PVE01
Intel N100 (4c), 15GB RAM | Ubuntu 24.04 | Core Services | Komodo Core, Gitea, Traefik, Redis, Trek, Vaultwarden |
| **Waldorf** | `10.0.0.251` | Physical Server
i7-7820HQ (8c), GTX 1060, 16GB | Ubuntu 24.04 | Media Processing | Plex, Tunarr (GPU transcoding), Komodo Periphery |
| **Watchtower** | `10.0.0.200` | Raspberry Pi 5
ARM Cortex-A76 (4c), 16GB | Debian Trixie | Control Plane | Ansible, Komodo Periphery, VS Code Server |
| **TerraMaster** | `10.0.0.250` | NAS | TOS | Shared Storage | NFS (Volume1: `/appdata`, Volume2: `/media`) |
---
## β‘ 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` locally
2. **Commit** and push to Gitea: `git add . && git commit -m "feat: update service" && git push`
3. **Webhook** triggers Komodo Core (heimdall)
4. **Auto-deploy** pulls latest code and restarts containers
5. **Monitor** via Komodo UI at `http://10.0.0.151:9000`
---
## βοΈ Automation
### Ansible Control Plane
**Watchtower** (10.0.0.200) manages all infrastructure via Ansible:
```bash
# SSH into control node
ssh chester@10.0.0.200
cd ~/homelab/ansible
# Test connectivity to all nodes
ansible all -m ping
# Gather live system facts
ansible-playbook playbooks/gather-node-facts.yml
# Deploy Proxmox post-install config
ansible-playbook playbooks/onboard-proxmox.yml --limit pve01
# Run commands across node groups
ansible docker_nodes -m command -a "docker ps"
ansible proxmox_cluster -m command -a "pveversion"
```
### Managed Node Groups
```yaml
control_plane: watchtower
docker_nodes: heimdall, waldorf
proxmox_cluster: pve01
nfs_clients: heimdall, waldorf
core_services: heimdall
media_services: waldorf
```
---
## π― Active Missions
> **Traffic Light System:** π’ Complete | π‘ In Progress | π΄ Blocked
| Status | Mission | Details |
|--------|---------|---------|
| π’ | **Komodo GitOps** | All stacks migrated to Git sources with webhook automation |
| π’ | **GPU Transcoding** | GTX 1060 Mobile accessible in Plex/Tunarr containers |
| π’ | **Documentation Structure** | KBAs and SOPs organized in `documentation/` |
| π’ | **Ansible Automation** | All 4 nodes onboarded and managed by Ansible from Watchtower |
| π’ | **Proxmox Post-Install** | PVE01 configured: subscription nag removed, repos optimized |
| π‘ | **Hardware Transcoding Validation** | Monitor Plex for `(hw)` indicator during active streams |
| π’ | **NFS Mount Stability** | NFSv3 on Pi, NFSv4 on x86 nodes |
---
## π Repository Structure
```
homelab/
βββ ansible/ # Ansible automation (active)
β βββ inventory/ # Managed hosts and groups
β β βββ hosts.ini # 4-node inventory
β β βββ host_vars/ # Per-node configuration
β βββ playbooks/ # Automation workflows
β β βββ onboard-nodes.yml # Node SSH key deployment
β β βββ onboard-proxmox.yml # Proxmox post-install
β β βββ gather-node-facts.yml # System discovery
β βββ roles/ # Reusable automation
β β βββ proxmox_post_install/ # Nag removal, repo config
β βββ group_vars/ # Global variables
βββ nodes/ # Service definitions per node
β βββ heimdall/ # Core infrastructure (VM on PVE01)
β β βββ core/ # Komodo, Traefik, Redis
β β βββ trek/ # Trek service
β β βββ vaultwarden/ # Password manager
β β βββ (gitea via Komodo) # Self-hosted Git
β βββ waldorf/ # Media services (Physical)
β β βββ plex/ # Media server + GPU
β β βββ tunarr/ # IPTV channels + GPU
β βββ watchtower/ # Control plane (Pi 5)
β βββ vscode/ # Remote development
βββ documentation/ # Technical knowledge base
β βββ KBAs/ # Troubleshooting guides
β βββ SOPs/ # Operational procedures
β βββ plans/ # Implementation roadmaps
β βββ TECHNICAL_RUNBOOK.md # Emergency reference
βββ scripts/ # Utility scripts
βββ bootstrap.sh # Day-0 node initialization
βββ lib/ # Shared function libraries
```
---
## π§ 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 <