feat: add version checking and install manifest tracking

Add minimum version validation for all dependencies across local and
remote machines (jq>=1.6, curl>=7.70, git>=2.30, docker>=20.0,
compose>=2.0, shellcheck>=0.8, gh>=2.0). Setup scripts now record
every install action to .manifests/<host>.manifest files, enabling
full rollback via setup/cleanup.sh. teardown_all.sh gains --cleanup
flag to chain prerequisite removal after phase teardowns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
S
2026-02-26 19:35:09 -06:00
parent 720197bb10
commit 07d27f7a9c
9 changed files with 605 additions and 3 deletions

View File

@@ -19,6 +19,11 @@ log_info "=== Unraid Setup ==="
log_info "Verifying Unraid OS..."
require_remote_os "UNRAID" "Linux" "Unraid must be a Linux machine — check UNRAID_IP in .env"
# --------------------------------------------------------------------------
# Manifest — track what we install for rollback/cleanup
# --------------------------------------------------------------------------
manifest_init "unraid"
# --------------------------------------------------------------------------
# SSH connectivity
# --------------------------------------------------------------------------
@@ -52,6 +57,7 @@ else
log_info "Installing docker-compose standalone binary on Unraid..."
COMPOSE_VERSION="v2.29.1"
ssh_exec UNRAID "curl -SL https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose"
manifest_record "unraid" "static_bin" "/usr/local/bin/docker-compose"
if ssh_exec UNRAID "docker-compose --version" &>/dev/null; then
log_success "docker-compose installed on Unraid"
else
@@ -69,6 +75,7 @@ else
log_info "Installing jq static binary on Unraid..."
JQ_VERSION="1.7.1"
ssh_exec UNRAID "curl -SL https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/jq-linux-amd64 -o /usr/local/bin/jq && chmod +x /usr/local/bin/jq"
manifest_record "unraid" "static_bin" "/usr/local/bin/jq"
if ssh_exec UNRAID "jq --version" &>/dev/null; then
log_success "jq installed on Unraid"
else
@@ -77,6 +84,14 @@ else
fi
fi
# --------------------------------------------------------------------------
# Minimum version checks for remote tools
# --------------------------------------------------------------------------
log_info "Checking minimum versions on Unraid..."
check_remote_min_version "UNRAID" "docker" "docker --version" "20.0"
check_remote_min_version "UNRAID" "docker-compose" "docker compose version 2>/dev/null || docker-compose --version" "2.0"
check_remote_min_version "UNRAID" "jq" "jq --version" "1.6"
# --------------------------------------------------------------------------
# Data path
# --------------------------------------------------------------------------