# prateeksavanur/homelab-infra architecture

> Architecture diagram of the GitHub repository prateeksavanur/homelab-infra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prateeksavanur/homelab-infra
- Repository: https://github.com/prateeksavanur/homelab-infra

## Overview

This repository provisions and configures a Proxmox homelab, then deploys cluster services. The documented workflow is operator-run Terraform provisioning followed by Ansible configuration of the hosts, k3s, AdGuard, and applications. The diagram preserves the documented DNS, ingress, storage, and service capabilities. Source excerpts were unavailable, so relationships are limited to those stated in the README; additional components visible only in the tree are not connected speculatively.

Main entry points: [`ansible/playbooks/site.yml`](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/playbooks/site.yml) (Ansible setup), [`terraform/main.tf`](https://github.com/prateeksavanur/homelab-infra/blob/main/terraform/main.tf) (Terraform provisioning), [`ansible/roles/k3s_apps/tasks/main.yml`](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/tasks/main.yml) (Application deployment), [`ansible/roles/k3s_master/tasks/main.yml`](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_master/tasks/main.yml) (k3s cluster)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provision["Infrastructure provisioning"]
  node_terraform["Terraform provisioning<br/>[main.tf]"]
end

subgraph group_configure["Host configuration"]
  node_ansible["Ansible setup<br/>[site.yml]"]
  node_inventory["Host inventory<br/>[hosts.yml]"]
  node_common["OS baseline<br/>[main.yml]"]
end

subgraph group_cluster["Cluster services"]
  node_k3s["k3s cluster<br/>[main.yml]"]
  node_workers["Worker nodes<br/>[main.yml]"]
  node_ingress["Ingress and TLS<br/>[main.yml]"]
  node_adguard["AdGuard DNS<br/>[main.yml]"]
end

subgraph group_apps["Homelab applications"]
  node_apps["Application deployment<br/>[main.yml]"]
  node_jellyfin["Jellyfin<br/>[deployment.yml]"]
  node_website["Website<br/>[deployment.yml]"]
  node_media[("Media storage<br/>[media-pv.yml]")]
end

node_operator(("Operator"))
node_proxmox["Proxmox host"]
node_router["Home router"]

node_operator -->|"runs"| node_terraform
node_terraform -->|"provisions VMs"| node_proxmox
node_operator -->|"runs"| node_ansible
node_terraform -->|"outputs IP hint"| node_inventory
node_ansible -->|"uses hosts"| node_inventory
node_ansible -->|"configures baseline"| node_common
node_ansible -->|"sets up cluster"| node_k3s
node_ansible -->|"configures agents"| node_workers
node_k3s -->|"includes"| node_ingress
node_ansible -->|"configures DNS"| node_adguard
node_router -->|"uses for DNS"| node_adguard
node_ansible -->|"deploys apps"| node_apps
node_apps -->|"deploys"| node_jellyfin
node_apps -->|"deploys"| node_website
node_jellyfin -->|"uses media"| node_media

click node_terraform "https://github.com/prateeksavanur/homelab-infra/blob/main/terraform/main.tf"
click node_ansible "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/playbooks/site.yml"
click node_inventory "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/inventory/hosts.yml"
click node_common "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/common/tasks/main.yml"
click node_k3s "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_master/tasks/main.yml"
click node_workers "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_worker/tasks/main.yml"
click node_ingress "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_master/tasks/main.yml"
click node_adguard "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/adguard/tasks/main.yml"
click node_apps "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/tasks/main.yml"
click node_jellyfin "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/jellyfin/deployment.yml"
click node_website "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/website/deployment.yml"
click node_media "https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/storage/media-pv.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_terraform toneBlue
class node_ansible,node_inventory,node_common toneAmber
class node_k3s,node_workers,node_ingress,node_adguard,node_router toneMint
class node_apps,node_jellyfin,node_website,node_media toneRose
class node_operator,node_proxmox toneIndigo
```

## Components

### Infrastructure provisioning

- [Terraform provisioning](https://github.com/prateeksavanur/homelab-infra/blob/main/terraform/main.tf): `terraform/main.tf`

### Host configuration

- [Ansible setup](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/playbooks/site.yml): `ansible/playbooks/site.yml`
- [Host inventory](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/inventory/hosts.yml): `ansible/inventory/hosts.yml`
- [OS baseline](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/common/tasks/main.yml): `ansible/roles/common/tasks/main.yml`

### Cluster services

- [k3s cluster](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_master/tasks/main.yml): `ansible/roles/k3s_master/tasks/main.yml`
- [Worker nodes](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_worker/tasks/main.yml): `ansible/roles/k3s_worker/tasks/main.yml`
- [Ingress and TLS](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_master/tasks/main.yml): `ansible/roles/k3s_master/tasks/main.yml`
- [AdGuard DNS](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/adguard/tasks/main.yml): `ansible/roles/adguard/tasks/main.yml`

### Homelab applications

- [Application deployment](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/tasks/main.yml): `ansible/roles/k3s_apps/tasks/main.yml`
- [Jellyfin](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/jellyfin/deployment.yml): `ansible/roles/k3s_apps/files/jellyfin/deployment.yml`
- [Website](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/website/deployment.yml): `ansible/roles/k3s_apps/files/website/deployment.yml`
- [Media storage](https://github.com/prateeksavanur/homelab-infra/blob/main/ansible/roles/k3s_apps/files/storage/media-pv.yml): `ansible/roles/k3s_apps/files/storage/media-pv.yml`

### Other components

- **Operator**
- **Proxmox host**
- **Home router**

## Connections

- Operator → Terraform provisioning: runs (evidence: `README.md`)
- Terraform provisioning → Proxmox host: provisions VMs (evidence: `README.md`)
- Operator → Ansible setup: runs (evidence: `README.md`)
- Terraform provisioning → Host inventory: outputs IP hint (evidence: `README.md`)
- Ansible setup → Host inventory: uses hosts (evidence: `README.md`)
- Ansible setup → OS baseline: configures baseline (evidence: `README.md`)
- Ansible setup → k3s cluster: sets up cluster (evidence: `README.md`)
- Ansible setup → Worker nodes: configures agents (evidence: `README.md`)
- k3s cluster → Ingress and TLS: includes (evidence: `README.md`)
- Ansible setup → AdGuard DNS: configures DNS (evidence: `README.md`)
- Home router → AdGuard DNS: uses for DNS (evidence: `README.md`)
- Ansible setup → Application deployment: deploys apps (evidence: `README.md`)
- Application deployment → Jellyfin: deploys (evidence: `README.md`)
- Application deployment → Website: deploys (evidence: `README.md`)
- Jellyfin → Media storage: uses media (evidence: `README.md`)
