No description
- Jinja 46.8%
- Python 31.8%
- Shell 11.3%
- HCL 10.1%
|
Some checks failed
lint / lint (push) Has been cancelled
Per gosseljl/infra ADR 0011: monorepo's `common` role now manages the baseline on DDI hosts. Running both CI lanes at once causes Alloy reinstall loops and sshd config flap. Scheduled triggers (push-to-main + cron) removed; workflow_dispatch stays for emergency manual runs. Scheduled triggers restore at the Phase 5 subtree merge, at which point these workflow files are deleted (the monorepo will own them). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo | ||
| ansible | ||
| docs | ||
| netbox/seed-data | ||
| scripts | ||
| terraform/proxmox | ||
| tests/drift | ||
| tools | ||
| .ansible-lint | ||
| .env.example | ||
| .gitignore | ||
| .mcp.json | ||
| .pre-commit-config.yaml | ||
| .sops.yaml | ||
| .yamllint | ||
| inventory.toml | ||
| README.md | ||
homelab-ddi
Centralized DNS / DHCP / IPAM stack for the strscrm homelab. Replaces Technitium DNS and isc-dhcp-server.
Stack
| Layer | Component | HA |
|---|---|---|
| IPAM / management | NetBox 4.6 + plugins (netbox_dns, netbox_dns_bridge, netbox_kea, netbox_healthcheck_plugin) |
Single VM (PBS-backed) |
| Authoritative + recursive DNS | BIND 9.20 (catalog zones, RPZ blocklists, NetBox webhook receiver) | Active/active pair |
| DHCP | Kea 3.0.3 LTS with HA hook (hot-standby), memfile per node | Active/standby pair |
| Observability | Prometheus + Alertmanager + Grafana 11.4 + Loki + blackbox + Alloy + Stork agents | Single VM (Uptime Kuma probes the probe) |
| CI/CD | Forgejo Actions on megatron runner |
n/a |
| Storage | Proxmox ceph rbd pool |
shared across pve1/pve2/pve3 |
See /home/gosseljl/src/infra/CLAUDE.md (one level up from this repo) for the full design contract.
Layout
inventory.toml # SOURCE OF TRUTH for hosts, IPs, MACs, subnets, reservations
docs/ # design docs, ADRs, runbooks, archived materials
terraform/ # Proxmox VM provisioning (bpg/proxmox provider)
ansible/ # roles + playbooks for in-VM config
netbox/ # plugins + seed data (seed-data/objects.yaml is part-generated from inventory.toml)
scripts/ # one-shot helpers (template builder, etc.)
tools/ # operator tooling (render-inventory.py, refresh-dashboards.sh)
tests/ # drift checkers + e2e tests
.forgejo/ # CI workflows
Quickstart
- Install prereqs:
terraform(ortofu),ansible,sops,age,uvx,pre-commit. cp .env.example .envand fill in tokens.direnv allow(or source.envmanually).pre-commit install— auto-rendersinventory.tomlon every commit and runsyamllint.- Phase 1: see
docs/runbooks/phase-1-evidence.mdfor the deployed acceptance log.
Phases
| Phase | Scope | Status |
|---|---|---|
| 1 | NetBox + first BIND node | Complete |
| 2 | Second BIND node + RPZ blocklists + catalog zones + NetBox webhook | Complete |
| 3 | Kea HA pair + netbox_kea plugin (test subnet only) |
Complete |
| 3.5 | Forgejo Actions CI/CD + drift detection | Complete |
| 3.75 | Observability stack on monitor-01 |
Complete |
| 3.76 | Stork agent replaces kea-exporter + bind_exporter; Alloy replaces Promtail | Complete |
| 3.77 | Grafana dashboards: curated OSS imports replace hand-built set | Complete |
| 3.78 | NetBox object-count textfile collector + Infinity datasource | Complete |
| 4 | UniFi adoption + per-VLAN cutover on Kea | In progress (VLAN 101, 103 done; 102, 104 pending) |
| 5 | Decommission Technitium + isc-dhcp-server |
Not started |
Operator notes
- Internal DNS suffix:
infra.strscrm.io(split-horizon on an owned domain). - Lab management VLAN: tag 102, subnet
10.0.2.0/24, gateway10.0.2.254, onvmbr0. - Test subnet: VLAN 199,
10.0.99.0/24, onvmbr1(carries the VLAN over the Cisco PVE-STOR trunk). - Storage: Proxmox
cephrbd pool (shared acrosspve1,pve2,pve3). - Backups: Proxmox Backup Server (
pbsstorage). - Secrets: sops + age (see
docs/secrets.md). - External monitoring of monitor-01: Uptime Kuma probes
http://monitor-01:9090/-/healthyso a dead Prometheus is detected from outside the stack.
Common tasks
- Add a host or reservation, or change an IP: edit
inventory.tomlat the repo root, thenpython3 tools/render-inventory.pyto updatenetbox/seed-data/objects.yamlandansible/roles/kea/defaults/main.yml. Commit both the TOML and the rendered YAML; CI rejects the push otherwise. - Refresh Grafana dashboards from upstream:
tools/refresh-dashboards.sh, review the diff, commit, push, let CI deploy. - Cut a new VLAN over to Kea: set
kea_active = trueon the network ininventory.toml, render, push, then flip the relay address on the upstream router (ip dhcp relay addresson Cisco NX-OS — notip helper-address). - Add a new DNS zone: create the zone in NetBox; the catalog-zone consumer on the BIND nodes auto-loads it within seconds.
- Find Proxmox guests not yet in DNS:
python3 scripts/discover-undns-vms.py(read-only diff against NetBox). - Watch live Kea logs:
ssh debian@10.0.2.232 'sudo journalctl -fu isc-kea-dhcp4-server'(or.233).