Files
TerraHome/nixos/kubeadm/scripts/rebuild-and-bootstrap.sh
MichaelFisher1997 6fecfb3ee6
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s
refactor: add Python bootstrap controller with resumable state
Introduce a clean orchestration layer in nixos/kubeadm/bootstrap/controller.py and slim rebuild-and-bootstrap.sh into a thin wrapper. The controller now owns preflight, rebuild, init, CNI install, join, and verify stages with persisted checkpoints on cp-1 plus a local state copy for CI debugging.
2026-03-03 00:09:10 +00:00

15 lines
461 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INVENTORY_FILE="${1:-$SCRIPT_DIR/inventory.env}"
CONTROLLER="$SCRIPT_DIR/../bootstrap/controller.py"
if [ ! -f "$INVENTORY_FILE" ]; then
echo "Missing inventory file: $INVENTORY_FILE"
echo "Copy $SCRIPT_DIR/inventory.example.env to $SCRIPT_DIR/inventory.env and edit node mappings."
exit 1
fi
python3 "$CONTROLLER" reconcile --inventory "$INVENTORY_FILE"