Include Raspberry Pi worker in cluster runs
Homelab Main / deploy (push) Failing after 13s Details

This commit is contained in:
juvdiaz 2026-05-28 00:24:13 -06:00
parent 9aa78c2e2f
commit ab91142b06
1 changed files with 15 additions and 1 deletions

16
lab.sh
View File

@ -595,6 +595,19 @@ with open(var_file, "w", encoding="utf-8") as handle:
PY PY
} }
prepare_cluster_worker_var_file() {
local include_raspberry_default="$1"
local spec_file="${REPO_ROOT}/.lab/manual-workers.tsv"
local var_file="${REPO_ROOT}/.lab/cluster-workers.auto.tfvars.json"
export LAB_INCLUDE_RASPBERRY_WORKER="${LAB_INCLUDE_RASPBERRY_WORKER:-${include_raspberry_default}}"
mkdir -p "${REPO_ROOT}/.lab"
: >"${spec_file}"
write_cluster_worker_var_file "${spec_file}" "${var_file}"
export LAB_CLUSTER_VAR_FILE="${var_file}"
}
run_pimox_pipeline() { run_pimox_pipeline() {
local mode="${LAB_PIMOX_PIPELINE:-false}" local mode="${LAB_PIMOX_PIPELINE:-false}"
local pimox_host="${LAB_PIMOX_HOST:-${TF_VAR_pimox_host:-192.168.100.80}}" local pimox_host="${LAB_PIMOX_HOST:-${TF_VAR_pimox_host:-192.168.100.80}}"
@ -2486,6 +2499,7 @@ up() {
deploy_gitea deploy_gitea
bootstrap_gitea_repo bootstrap_gitea_repo
prepare_cluster_worker_var_file true
run_tofu_stack "bootstrap/cluster" run_tofu_stack "bootstrap/cluster"
run_tofu_stack "bootstrap/platform" run_tofu_stack "bootstrap/platform"
apps apps
@ -2497,12 +2511,12 @@ up() {
rebuild_cluster() { rebuild_cluster() {
require_debian_server "rebuild-cluster" require_debian_server "rebuild-cluster"
export LAB_INCLUDE_RASPBERRY_WORKER="${LAB_INCLUDE_RASPBERRY_WORKER:-false}"
export WORKER_SSH_TARGETS="${WORKER_SSH_TARGETS:-}" export WORKER_SSH_TARGETS="${WORKER_SSH_TARGETS:-}"
echo "Rebuilding the Kubernetes cluster without touching external Raspberry Pi Gitea..." echo "Rebuilding the Kubernetes cluster without touching external Raspberry Pi Gitea..."
nuke nuke
prepare_cluster_worker_var_file true
run_tofu_stack "bootstrap/cluster" run_tofu_stack "bootstrap/cluster"
run_tofu_stack "bootstrap/platform" run_tofu_stack "bootstrap/platform"
apps apps