← ClaudeAtlas

ocpvirt-teardownlisted

Destroy the demo VMs on OpenShift Virtualization and deregister them from AAP, leaving the expensive one-time setup intact — CNV, the boot-source DataSources including the Windows golden image, and the Terraform state namespace. Runs playbooks/teardown.yml. TRIGGER when: the user asks to tear down, destroy, clean up, or remove demo VMs, wants to free cluster memory before provisioning a different tier, or says a demo is finished. SKIP: if the user wants to remove OpenShift Virtualization itself or rebuild the golden image — this deliberately preserves both — or only wants to stop a VM rather than destroy it.
ericcames/sales.demos · ★ 1 · AI & Automation · score 67
Install: claude install-skill ericcames/sales.demos
# ocpvirt-teardown Destroys the VMs from `terraform/ocpvirt/` and removes them from the AAP inventory. This is the counterpart to `ocpvirt-provision`, and it runs the same Terraform state. ## What survives, and why it matters `terraform destroy` can only remove what is in its state, so scoping is a property of the module rather than a flag anyone has to remember: | Destroyed | Preserved | |---|---| | The demo namespace (`sales-demos-<env>`) | OpenShift Virtualization (`openshift-cnv`) | | The Linux and Windows VMs | The boot-source DataSources, incl. the Windows golden image | | Their Services and Routes | The published quay containerdisk | | The `sd1.*` cluster instance types | `sales-demos-tfstate`, the state namespace | Rebuilding CNV or the golden image is roughly a 45-minute cost. **Do not "tidy up" anything by hand after a teardown** — the reason this is safe is that Terraform never had those objects, and a manual `oc delete` has no such guardrail. The state namespace surviving is load-bearing: it holds the Secret describing every VM Terraform tracks, for **both** environments. Deleting it orphans everything. ## Preflight Check ```bash ./utilities/preflight.sh "${ENV:-sandbox}" --terraform # What is actually running right now # mcp__openshift-<env>__resources_list kubevirt.io/v1 VirtualMachine namespace: sales-demos-<env> # mcp__openshift-<env>__resources_list kubevirt.io/v1 VirtualMachineInstance namespace: sales-demos-<env> ``` ## Confirm before ru