| name | ops |
| description | Run tests, check logs, and troubleshoot Auth9 services in Docker and Kubernetes environments. |
Operations Skill
Run tests, check logs, and troubleshoot Auth9 services.
When to Use
Use this when:
- Running tests (Rust cargo test, TypeScript vitest/playwright)
- Fetching service logs from Docker containers
- Fetching logs from Kubernetes pods
- Debugging services
- Troubleshooting issues
Running Tests
auth9-core (Rust)
cd auth9-core && cargo test --lib
cd auth9-core && cargo test --test '*'
cd auth9-core && cargo test
cd auth9-core && cargo test -- --nocapture
cd auth9-core && cargo llvm-cov --html
auth9-portal (TypeScript)
cd auth9-portal && npm run test
cd auth9-portal && npm run test -- --watch
cd auth9-portal && npx playwright test
cd auth9-portal && npm run lint
cd auth9-portal && npm run typecheck
Docker Logs
Service Container Names
| Service | Container Name |
|---|
| Backend API | auth9-core |
| Frontend | auth9-portal |
| Database | auth9-tidb |
| Cache | auth9-redis |
| Auth Engine | auth9-oidc |
| DB Admin | auth9-adminer |
| Prometheus | auth9-prometheus |
| Grafana | auth9-grafana |
| Loki | auth9-loki |
| Tempo | auth9-tempo |
| Promtail | auth9-promtail |
Common Commands
docker logs -f auth9-core
docker logs -f auth9-portal
docker logs --tail 100 auth9-core
docker logs -t auth9-core
docker logs --since 10m auth9-core
docker-compose logs -f
docker-compose logs -f auth9-core auth9-portal
Troubleshooting Patterns
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
docker-compose restart auth9-core
docker logs auth9-core 2>&1 | grep -E "(ERROR|WARN|panic)"
docker logs auth9-tidb 2>&1 | tail -50
docker exec auth9-redis redis-cli ping
Kubernetes Logs
Cluster Info
- Namespace:
auth9
- Deployments:
auth9-core, auth9-portal
- Labels:
app.kubernetes.io/name=auth9-core, app.kubernetes.io/name=auth9-portal
Common Commands
kubectl config set-context --current --namespace=auth9
kubectl get pods -n auth9
kubectl get pods -n auth9 -l app.kubernetes.io/name=auth9-core
kubectl logs -f deployment/auth9-core -n auth9
kubectl logs -f deployment/auth9-portal -n auth9
kubectl logs -f -l app.kubernetes.io/name=auth9-core -n auth9
kubectl logs --tail=100 deployment/auth9-core -n auth9
kubectl logs --since=10m deployment/auth9-core -n auth9
kubectl logs -p deployment/auth9-core -n auth9
Troubleshooting Patterns
kubectl get pods -n auth9 -o wide
kubectl describe pod -l app.kubernetes.io/name=auth9-core -n auth9
kubectl top pods -n auth9
kubectl get hpa -n auth9
kubectl get events -n auth9 --sort-by='.lastTimestamp' | tail -20
kubectl exec -it deployment/auth9-core -n auth9 -- /bin/sh
Multi-container Scenarios
kubectl logs -f deployment/auth9-core -c auth9-core -n auth9
kubectl logs -f deployment/auth9-core --all-containers -n auth9
Quick Reference
| Task | Docker | Kubernetes |
|---|
| Follow logs | docker logs -f auth9-core | kubectl logs -f deploy/auth9-core -n auth9 |
| Last 100 lines | docker logs --tail 100 auth9-core | kubectl logs --tail=100 deploy/auth9-core -n auth9 |
| Since 10 min | docker logs --since 10m auth9-core | kubectl logs --since=10m deploy/auth9-core -n auth9 |
| Restart | docker-compose restart auth9-core | kubectl rollout restart deploy/auth9-core -n auth9 |
| Shell access | docker exec -it auth9-core /bin/sh | kubectl exec -it deploy/auth9-core -n auth9 -- /bin/sh |