feat(iac): scaffold orca-platform layout (M1.1) #3
Reference in New Issue
Block a user
Delete Branch "feat/m1.1-iac-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
platform/orca-platformper INFRASTRUCTURE.md §2 and IMPLEMENTATION_PLAN.md M1.1.orca validate(which doesn't exist as a subcommand) formake validate— a Python TOML parser plus structural sanity check.Why
M1.1 acceptance:
make plan ENV=stageproduces a no-op diff once applied;orca validateruns in CI; PRs that break a manifest fail. Without this, no later milestone (M2.1 Keycloak, M4.1 tenant-registry, M5.1 portal, …) has anywhere to land its real config.Linked milestone: M1.1
How
registry.yourplatform.com/<service>:placeholder—make validateaccepts them, butmake applywill refuse a placeholder once that gate lands in M1.2.depends_on,extra_ports,cmd,mounts) MUST come before any[service.xxx]header, or TOML scopes them under the wrong sub-table. The validator rejects mis-nesting explicitly.devis a no-op,stageselects onlymanifests/stage/,prodselectsvm-edge+vm-control+vm-data. The merge today is a passthrough — real per-env deltas (image tags resolved from registry, replica bumps) will land alongside the first milestone that needs them.vms/*.toml) name flavor, public IP, private CIDR, and firewall ingress per VM. Consumed by M1.2 provisioner (Terraform against SysEleven OpenStack); Orca itself ignores this dir.orca validatedoesn't exist. Inspected the Orca CLI (orca --help); onlydeploy, no validate / plan / dry-run.make validatedoes the equivalent locally via TOML parse + schema check.Test plan
make validate✅ — checks 42 files (35 manifests + 3 overlays + 4 VMs)make plan ENV=stage✅ — writes 11 resolved manifests to.orca-out/stage/make plan ENV=prod✅ — writes 24 resolved manifestsmake apply ENV=stage✅ — correctly no-ops withORCA_API_URL not setmake plan ENV=bogus✅ — rejects unknown envdepends_on(a real bug I hit in a first-pass bash heredoc generator)Risk
Blast radius: repo-local. No services touched. No cluster contact.
What could break:
ServiceConfigstruct as Orca evolves. Mitigation:make validateonly enforces fields Orca currently requires; if Orca adds a mandatory field later, validator gets a new rule.make validatedoesn't catch it because dir-vs-placement is now an explicit rule — but they could put the file in the wrong directory. Mitigation: low risk; reviewer + CODEOWNERS catches it.Rollback plan: revert the PR. Until M1.2 ships, this repo is descriptive only — nothing reads from it in production.
Checklist
${secrets.NAME}, never inlined (Keycloak DB URI excepted per §8 rule 3)Lands the per-VM × per-service manifest tree, per-env overlays, VM specs for SysEleven provisioning, DNS zone placeholder, plan/apply/validate scripts, and a Makefile. Structure (per INFRASTRUCTURE.md §2 + IMPLEMENTATION_PLAN.md M1.1): - manifests/{vm-edge,vm-control,vm-data,stage}/<service>.toml — 35 stubs - overlays/{dev,stage,prod}/overlay.toml — env-selection rules - vms/{vm-edge,vm-control,vm-data,stage}.toml — OpenStack flavor/IP/firewall - dns/yourplatform.com.zone.template — PowerDNS zone (body lands in M0.3) - cluster.toml.tmpl — cluster-level config rendered per env - scripts/validate.sh — TOML parse + structural sanity - scripts/plan.sh — merge manifests + overlay → .orca-out/<env>/ - scripts/apply.sh — push to Orca controller (no-op until M1.2) - Makefile — validate / plan / apply / diff / clean Each manifest header names the milestone that finalises its real values; images today are 'placeholder' for services that need their own repo to exist first. make validate stays green; apply gates on ORCA_API_URL. CI workflow swapped from the broken 'orca validate' to 'make validate', which calls a Python TOML parser plus structural checks (placement.node matches vm dir, resources.memory present, no mis-nested keys). Refs: M1.1Re-read the Orca spec: 'orca nodes' lists already-joined hosts and 'orca join' attaches an existing node to a cluster, but Orca does not provision the VMs themselves. VM provisioning (SysEleven OpenStack via Terraform) is a separate concern and will land in a dedicated repo under the M1.2 milestone, not in orca-platform. Removes vms/{vm-edge,vm-control,vm-data,stage}.toml + vms/README.md. Updates README directory tree and milestone fill-in table to reflect that M1.2's VM specs live elsewhere. validate.sh stops checking vms/. Refs: M1.1