Updating preflights
This commit is contained in:
parent
db6035e75f
commit
f041cf2aba
25
jeannie
25
jeannie
|
|
@ -2051,8 +2051,18 @@ preflight_warn() {
|
|||
|
||||
check_gitea_reachable() {
|
||||
local gitea_url="${LAB_GITEA_LOCAL_URL:-http://${LAB_GITEA_HOST:-192.168.100.73}:${LAB_GITEA_HTTP_PORT:-3000}/}"
|
||||
local output
|
||||
|
||||
curl -fsS --max-time 10 "${gitea_url}" >/dev/null
|
||||
if output="$(curl -fsS --max-time 10 "${gitea_url}" 2>&1 >/dev/null)"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
printf '%s\n' "${output}" >&2
|
||||
cat >&2 <<'EOF'
|
||||
Gitea local HTTP failed. Run ./jeannie doctor-gitea --verbose.
|
||||
If the local Gitea container is down or unhealthy, run ./jeannie deploy-gitea.
|
||||
EOF
|
||||
return 1
|
||||
}
|
||||
|
||||
check_debian_docker_root() {
|
||||
|
|
@ -6683,6 +6693,8 @@ EOF
|
|||
|
||||
nuke() {
|
||||
local target
|
||||
local target_host
|
||||
local worker_known_hosts_file="${REPO_ROOT}/.lab/rebuild-worker-known_hosts"
|
||||
declare -a CLUSTER_WORKER_TARGETS=()
|
||||
|
||||
require_debian_server "nuke"
|
||||
|
|
@ -6698,6 +6710,12 @@ EOF
|
|||
echo "Brutally nuking the homelab infrastructure..."
|
||||
cluster_worker_targets
|
||||
|
||||
if ((${#CLUSTER_WORKER_TARGETS[@]} > 0)); then
|
||||
mkdir -p "$(dirname "${worker_known_hosts_file}")"
|
||||
touch "${worker_known_hosts_file}"
|
||||
chmod 0600 "${worker_known_hosts_file}"
|
||||
fi
|
||||
|
||||
echo "--> Terminating local OpenTofu tasks..."
|
||||
killall tofu terraform 2>/dev/null || true
|
||||
|
||||
|
|
@ -6707,7 +6725,10 @@ EOF
|
|||
|
||||
for target in "${CLUSTER_WORKER_TARGETS[@]}"; do
|
||||
echo "--> Eviscerating remote Kubernetes components (${target})..."
|
||||
if ! ssh -o ConnectTimeout=5 "${target}" "bash -s" <<'EOF'
|
||||
target_host="${target#*@}"
|
||||
target_host="${target_host%%:*}"
|
||||
ssh-keygen -R "${target_host}" -f "${worker_known_hosts_file}" >/dev/null 2>&1 || true
|
||||
if ! ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="${worker_known_hosts_file}" "${target}" "bash -s" <<'EOF'
|
||||
set -euo pipefail
|
||||
|
||||
cleanup_calico_links() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue