C2: migrate immich from minikube to ringtail (mikado chain) (#356)
## Summary
C2 Mikado chain to move the entire Immich stack (server, ML, valkey,
postgres) off `minikube-indri` and onto `k3s-ringtail`. Immich is the
largest single tenant on minikube (~1.5 GiB resident) and minikube is
currently memory-saturated (97% RAM, swapping). This is the first
concrete chain in the broader indri-k8s decommission effort.
This PR contains the planning layer only — 7 cards (1 goal + 6
prerequisites). Implementation cycles follow per the Mikado Branch
Invariant.
## Goal end-state
- Immich `server`, `machine-learning`, `valkey` on ringtail.
- ML pod uses ringtail's RTX 4080 (performance win — currently
CPU-only).
- CNPG `immich-pg` (PG17 + VectorChord) runs on ringtail.
- Library still on sifaka NFS — ringtail mounts the same path.
- `photos.ops.eblu.me` reroutes through Caddy → ringtail ingress.
- Minikube `immich` and `immich-pg` are removed.
## Cards
| Card | Depends on |
|---|---|
| `migrate-immich-to-ringtail` (goal) | all six below |
| `cnpg-on-ringtail` | — |
| `immich-pg-on-ringtail` | cnpg-on-ringtail |
| `immich-pg-data-migration` | immich-pg-on-ringtail |
| `sifaka-nfs-from-ringtail` | — |
| `immich-app-on-ringtail` | immich-pg-on-ringtail, sifaka-nfs-from-ringtail |
| `immich-cutover-and-decommission` | immich-pg-data-migration, immich-app-on-ringtail |
## Key constraints
- **No data loss.** Downtime is acceptable; data loss is not. Two
surfaces matter: postgres (ML embeddings, face data — slow to
re-derive) and the library files (don't move, but NFS access from
ringtail must be verified).
- **Migration method:** Option A is a CNPG `externalCluster`
basebackup → promote. Option B is `pg_dump`/`pg_restore` as a
documented fallback. Either way, dry-run against a scratch
cluster first.
- **Why pg moves too** (not cross-cluster): keeping pg on minikube
would block the whole decommission, and Immich is chatty with pg
so tailnet round-trips would hurt.
## Test plan
- [ ] Plan review — does the dependency graph make sense?
- [ ] `mise run docs-mikado migrate-immich-to-ringtail` shows the
chain correctly.
- [ ] Per-card implementation cycles land separately (commit
convention enforced by hook).
Reviewed-on: #356
This commit is contained in:
parent
bc8ceb502b
commit
947e4310c3
32 changed files with 820 additions and 265 deletions
27
argocd/apps/cloudnative-pg-ringtail.yaml
Normal file
27
argocd/apps/cloudnative-pg-ringtail.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# CloudNativePG Operator for ringtail k3s cluster
|
||||
# Deploys the operator only; PostgreSQL clusters are created separately
|
||||
#
|
||||
# Sibling of cloudnative-pg.yaml (minikube). Same mirror, same release,
|
||||
# different destination. Both apps will coexist during the immich
|
||||
# migration; the minikube one is removed at the end of the broader
|
||||
# indri-k8s decommission.
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: cloudnative-pg-ringtail
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/mirrors/cloudnative-pg.git
|
||||
targetRevision: v1.27.1
|
||||
path: releases
|
||||
directory:
|
||||
include: 'cnpg-1.27.1.yaml'
|
||||
destination:
|
||||
server: https://ringtail.tail8d86e.ts.net:6443
|
||||
namespace: cnpg-system
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true # Required for large CRDs that exceed annotation size limit
|
||||
26
argocd/apps/databases-ringtail.yaml
Normal file
26
argocd/apps/databases-ringtail.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Databases on ringtail k3s.
|
||||
#
|
||||
# Today: only immich-pg (CNPG Cluster) + its borgmatic ExternalSecret.
|
||||
# More databases may move here as the indri-k8s decommission proceeds.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - cloudnative-pg-ringtail (operator must exist before the Cluster CR)
|
||||
# - external-secrets-ringtail + 1password-connect-ringtail (for the
|
||||
# immich-pg-borgmatic ExternalSecret to sync)
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: databases-ringtail
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/eblume/blumeops.git
|
||||
targetRevision: main
|
||||
path: argocd/manifests/databases-ringtail
|
||||
destination:
|
||||
server: https://ringtail.tail8d86e.ts.net:6443
|
||||
namespace: databases
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
31
argocd/apps/immich-ringtail.yaml
Normal file
31
argocd/apps/immich-ringtail.yaml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Immich on ringtail k3s.
|
||||
#
|
||||
# Staging deployment; the minikube `immich` app remains in parallel
|
||||
# until cutover. See [[immich-cutover-and-decommission]] for the
|
||||
# routing flip + minikube cleanup.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - cnpg-on-ringtail + databases-ringtail (postgres)
|
||||
# - 1password-connect-ringtail + external-secrets-ringtail (not used
|
||||
# by this app today — immich-db Secret is created manually,
|
||||
# matching the minikube pattern)
|
||||
# - The immich-db Secret in the immich namespace, holding the
|
||||
# password for the `immich` postgres role (copied from the source
|
||||
# immich-pg-app Secret at migration time).
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: immich-ringtail
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/eblume/blumeops.git
|
||||
targetRevision: main
|
||||
path: argocd/manifests/immich-ringtail
|
||||
destination:
|
||||
server: https://ringtail.tail8d86e.ts.net:6443
|
||||
namespace: immich
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# Immich - Self-hosted photo and video management
|
||||
# High-performance Google Photos/iCloud alternative with AI features
|
||||
#
|
||||
# Kustomize manifests in argocd/manifests/immich/
|
||||
# Components: server, machine-learning, valkey (Redis)
|
||||
#
|
||||
# Prerequisites:
|
||||
# 1. Create immich namespace and secrets:
|
||||
# kubectl create namespace immich
|
||||
# kubectl --context=minikube-indri create secret generic immich-db -n immich \
|
||||
# --from-literal=password="$(kubectl --context=minikube-indri -n databases get secret immich-pg-app -o jsonpath='{.data.password}' | base64 -d)"
|
||||
# 2. Create immich-pg database and user (see immich-pg app)
|
||||
# 3. NFS share on sifaka at /volume1/photos with read/write for indri
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: immich
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: ssh://forgejo@forge.ops.eblu.me:2222/eblume/blumeops.git
|
||||
targetRevision: main
|
||||
path: argocd/manifests/immich
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: immich
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
Loading…
Add table
Add a link
Reference in a new issue