Commit Graph

44 Commits

Author SHA1 Message Date
S
c7c29869ee feat: add README for Pi Monitoring Stack setup and usage instructions 2026-03-02 21:06:42 -05:00
S
4e7070001e fix: adjust total prompt count and remove unused database IP prompts in configuration script 2026-03-02 12:03:50 -05:00
S
fa8bd7b0ad fix: update prompt count and include UNRAID_COMPOSE_DIR and FEDORA_COMPOSE_DIR in environment variable prompts 2026-03-02 11:43:54 -05:00
S
6e1bf1fd0e fix: update prompt count and clarify messaging for auto-populated variables in configure_env.sh 2026-03-02 10:50:49 -05:00
S
4954e04825 fix: enhance repo validation to support comma-separated lists and expand multi-repo runners 2026-03-02 09:16:07 -05:00
S
fe5023b3ee fix: add python3 verification for preflight DNS checks in macbook setup script 2026-03-02 09:15:20 -05:00
S
e8e2c845d9 fix: add validation for runner host and type combinations in configuration wizard 2026-03-02 08:52:33 -05:00
S
9afd4ee537 fix: enhance prompt_var function to support optional_path validation for SSH key inputs 2026-03-02 08:52:29 -05:00
S
4a90e8eaab fix: update Docker installation command for DNF5 compatibility in fedora.sh 2026-03-02 08:51:32 -05:00
S
4135f9d5c0 fix: update total prompt count in configure_env.sh to reflect changes in fixed prompts 2026-03-02 08:12:35 -05:00
S
5c60d321ab fix: update .env loading comments and adjust default path handling for runners 2026-03-02 08:12:31 -05:00
S
9494645b3a fix: resolve 10 bugs across scripts
- manage_runner.sh: fix RUNNER_DEFAULT_IMAGE clobbering by renaming
  per-runner var to RUNNER_SECTION_IMAGE; .env fallback now works
- manage_runner.sh: render native runner config.yaml before registration
  so act_runner can read it during --config flag
- manage_runner.sh: add SSH credential validation for remote hosts
  (fail early with clear error instead of cryptic SSH failure)
- phase1/phase2: add UNRAID_DB_IP/FEDORA_DB_IP to conditional
  require_vars when DB_TYPE != sqlite3
- cleanup.sh: only clear manifest when all actions for host succeeded;
  failed actions are preserved for retry
- phase8_cutover.sh: strip empty environment: block from Caddy
  docker-compose when TLS_MODE=existing
- phase5_migrate_pipelines.sh, phase5_teardown.sh, phase9_teardown.sh:
  wrap cd+git in subshells so working directory is always restored
- phase3_post_check.sh: handle both string and numeric runner status
  from Gitea API (offline vs 2)
- configure_env.sh: fix TOTAL_PROMPTS base count (63->64) and move
  DB/repo count adjustments before their prompts are shown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:21:30 -05:00
