Ephemeral Castle: Proxmox Cluster Detail

Level 3 (Detail) — Create, destroy, and management scripts for the local Proxmox cluster.

Concept

The Proxmox/Talos cluster lifecycle is managed by scripts under clusters/tazlab-k8s/proxmox/. These scripts handle VM creation, Talos bootstrap, cluster destruction, and verification.

Script Inventory

create.sh

File: clusters/tazlab-k8s/proxmox/create.sh

Full cluster bootstrap from scratch. Orchestrates the 5 active Terragrunt layers (gcp-services layer decommissioned):

  1. secrets → fetch from Infisical
  2. platform → Proxmox VMs + Talos
  3. engine → ESO
  4. networking + gitops → parallel after engine
  5. storage → Longhorn

destroy.sh

File: clusters/tazlab-k8s/proxmox/destroy.sh

Full cluster teardown. Stops all VMs, removes terraform state, cleans up generated configs. Uses set -euo pipefail to abort immediately if any step fails.

nuclear-wipe.sh / nuclear-wipe.py

Files: clusters/tazlab-k8s/proxmox/nuclear-wipe.sh and nuclear-wipe.py

Brute-force VM purge via Proxmox API. Used when destroy.sh cannot complete cleanly. The .sh wrapper iterates over known VM IDs; the .py script provides an alternative API-driven path.

stress-test.sh

File: clusters/tazlab-k8s/proxmox/stress-test.sh

Automated test suite for cluster resilience. Tests:

  • Full create → verify nodes Ready
  • Full destroy → verify cleanup
  • Recreate → verify idempotency

precision-test.sh

File: clusters/tazlab-k8s/proxmox/precision-test.sh

Targeted test for specific layers or components. Used during CRISP build validation.

check-blog.sh

File: clusters/tazlab-k8s/proxmox/check-blog.sh

Verifies blog and wiki are serving correctly after deployment. Checks HTTP status codes for blog.tazlab.net and wiki.tazlab.net.

Root-Level Scripts

final-cleanup.sh

Location: ephemeral-castle/final-cleanup.sh

Purpose: Nuclear cleanup of stale local state. Removes generated Terraform state, configs, and inventories across all layers. Used when a destroy left residual artifacts.

rescue-orphans.sh

Location: ephemeral-castle/rescue-orphans.sh

Purpose: Rescue orphaned VMs. Scans Proxmox for VMs that are still running but no longer tracked by Terraform state, and lists them for manual cleanup or re-import.

terragrunt-stress-test.sh

Location: ephemeral-castle/terragrunt-stress-test.sh

Purpose: 3-cycle Terragrunt stress test. Runs create.shdestroy.shcreate.sh to validate idempotency and timing stability.

Generated Files

FileSourcePurpose
configs/kubeconfigplatform layerkubectl access
configs/talosconfigplatform layertalosctl access

See Also