Commit Graph

261 Commits

Author SHA1 Message Date
S
6e3b4c66d1 feat: add Phase 5 — Migrate Pipelines (GitHub → Gitea Actions)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:25:04 -06:00
S
e2ab5ee108 feat: add Phase 4 — Migrate Repos + Fedora mirrors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:21:50 -06:00
S
6b82752d9e feat: add Phase 3 — Runners + manage_runner.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:20:12 -06:00
S
eaffb97144 feat: add Phase 2 — Gitea on Fedora (backup instance)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:32 -06:00
S
63f708e556 feat: add Phase 1 — Gitea on Unraid
- phase1_gitea_unraid.sh: 9-step deploy (dirs, docker-compose, app.ini,
  container start, wait, admin user, API token, save to .env, create org).
  Every step has idempotency check — running twice changes nothing.
- phase1_post_check.sh: 5 independent verification checks
- phase1_teardown.sh: stop container + optionally remove data, with prompts

Also adds inline comments to lib/common.sh and preflight.sh explaining
WHY decisions were made (SSH flags, API tmpfile pattern, port checks, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:12:02 -06:00
S
da9f56cce9 feat: add preflight validation
16 checks: .env exists, runners.conf exists, 24 required vars non-empty,
SSH to Unraid/Fedora, Docker + docker-compose on both servers, ports free,
DNS resolution, GitHub token valid, GitHub repos exist, Nginx running,
Nginx conf dir writable. Runs ALL checks even if earlier ones fail.
Exits 0 only if all 16 pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:08:37 -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
S
6b0e4de464 feat: add configuration templates
- docker-compose-gitea.yml.tpl: Gitea + SQLite container
- app.ini.tpl: Gitea config (INSTALL_LOCK, Actions enabled, no registration)
- docker-compose-runner.yml.tpl: act_runner Docker container (Linux)
- runner-config.yaml.tpl: act_runner config (capacity=1, timeout=3h)
- com.gitea.runner.plist.tpl: macOS launchd service for native runner
- nginx-gitea.conf.tpl: Nginx reverse proxy with SSL/WebSocket support
- workflows/security-scan.yml.tpl: Semgrep + Trivy + Gitleaks workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:03:54 -06:00
S
f32e200c64 feat: add API contracts
Document all Gitea REST API v1 and GitHub REST API endpoints used across
phases 1-9. Each endpoint includes: method, path, request/response schemas,
status codes, and which script uses it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:02:28 -06:00
S
d2c0730068 feat: add shared library (lib/common.sh)
17 functions: logging (info/warn/error/success/step/phase_header),
env management (load_env/save_env_var/require_vars), SSH wrappers
(ssh_exec/ssh_check/scp_to), API wrappers (gitea_api/gitea_backup_api/
github_api), template rendering, and polling (wait_for_http/wait_for_ssh).

All logs go to stderr, JSON data to stdout. Shellcheck clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:01:28 -06:00
S
e4ed5c5879 init: project structure, .gitignore, .env.example, runners.conf.example
- .gitignore: excludes .env, runners.conf, certs, temp files, editor files
- .env.example: all configuration variables with sections and descriptions
- runners.conf.example: dynamic runner definition format (pipe-delimited)
- PLAN.md: comprehensive implementation plan with DoD for all 18 milestones
- CLAUDE.md: project conventions and instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:59:17 -06:00