S
6f97f5f08f fix: add MIGRATION_POLL vars to validation arrays and wizard
MIGRATION_POLL_INTERVAL_SEC and MIGRATION_POLL_TIMEOUT_SEC were in
.env.example and used by phase4, but missing from validate_env()
arrays and configure_env.sh prompts. Preflight would not catch
invalid values. Now validated as positive_integer and prompted
in the REPOSITORIES section of the wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:55:16 -05:00
S
b573b77ab1 fix: remove unused FEDORA_CADDY_IP from validation and wizard
No phase script deploys Caddy on Fedora — only Unraid gets a Caddy
container. Removed from .env.example, validation arrays, preflight
required vars, IP ping check, wizard prompts, and doc references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:39:15 -05:00
S
16892d633f fix: correct case-sensitive host match in runner capacity defaults
The case statement matched uppercase UNRAID/FEDORA but $r_host is always
lowercase from validate_runner_host(). Unraid and Fedora runners were
silently falling through to the default capacity of 1 instead of 2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:01:50 -05:00
S
d2e5a62510 fix: resolve shellcheck warnings (SC2168, SC2089, SC2090, SC2016, SC2329)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:39:38 -05:00
S
a037f22dcd fix: correct TOTAL_PROMPTS base count to 62 (including TLS conditional slots)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:37:13 -05:00
S
07d2d5ffdd chore: fix stale SSL_MODE comments in configure_env.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:35:07 -05:00
S
e8000a2f4f feat: replace Nginx/SSL prompts with Caddy/TLS prompts in configure_env.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:33:36 -05:00
S
df297334ff feat: replace port prompts with macvlan networking in configure_env.sh
Remove UNRAID_GITEA_PORT, UNRAID_GITEA_SSH_PORT, FEDORA_GITEA_PORT,
FEDORA_GITEA_SSH_PORT prompts. Add DOCKER NETWORKING section with 14
macvlan prompts (parent NIC, subnet, gateway, IP range, container
IPs for gitea/db/caddy on each host). Update TOTAL_PROMPTS to 59.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:26:31 -05:00
S
f098abbe55 feat: add conditional database prompts to configure_env.sh wizard
Add db_type validation case. After GITEA_DB_TYPE prompt, conditionally
show 5 database connection prompts (host, port, name, user, passwd)
when DB type is not sqlite3. Auto-suggest default port per DB type
(mysql=3306, postgres=5432, mssql=1433). Update TOTAL_PROMPTS
dynamically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:18:52 -05:00
S
c68c387091 feat: smart capacity defaults and per-runner data paths in runner wizard
- Capacity defaults: Unraid=2, Fedora=2, macOS=1 (based on host type)
- Data path appends runner name to base path to prevent collisions
- RUNNER_DEFAULT_DATA_PATH → RUNNER_DATA_BASE_PATH
- LOCAL_RUNNER_DATA_PATH → LOCAL_RUNNER_DATA_BASE_PATH

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:11:16 -05:00
S
567f507d05 refactor: update runner var names in configure_env.sh wizard
- Remove RUNNER_DEFAULT_CAPACITY prompt (smart defaults in runner wizard)
- RUNNER_DEFAULT_DATA_PATH → RUNNER_DATA_BASE_PATH
- LOCAL_RUNNER_DATA_PATH → LOCAL_RUNNER_DATA_BASE_PATH
- TOTAL_PROMPTS 53 → 52

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:10:41 -05:00
S
6c193eb4b5 feat: dynamic repo count in configure_env.sh wizard
Replace 3 hardcoded REPO_N_NAME prompts with:
- "How many repos?" prompt
- Loop for each repo name
- Saves as space-delimited REPO_NAMES in .env
TOTAL_PROMPTS computed dynamically after repo count is known.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:08:28 -05:00
S
e564a99937 refactor: use REPO_NAMES in configure_runners.sh
- Update validate_runner_repos() to check against words in REPO_NAMES
- Update repos hint builder to iterate REPO_NAMES

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:06:48 -05:00
S
e9c165e350 fix: update configure_env.sh versions, descriptions, consolidate tokens
- GITEA_VERSION default 1.23 → 1.25, ACT_RUNNER_VERSION 0.2.11 → 0.3.0
- GITHUB_TOKEN description: "repo read" → "repo scope (read+write)"
- BACKUP_STORAGE_PATH description: "Absolute path on Fedora for backup archives"
- Remove GITHUB MIRROR section, move GITHUB_MIRROR_INTERVAL to REPOSITORIES
- TOTAL_PROMPTS 57 → 56

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:01:47 -05:00
S
c90a7a6db6 feat: add unzip installation check for backup/restore scripts on Unraid 2026-03-01 08:59:04 -05:00
S
ba5aa6816b feat: add unzip installation check for backup/restore scripts on Fedora 2026-03-01 08:59:00 -05:00
S
10b155da74 fix: correct total prompts count in configure_env.sh 2026-03-01 08:58:56 -05:00
S
52765a6626 refactor: replace mapfile with compatible loop for reading manifest entries 2026-03-01 08:58:53 -05:00
S
5bdf72063e refactor: replace associative array with Bash 3.2 compatible key-value store for collected runner data 2026-03-01 08:45:13 -05:00
S
a34cc69681 refactor: streamline environment variable loading with dedicated function 2026-03-01 08:40:25 -05:00
S
8896d89078 feat: add boot option to runner configuration output 2026-03-01 08:28:28 -05:00
S
457b9f82db feat: add boot option for native runners configuration 2026-03-01 08:24:38 -05:00
S
66febf69bb Persist configure_runners values incrementally 2026-03-01 08:15:32 -05:00
S
f4a6b04d14 feat: rework runner config to INI format with full field support
Replace pipe-delimited runners.conf with INI-style sections supporting
host resolution, container images, repo-scoped tokens, resource limits,
capacity, and SSH key passthrough. All defaults pulled from .env.

