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
Owner

Summary

  • Add Transmission BitTorrent daemon to k8s (torrent namespace)
  • Add Kiwix ZIM archive server to k8s (kiwix namespace)
  • NFS storage from sifaka for shared torrent/ZIM data
  • Torrent-sync sidecar in kiwix deployment to manage declarative ZIM list
  • ZIM-watcher CronJob to auto-restart kiwix when new archives appear
  • Remove transmission, transmission_metrics, and kiwix ansible roles from indri
  • Remove svc:kiwix from tailscale_serve defaults

Key Decisions

  • Direct NFS mount for kiwix (no PVC) since it shares storage with transmission
  • Shell wrapper for kiwix-serve command (glob expansion)
  • Accept HTTP 409 as "ready" in torrent sync (transmission session ID mechanism)
  • Completed downloads stored in /downloads/complete/ on sifaka

Deployment and Testing

  • Deployed transmission to k8s
  • Verified transmission web UI at torrent.tail8d86e.ts.net
  • Moved existing ZIM files to complete folder
  • Deployed kiwix to k8s
  • Verified kiwix web UI at kiwix.tail8d86e.ts.net
  • Stopped old services on indri
  • Cleared svc:kiwix from Tailscale serve on indri
  • Updated zk documentation

🤖 Generated with Claude Code

## Summary - Add Transmission BitTorrent daemon to k8s (torrent namespace) - Add Kiwix ZIM archive server to k8s (kiwix namespace) - NFS storage from sifaka for shared torrent/ZIM data - Torrent-sync sidecar in kiwix deployment to manage declarative ZIM list - ZIM-watcher CronJob to auto-restart kiwix when new archives appear - Remove transmission, transmission_metrics, and kiwix ansible roles from indri - Remove svc:kiwix from tailscale_serve defaults ## Key Decisions - Direct NFS mount for kiwix (no PVC) since it shares storage with transmission - Shell wrapper for kiwix-serve command (glob expansion) - Accept HTTP 409 as "ready" in torrent sync (transmission session ID mechanism) - Completed downloads stored in `/downloads/complete/` on sifaka ## Deployment and Testing - [x] Deployed transmission to k8s - [x] Verified transmission web UI at torrent.tail8d86e.ts.net - [x] Moved existing ZIM files to complete folder - [x] Deployed kiwix to k8s - [x] Verified kiwix web UI at kiwix.tail8d86e.ts.net - [x] Stopped old services on indri - [x] Cleared svc:kiwix from Tailscale serve on indri - [x] Updated zk documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Transmission: General-purpose torrent daemon with web UI at torrent.tail8d86e.ts.net
- Kiwix: ZIM archive server at kiwix.tail8d86e.ts.net
- Shared NFS storage from sifaka:/volume1/torrents (no CSI driver needed)
- Declarative ZIM management via ConfigMap synced to transmission
- ZIM watcher CronJob to auto-restart kiwix when new ZIMs appear

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use defaultBackend + tls.hosts instead of rules, matching other working
ingresses in the cluster.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
A PV can only bind to one PVC, so kiwix cannot share a PV with torrent.
Instead, mount NFS directly in the pod spec for kiwix - this is simpler
and works without needing a shared PV/PVC strategy.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The container image has its own entrypoint that conflicts with passing
args directly. Use a shell command to expand the glob properly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
Transmission puts completed downloads in /downloads/complete/, not the
root of the downloads directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Kiwix is now hosted in k8s with its own Tailscale ingress.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ -36,3 +33,1 @@
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)
Author
Owner

we can just drop this note

we can just drop this note
eblume marked this conversation as resolved
@ -6,6 +6,8 @@ tailscale_serve_services:
# NOTE: svc:grafana, svc:pg, svc:feed, svc:pypi removed - now hosted in k8s
# NOTE: svc:k8s is configured by the minikube role (port is dynamic with docker driver)
# NOTE: svc:kiwix removed - now hosted in k8s (see argocd/apps/kiwix.yaml)
Author
Owner

this note and the ones like it above are also unnecessary, just delete them

this note and the ones like it above are also unnecessary, just delete them
eblume marked this conversation as resolved
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eblume merged commit 7ec98210a9 into main 2026-01-21 18:07:41 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!39
No description provided.