# lab-production.yaml - Production-quality home lab (OC + 3-node cluster)
#
# Deploys 1 Operations Center instance and 3 Incus nodes for manual clustering.
# Uses VMID range 910-913 (same as lab-oc.yaml -- do not run both simultaneously).
#
# Architecture:
#   lab-oc       (910) - Operations Center dashboard and monitoring
#   lab-node-01  (911) - Cluster init node + OVN control plane host (64G disk)
#   lab-node-02  (912) - Cluster member
#   lab-node-03  (913) - Cluster member
#
# Strategy: Hybrid OC + Manual Clustering
#   - OC deployed with standard ISO (dashboard/monitoring role)
#   - 3 nodes deployed with standard ISO, static IPs on VLAN 69
#   - Cluster formed manually via incus CLI (proven reliable)
#   - OVN overlay networking configured post-clustering
#   - Mixed workloads: containers + VMs with live migration
#
# Joining nodes use apply_defaults: false -- the cluster join process creates
# member-specific pool entries. This follows the upstream IncusOS recommendation
# and avoids the 8-command cleanup per joining node.
#
# RAM budget: 28 GiB of 64 GiB (44% utilization)
# OVN external IPs: 192.168.103.200-210 (excluded from DHCP)
#
# Usage:
#   incusos-proxmox --dry-run examples/lab-production.yaml   # Preview
#   incusos-proxmox --yes examples/lab-production.yaml        # Deploy
#   incusos-proxmox --status examples/lab-production.yaml     # Check status
#   incusos-proxmox --cleanup examples/lab-production.yaml    # Tear down VMs
#   incusos-proxmox --cleanup --deep examples/lab-production.yaml  # Full cleanup
#
# After deployment, follow notes/production-lab-guide.md for:
#   - Cluster formation (section 4)
#   - OVN networking (section 6)
#   - Workload deployment (sections 7-9)
#   - Live migration testing (section 10)
#   - Cluster lifecycle (section 11)
#
# Connection settings from proxmox.yaml (see examples/proxmox.yaml.example).
# Add a proxmox: section here to override per-deployment.

defaults:
  cores: 4
  memory: 8192
  disk: 50
  start_vmid: 910

vms:
  - name: lab-oc
    app: operations-center
    apply_defaults: true
    cores: 2
    memory: 4096
    ip: 192.168.102.110/22

  - name: lab-node-01
    app: incus
    apply_defaults: true          # init node: needs storage pool + network
    disk: 64                      # extra space for OVN control plane container
    ip: 192.168.102.111/22

  - name: lab-node-02
    app: incus
    apply_defaults: false         # joining node: cluster join creates pool entry
    ip: 192.168.102.112/22

  - name: lab-node-03
    app: incus
    apply_defaults: false         # joining node: cluster join creates pool entry
    ip: 192.168.102.113/22
