incus-contrib/.claude/rules/lab-infrastructure.md

36 lines
1.2 KiB
Markdown

---
paths:
- "bin/incusos-proxmox"
- "bin/lab-test"
- "bin/examples/*"
---
# Lab Infrastructure
## Multi-lab coexistence
- `--lab-down config.yaml`: stops VMs (stay on disk).
- `--lab-up config.yaml`: starts stopped VMs (refuses if media attached).
- `--cleanup`: destroys permanently. These are distinct operations.
- `--resources`: host RAM/CPU/storage + per-pool allocation (API only).
- `--labs`: scans pool for `[incusos-lab:managed]` VMs, groups by config.
- `--lab-up` auto-deploy: offers full pipeline if no VMs exist yet.
## VMID range convention
| Range | Lab |
|---------|--------------------------------|
| 400-499 | OC-managed nodes |
| 800-809 | Single-node labs |
| 900-909 | Basic cluster |
| 910-919 | OC combined (server + nodes) |
| 920-929 | OC server standalone |
| 930-939 | Advanced / heterogeneous |
## Resource constraints
- **RAM is the bottleneck**: 4 GiB/VM minimum. 3-node = 12 GiB, OC lab = 28 GiB.
- **Storage**: thin provisioned (ZFS sparse). 3x 50 GiB = ~7-8 GiB actual.
- **CPU**: 4 cores/VM, 20 on host. Not a constraint.
- Pre-deploy checks warn if RAM exceeds available (API method).