blumeops/argocd/manifests/devpi/start.sh
Erich Blume 0439fbb704 P5: Migrate devpi to Kubernetes (#34)
## Summary
- Migrate devpi PyPI caching proxy from indri LaunchAgent to Kubernetes
- Custom container image with devpi-server + devpi-web + auto-init
- StatefulSet with 50Gi PVC, Tailscale Ingress at pypi.tail8d86e.ts.net
- Remove devpi from ansible playbooks and update CLAUDE.md with k8s workflow

## Key Changes
- Add CRI-O registry mirror config for registry.tail8d86e.ts.net
- Change ArgoCD apps to manual sync (was auto-sync causing issues)
- 2Gi memory limit for Whoosh indexer (reclaimed after startup)

## Deployment and Testing
- [x] devpi pod healthy in k8s
- [x] pip install through proxy works
- [x] mcquack 1.0.0 uploaded and installable
- [x] Old devpi stopped on indri

## Post-Merge
Reset ArgoCD to main:
```
argocd app set apps --revision main && argocd app sync apps
argocd app set devpi --revision main && argocd app sync devpi
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/34
2026-01-20 14:55:37 -08:00

31 lines
844 B
Bash

#!/bin/bash
set -e
SERVERDIR="${DEVPI_SERVERDIR:-/devpi}"
HOST="${DEVPI_HOST:-0.0.0.0}"
# Note: Can't use DEVPI_PORT - Kubernetes auto-sets it for service discovery
PORT="${DEVPI_LISTEN_PORT:-3141}"
OUTSIDE_URL="${DEVPI_OUTSIDE_URL:-}"
# Check if devpi is initialized
if [ ! -f "$SERVERDIR/.serverversion" ]; then
echo "Initializing devpi server..."
if [ -z "$DEVPI_ROOT_PASSWORD" ]; then
echo "ERROR: DEVPI_ROOT_PASSWORD environment variable must be set for initialization"
exit 1
fi
devpi-init --serverdir "$SERVERDIR" --root-passwd "$DEVPI_ROOT_PASSWORD"
echo "Devpi initialized successfully"
fi
# Build command
CMD="devpi-server --serverdir $SERVERDIR --host $HOST --port $PORT"
if [ -n "$OUTSIDE_URL" ]; then
CMD="$CMD --outside-url $OUTSIDE_URL"
fi
echo "Starting devpi-server..."
exec $CMD