- Add INI parsing helpers (ini_list_sections, ini_get, ini_set) to common.sh
- Add SSH key support (UNRAID_SSH_KEY, FEDORA_SSH_KEY) to ssh_exec/scp_to
- Add .env vars: RUNNER_DEFAULT_IMAGE, RUNNER_DEFAULT_CAPACITY,
  RUNNER_DEFAULT_DATA_PATH, LOCAL_RUNNER_DATA_PATH, LOCAL_REGISTRY
- Rewrite manage_runner.sh with host/image/token resolution and resource limits
- Rewrite configure_runners.sh wizard for INI format with all 9 fields
- Update phase3 scripts to use ini_list_sections instead of pipe parsing
- Add runners.conf INI validation to preflight.sh (check 5b)
- Update templates to use resolved labels, capacity, and deploy resources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:14:46 -05:00
S
fcd966f97d feat: add interactive runners.conf configuration wizard
Replaces manual pipe-delimited file editing with a guided setup
script matching the configure_env.sh UX pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:21:14 -05:00
S
0e0aeda658 feat: extract .env validators to common.sh and add validate_env()
Move 10 validation functions from configure_env.sh to lib/common.sh as
shared utilities. Define variable-to-validator mapping using parallel
arrays (bash 3.2 compatible). validate_env() checks all ~50 .env
variables against their expected format and reports all failures at once.

Wired into preflight.sh (Check 6b) and bitwarden_to_env.sh (post-restore).
configure_env.sh now sources validators from common.sh instead of
defining its own copies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:08:01 -05:00
S
743f1281e6 chore: fix shellcheck findings across migration scripts 2026-02-28 21:39:23 -05:00
S
572e4c151c chore: snapshot current workspace changes 2026-02-28 21:35:03 -05:00
S
316d318b5e feat: add cross-host SSH trust, state-aware teardown, and configurable migration polling
- Add setup/cross_host_ssh.sh to establish ed25519 SSH trust between
  Unraid and Fedora (required by backup/restore scripts for direct SCP)
- Add ssh_key and authorized_key cleanup handlers to setup/cleanup.sh
- Rewrite phase8 cutover to mark GitHub repos as mirrors instead of
  archiving them (archived repos reject push mirror writes), with a
  JSON state snapshot of pre-cutover settings (description, homepage,
  wiki, projects, Pages) for exact restoration on teardown
- Rewrite phase8 teardown to restore from state snapshot with fallback
  to legacy "— was:" description parsing
- Make migration polling configurable via MIGRATION_POLL_INTERVAL_SEC
  and MIGRATION_POLL_TIMEOUT_SEC in .env (was hardcoded 120s/3s)
- Fix preflight SSL validation: check SSL_MODE instead of always
  requiring SSL_EMAIL, add conditional checks per SSL_MODE
- Add preflight checks 23-24: cross-host SSH connectivity
- Add --start-from range validation and cross_host_ssh.sh to run_all.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:50:41 -05:00
S
07d27f7a9c 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>
2026-02-26 19:35:09 -06:00
S
720197bb10 feat: add OS compatibility checks before running platform-specific logic
- lib/common.sh: add require_local_os, require_remote_os, require_remote_pkg_manager
- setup/macbook.sh: require macOS (Darwin)
- setup/unraid.sh: require remote is Linux
- setup/fedora.sh: require remote is Linux + has dnf (RPM-based)
- manage_runner.sh: native runner add/remove requires macOS
- run_all.sh: control plane must be macOS
- preflight.sh: 3 new checks (1: local=macOS, 2: Unraid=Linux, 3: Fedora=Linux+dnf)
- phase5_migrate_pipelines.sh: fix sed -i to be portable (no macOS-only syntax)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:00:13 -06:00
S
5f043cbb45 feat: add setup scripts (configure_env, macbook, unraid, fedora)
- configure_env.sh: interactive 50-prompt wizard with progress [N/50],
  input validation (IP, port, email, path, URL, bool, password, ssl_mode),
  conditional SSL prompts based on SSL_MODE, summary with masked passwords
- macbook.sh: Homebrew packages, envsubst, Xcode CLI tools, SSH tests
- unraid.sh: Docker verify, docker-compose + jq static binary install
- fedora.sh: Docker CE + compose plugin install, jq, docker group setup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:07:34 -06:00