P6: Migrate Kiwix and Transmission to Kubernetes #39

Merged
eblume merged 8 commits from feature/p6-kiwix-transmission-take2 into main 2026-01-21 18:07:41 -08:00
2 changed files with 3 additions and 7 deletions
Showing only changes of commit bff899499a - Show all commits

Fix torrent sync readiness check and remove indri transmission/kiwix roles

- Fix sync script to accept HTTP 409 as "ready" (transmission RPC behavior)
- Remove transmission, transmission_metrics, kiwix roles from indri.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Erich Blume 2026-01-21 17:33:56 -08:00

View file

@ -30,12 +30,7 @@
- role: prometheus
tags: prometheus
# NOTE: grafana role removed - now hosted in k8s (see argocd/apps/grafana.yaml)
- role: transmission
tags: transmission
- role: transmission_metrics
tags: transmission_metrics
- role: kiwix
tags: kiwix
# NOTE: transmission, transmission_metrics, kiwix roles removed - now hosted in k8s (see argocd/apps/torrent.yaml, argocd/apps/kiwix.yaml)
- role: borgmatic
tags: borgmatic
- role: borgmatic_metrics

View file

@ -18,10 +18,11 @@ data:
echo "Syncing ZIM torrents to transmission at ${TRANSMISSION_HOST}:${TRANSMISSION_PORT}"
# Wait for transmission to be ready
# Transmission RPC returns 409 on first request (to provide session ID), which is fine
echo "Waiting for Transmission RPC..."
max_attempts=30
attempt=0
until curl -sf "http://${TRANSMISSION_HOST}:${TRANSMISSION_PORT}/transmission/rpc" >/dev/null 2>&1; do
until curl -s -o /dev/null -w "%{http_code}" "http://${TRANSMISSION_HOST}:${TRANSMISSION_PORT}/transmission/rpc" | grep -qE "^(200|409)$"; do
attempt=$((attempt + 1))
if [[ $attempt -ge $max_attempts ]]; then
echo "Transmission not ready after ${max_attempts} attempts, will retry next cycle"