Split into qemu and proxmox platforms over a shared content tree
platforms/qemu and platforms/proxmox each have their own lab.sh and lab.conf; content/ holds everything shared (roles, seed, site, helpers). The dispatcher, preflight and command implementations are common and take platform differences from the backend. Proxmox backend: qm create with q35/SATA/e1000, ISOs and seed ISOs in an ISO storage, provisioning over qm guest exec (no Python packages needed on the host), template + clone for reset, and peers/ to emit WireGuard configs. The role scripts now ride on the seed ISO, so provisioning transfers nothing. build-bundle.sh produces a self-contained tarball per platform, for hosts that cannot reach the git server. Both configs are generic: no absolute path from this machine remains.
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
# lab.conf — Proxmox VE platform
|
||||
#
|
||||
# Fill in the PVE_* block for your host: the rest works unchanged.
|
||||
# Verify every value with `./lab.sh check` before building anything.
|
||||
# Local overrides go in lab.conf.local (gitignored).
|
||||
|
||||
# ---------------------------------------------------------------- identity
|
||||
BACKEND="proxmox"
|
||||
LAB_NAME="norbourg"
|
||||
DOMAIN="norbourg.lab"
|
||||
NETBIOS="NORBOURG"
|
||||
FLAG_PREFIX="NORBOURG"
|
||||
|
||||
# ---------------------------------------------------------------- network
|
||||
# Lab segment. Nothing here is ever bridged to the office LAN.
|
||||
LAB_SUBNET="10.10.10.0/24"
|
||||
LAB_NETMASK="24"
|
||||
LAB_PREFIX="10.10.10"
|
||||
LAB_HOST_IP="10.10.10.1" # the Proxmox host, on the lab bridge
|
||||
LAB_DC_IP="10.10.10.10" # DC01, also the lab DNS server
|
||||
LAB_GATEWAY="10.10.10.1" # default gateway handed to the VMs
|
||||
OFFICE_SUBNET="192.168.10.0/24"
|
||||
|
||||
# ---------------------------------------------------------------- Proxmox VE
|
||||
# Storage for VM disks. Must support images (local-lvm, local-zfs, ...).
|
||||
PVE_STORAGE_DISKS="local-lvm"
|
||||
# Storage for ISOs (content type "iso"). `pvesm status -content iso` lists them.
|
||||
PVE_STORAGE_ISO="local"
|
||||
# Filesystem path behind PVE_STORAGE_ISO; ISOs and seed ISOs are written here.
|
||||
# For the default `local` storage this is /var/lib/vz/template/iso.
|
||||
PVE_ISO_DIR="/var/lib/vz/template/iso"
|
||||
|
||||
# Portless, isolated bridge. Create it in the GUI first:
|
||||
# Datacenter > node > Network > Create > Linux Bridge, name vmbr10,
|
||||
# no ports, IPv4 10.10.10.1/24, no gateway.
|
||||
PVE_BRIDGE="vmbr10"
|
||||
|
||||
# VM ids. dc01=base+0, fs01=base+1, ws01=base+2; templates use base+100.
|
||||
PVE_VMID_BASE=1100
|
||||
PVE_OSTYPE="win2k22"
|
||||
PVE_BIOS="seabios" # Windows 11 would need ovmf + efidisk0 + tpmstate0
|
||||
PVE_MACHINE="q35"
|
||||
PVE_CPU="host"
|
||||
PVE_NET_MODEL="e1000"
|
||||
PVE_AGENT=1 # requires the QEMU guest agent in the guest
|
||||
|
||||
# ---------------------------------------------------------------- storage
|
||||
LAB_ROOT="${LAB_ROOT:-/var/lib/norbourg-lab}"
|
||||
SEED_DIR="$PVE_ISO_DIR" # seed ISOs must live in an ISO storage
|
||||
LAB_ISO_CACHE="$PVE_ISO_DIR"
|
||||
MIN_FREE_GB=20
|
||||
|
||||
WINDOWS_ISO="$LAB_ISO_CACHE/SERVER_EVAL_x64FRE_en-us.iso"
|
||||
VIRTIO_ISO="$LAB_ISO_CACHE/virtio-win.iso"
|
||||
|
||||
# ---------------------------------------------------------------- vms
|
||||
# name ip ram_mb disk_gb vcpu role (= windows/roles/<role>.ps1)
|
||||
VMS=$(cat <<'EOF'
|
||||
dc01 10.10.10.10 4096 36 2 dc01
|
||||
fs01 10.10.10.20 4096 36 2 fs01
|
||||
ws01 10.10.10.31 4096 36 2 ws01
|
||||
EOF
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------- windows
|
||||
LAB_ADMIN_PASSWORD="${LAB_ADMIN_PASSWORD:-Norbourg!2026}"
|
||||
LAB_SAFE_MODE_PASSWORD="${LAB_SAFE_MODE_PASSWORD:-NorbourgDsrm!2026}"
|
||||
WINDOWS_IMAGE_INDEX=2 # 2 = Standard, Desktop Experience
|
||||
|
||||
# ---------------------------------------------------------------- tuning
|
||||
DISK_FILL_RATIO=30
|
||||
ISO_BUDGET_GB=8
|
||||
BUILD_TIMEOUT=2700
|
||||
|
||||
# ---------------------------------------------------------------- participants
|
||||
# WireGuard endpoint for the router VM option; peers/ writes configs here.
|
||||
WG_PORT=51820
|
||||
WG_ENDPOINT="" # leave empty to print the LAN address instead
|
||||
WG_DIR="${WG_DIR:-$HOME/norbourg-peers}"
|
||||
Reference in New Issue
Block a user