Stage 3 (vr1-dc0) prep batch: D-121..D-124 rulings + substrate/rack wiring, HA overlay, NetBox importers
Prepares the VR1 Stage-3 DC substrate so the live steps reduce to review-plan-and-apply.
Authoring + offline validation only -- NO cloud mutation; every tofu apply, NetBox --commit,
and rack install stays operator-gated. Four decisions ruled this batch, all recorded:

- D-121 (ADOPTED): make the decorative single-unit control plane REAL. 14 services scale 1->3
  (D-009's mechanical scale-up pulled into VR1); node layout = Option C (3 control + 2 compute +
  3 storage/DC, sizing set) after a whole-host resource validation (256 vCPU/1024 GiB/10 TiB);
  vault sub-ruling = v-a (MySQL-backed, charm-verify gated). Placement-balance rule for Stage 5.
- D-122 (ADOPTED): VR1 site shape -- nested-per-site containment, dark fiber East-West only,
  dedicated per-site L3 ISP uplink, 2-NIC fabric-routed DC edge (LAN=provider-public, WAN=uplink),
  per-site MAAS. Edge NIC count baremetal-matched (nodes 6, edge 2).
- D-123 (ADOPTED Model A): DC nodes vcloud-level; site-down = destroy the vr1-dc0-* group; MAAS
  region on Office1 + a rack controller per DC (vvr1-dc0).
- D-124 (ADOPTED Scheme A): the Office1-region<->DC-rack management overlay -- a transit link on
  the office1<->dc0 mesh leg; rack sizing 4/8192/80.

Code (all validated, NOT applied):
- OpenTofu: new modules/site-wan (NAT /24 uplink, provider-schema-confirmed); main.tf Stage-3
  section -- vr1_dc0_wan, the 2-NIC edge, 8 Option C node VMs (for_each), the vvr1-dc0 rack
  (two legs, static IPs from new vr1_dc0_rack_* tfvars -- NetBox-assigned, not invented), netem
  held, mesh-link network_name output; stale vr1_dc1_planes comment fixed. Step-9 maas-vm-host
  deliberately deferred (DOCFIX-179: its maas provider would force every plan to demand creds).
  tofu validate Success; opentofu-validate 11/11.
- NetBox: dc-edge-wan-import.py (58/58) + dc-rack-mgmt-import.py (96/96) -- register the DC-edge
  /24s + the rack transit/IP, dry-by-default, whole-plan preflight, operator-supplied literals.
- overlays/dc-ha-scaleup.yaml: the D-121 14-service HA scale-up (Stage-5), placement tokens +
  rabbitmq min-cluster-size + hacluster cluster_count + re-declared vault-hacluster.
- scripts/site-headend-install.sh: rack-only mode (enrolls a DC rack to Office1's region).
- runbooks/dc-dc-phase2-tofu-dc-substrate.md: fix-forward (D-119 naming, Steps 4-5 REST-API,
  D-121/122 folded in, stale gate corrected).

docs/session-ledger.md + dc-dc-deployment-workflow.md reconciled; three changelogs added.
Gauntlet ALL GREEN; repo-lint 0-fail (1 documented legacy WARN).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ck6xh3jWQi5b3Su8Dx1LEH
1 parent 80502e9 commit a48a60f1f9371de2b33fe9e9c80c3ec20326e922
@JANeumatrix JANeumatrix authored 20 hours ago
Showing 25 changed files
View
docs/changelog-20260715-d121-d122-stage3-ha-nodelayout.md 0 → 100644
View
docs/changelog-20260715-stage3-prereqs-prep.md 0 → 100644
View
docs/changelog-20260716-d124-rack-addressing.md 0 → 100644
View
docs/dc-dc-deployment-workflow.md
View
docs/design-decisions.md
View
docs/session-ledger.md
View
netbox/dc-edge-wan-import.py 0 → 100644
View
netbox/dc-rack-mgmt-import.py 0 → 100644
View
opentofu/main.tf
View
opentofu/modules/mesh-link/outputs.tf
View
opentofu/modules/site-wan/main.tf 0 → 100644
View
opentofu/modules/site-wan/outputs.tf 0 → 100644
View
opentofu/modules/site-wan/variables.tf 0 → 100644
View
opentofu/modules/site-wan/versions.tf 0 → 100644
View
opentofu/variables.tf
View
overlays/dc-ha-scaleup.yaml 0 → 100644
View
runbooks/dc-dc-phase2-tofu-dc-substrate.md
View
scripts/site-headend-install.sh
View
tests/dc-edge-wan-import/fake_netbox.py 0 → 100644
View
tests/dc-edge-wan-import/run-tests.sh 0 → 100644
View
tests/dc-edge-wan-import/test_logic.py 0 → 100644
View
tests/dc-rack-mgmt-import/fake_netbox.py 0 → 100644
View
tests/dc-rack-mgmt-import/run-tests.sh 0 → 100644
View
tests/dc-rack-mgmt-import/test_logic.py 0 → 100644
View
tests/site-headend-install/run-tests.sh