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.
21 lines
656 B
Bash
Executable File
21 lines
656 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# lab.sh — Norbourg lab on a generic Linux host (QEMU/KVM).
|
|
set -euo pipefail
|
|
|
|
LAB_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd -P)
|
|
ROOT_DIR=$(cd -- "$LAB_DIR/../.." && pwd -P)
|
|
CONTENT_DIR="$ROOT_DIR/content"
|
|
PLATFORM=qemu
|
|
export LAB_DIR ROOT_DIR CONTENT_DIR PLATFORM
|
|
|
|
source "$CONTENT_DIR/lib/common.sh"
|
|
for _lib in check cmd_init cmd_isos cmd_seeds cmd_build cmd_provision cmd_web \
|
|
cmd_snapshot cmd_doctor cmd_misc; do
|
|
# shellcheck disable=SC1090
|
|
source "$CONTENT_DIR/lib/${_lib}.sh"
|
|
done
|
|
unset _lib
|
|
|
|
# shellcheck source=../../content/lib/dispatch.sh
|
|
source "$CONTENT_DIR/lib/dispatch.sh"
|