Files
poimen-memory/DEPLOYMENT-STATUS.md
T

6.6 KiB

Poimen Memory App — Deployment Status

Current Status: 🟡 Awaiting Docker Image Build

What's Deployed

Component Status Details
Code Committed 196 tests passing, M3.6.1 complete
K8s Manifests Created Deployment, Service, Secrets, Kustomization
Dockerfile Created Multi-stage Rust build (size ~1MB binary)
CI Workflow Created .forgejo/workflows/build.yaml (test → build → push)
ArgoCD App Created poimen-memory-app (auto-sync enabled)
Pod Status 🟡 ImagePullBackOff Waiting for image in registry

Next: Docker Image Build

How Build Works

Push to main
    ↓
Forgejo Actions triggered
    ↓
1. Run tests (cargo test --all)
2. Build Docker image (docker buildx)
3. Push to registry (forgejo.riotpiao.com/rock/poimen-memory:latest)
    ↓
K8s pulls image
    ↓
Pods become Ready

Check Build Status

Option A: Web UI

Option B: Direct Registry Check

# Try to pull image (will fail if not ready)
docker pull forgejo.riotpiao.com/rock/poimen-memory:latest

# Or use curl to check
curl -I https://forgejo.riotpiao.com/v2/rock/poimen-memory/manifests/latest

Option C: Watch ArgoCD

kubectl get application -n argocd poimen-memory-app -w

Once Image is Ready

The deployment is automatically ready. Nothing more to do:

ArgoCD detects new image
    ↓
Updates imagePullPolicy to latest
    ↓
K8s pulls and starts pods
    ↓
Service becomes available on port 8080

Test the Deployment

# Port forward to local
kubectl port-forward -n poimen svc/poimen-memory 8080:80 &

# Health check
curl http://localhost:8080/health

# Query endpoint (example)
curl -X POST http://localhost:8080/query \
  -H "Content-Type: application/yaml" \
  -H "X-API-Key: " \
  -d @queries/poimen.yaml

# Ingest endpoint (example)
curl -X POST http://localhost:8080/ingest \
  -H "Content-Type: application/jsonl" \
  -H "X-API-Key: " \
  --data-binary @fixtures/pi-session-small.jsonl

Deployment Architecture

┌─────────────────────────────────────────┐
│  Forgejo (git.riotpiao.com)            │
│  - poimen-memory repo                  │
│  - .forgejo/workflows/build.yaml       │
└──────────────┬──────────────────────────┘
               │ (on push to main)
               ↓
┌─────────────────────────────────────────┐
│  Forgejo Actions                        │
│  - Test: cargo test --all               │
│  - Build: docker buildx                 │
│  - Push: forgejo.riotpiao.com/...      │
└──────────────┬──────────────────────────┘
               │ (if all pass)
               ↓
┌─────────────────────────────────────────┐
│  Registry (forgejo.riotpiao.com)        │
│  - poimen-memory:latest                 │
└──────────────┬──────────────────────────┘
               │ (ArgoCD pulls)
               ↓
┌─────────────────────────────────────────┐
│  ArgoCD (poimen-memory-app)             │
│  - Watches main branch                  │
│  - Syncs k8s/app/ → poimen ns          │
│  - Auto-prune + selfHeal               │
└──────────────┬──────────────────────────┘
               │ (kubectl apply)
               ↓
┌─────────────────────────────────────────┐
│  K8s Deployment (poimen-memory)         │
│  - 2 replicas                           │
│  - Port 8080 (HTTP)                     │
│  - Database: memory-db-rw.poimen.svc   │
│  - Service: poimen-memory.poimen.svc   │
└─────────────────────────────────────────┘

Files Involved

Source Code:

  • crates/mem-cli/src/main.rs — Binary entrypoint
  • crates/mem-cli/src/http_server.rs — HTTP endpoints
  • crates/mem-core/ — Domain logic
  • crates/mem-llm/ — LLM integration
  • crates/mem-store/ — Database layer
  • crates/mem-ingest/ — Record sources (M3.6.1 DocCorpusSource)

Deployment:

  • Dockerfile — Multi-stage build
  • .dockerignore — Exclude test files
  • .forgejo/workflows/build.yaml — CI pipeline
  • k8s/app/deployment.yaml — Pod spec
  • k8s/app/service.yaml — Service
  • k8s/app/kustomization.yaml — Resource manifest
  • k8s/argocd/memory-app.yaml — ArgoCD Application

Testing:

  • tests/it_*.rs — 196 integration tests
  • fixtures/ — Test data & queries

Troubleshooting

Pods stuck in ImagePullBackOff

# Check if image exists in registry
kubectl describe pod -n poimen <pod-name> | grep -A 5 "Pull"

# If missing, check Forgejo Actions for build failures
# URL: https://git.riotpiao.com/rock/poimen-memory/actions

ArgoCD not syncing

# Check Application status
kubectl describe application -n argocd poimen-memory-app

# Force resync
argocd app sync poimen-memory-app
# or
kubectl patch application poimen-memory-app -n argocd -p '{"spec":{"syncPolicy":{"syncOptions":["Refresh=hard"]}}}'

Service not responding

# Check Service endpoints
kubectl get endpoints -n poimen poimen-memory

# Check logs
kubectl logs -n poimen deployment/poimen-memory --all-containers=true

# Test pod directly
kubectl run -it --rm -n poimen curl --image=curlimages/curl -- \
  http://poimen-memory:8080/health

Summary

Deployment is 100% configured and ready

  • Code committed and tested
  • Docker build pipeline in place
  • K8s manifests created
  • ArgoCD watching and auto-syncing
  • Just waiting for Docker image to build

Next steps:

  1. Monitor Forgejo Actions for build completion
  2. Once image is in registry, pods auto-start
  3. Test via port-forward
  4. Proceed to M3.6.2 (Level-R storage)

ETA: ~5-15 minutes once Forgejo CI processes the job