Some checks are pending
Build juntekim.com / Push-to-juntekim-to-docker-hub (push) Waiting to run
Build juntekim.com / run-on-k8s (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / build (push) Waiting to run
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Deploy Postgres (PV + PVC + Deployment) (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Apply runtime secrets (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Run DB migrations (Atlas) (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / deploy (push) Blocked by required conditions
Terraform Plan / Terraform Plan (pull_request) Waiting to run
39 lines
1 KiB
Markdown
39 lines
1 KiB
Markdown
# TODO
|
|
|
|
## Databasus — Migrate to Ceph + AWS Backups
|
|
|
|
> Files: `databasus/`
|
|
|
|
### Step 3 — Migrate PVC data (local → ceph)
|
|
```bash
|
|
# Scale down the app
|
|
kubectl scale deployment databasus --replicas=0
|
|
|
|
# Create new ceph PVC
|
|
kubectl apply -f databasus/databasus-storage.yaml
|
|
|
|
# Run migration job (copies /databasus-data from local PV → ceph PVC)
|
|
kubectl apply -f databasus/databasus-migration-job.yaml
|
|
kubectl wait --for=condition=complete job/databasus-migration --timeout=120s
|
|
|
|
# Verify data was copied
|
|
kubectl logs job/databasus-migration
|
|
```
|
|
|
|
### Step 4 — Deploy updated app
|
|
```bash
|
|
kubectl apply -f databasus/databasus-backup-secret.yaml
|
|
kubectl apply -f databasus/databasus.yaml
|
|
```
|
|
|
|
### Step 5 — Cleanup old local resources
|
|
```bash
|
|
kubectl delete pvc databasus-pvc-local
|
|
kubectl delete pv databasus-pv
|
|
kubectl delete job databasus-migration
|
|
```
|
|
|
|
### Step 6 — Verify
|
|
- Check app is running: `kubectl get pods -l app=databasus`
|
|
- Check backup sidecar logs: `kubectl logs -l app=databasus -c backup`
|
|
- Visit https://databasus.juntekim.com
|