一键导入
ops
Run tests, check logs, and troubleshoot Auth9 services in Docker and Kubernetes environments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run tests, check logs, and troubleshoot Auth9 services in Docker and Kubernetes environments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ops |
| description | Run tests, check logs, and troubleshoot Auth9 services in Docker and Kubernetes environments. |
Run tests, check logs, and troubleshoot Auth9 services.
Use this when:
# Unit tests (fast, no external dependencies)
cd auth9-core && cargo test --lib
# Integration tests (requires Docker for testcontainers)
cd auth9-core && cargo test --test '*'
# All tests
cd auth9-core && cargo test
# Test with output
cd auth9-core && cargo test -- --nocapture
# Coverage report (use llvm-cov, not tarpaulin)
cd auth9-core && cargo llvm-cov --html
# Unit tests (Vitest)
cd auth9-portal && npm run test
# Watch mode
cd auth9-portal && npm run test -- --watch
# E2E tests (Playwright, requires running services)
cd auth9-portal && npx playwright test
# Linting
cd auth9-portal && npm run lint
# Type checking
cd auth9-portal && npm run typecheck
| 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 |
# View logs (follow mode)
docker logs -f auth9-core
docker logs -f auth9-portal
# View last N lines
docker logs --tail 100 auth9-core
# View logs with timestamps
docker logs -t auth9-core
# View logs since time
docker logs --since 10m auth9-core
# All services via docker-compose
docker-compose logs -f
docker-compose logs -f auth9-core auth9-portal
# Check service health
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
# Restart service
docker-compose restart auth9-core
# View error logs only (Rust backend)
docker logs auth9-core 2>&1 | grep -E "(ERROR|WARN|panic)"
# Database connection issues
docker logs auth9-tidb 2>&1 | tail -50
# Redis issues
docker exec auth9-redis redis-cli ping
auth9auth9-core, auth9-portalapp.kubernetes.io/name=auth9-core, app.kubernetes.io/name=auth9-portal# Set default namespace
kubectl config set-context --current --namespace=auth9
# View pods
kubectl get pods -n auth9
kubectl get pods -n auth9 -l app.kubernetes.io/name=auth9-core
# Follow logs
kubectl logs -f deployment/auth9-core -n auth9
kubectl logs -f deployment/auth9-portal -n auth9
# Logs from all pods of a deployment
kubectl logs -f -l app.kubernetes.io/name=auth9-core -n auth9
# Last N lines
kubectl logs --tail=100 deployment/auth9-core -n auth9
# Logs since time
kubectl logs --since=10m deployment/auth9-core -n auth9
# Previous container logs (after crash)
kubectl logs -p deployment/auth9-core -n auth9
# Check pod status
kubectl get pods -n auth9 -o wide
# Describe pod for events/errors
kubectl describe pod -l app.kubernetes.io/name=auth9-core -n auth9
# Check resource usage
kubectl top pods -n auth9
# Check HPA status
kubectl get hpa -n auth9
# View recent events
kubectl get events -n auth9 --sort-by='.lastTimestamp' | tail -20
# Exec into pod for debugging
kubectl exec -it deployment/auth9-core -n auth9 -- /bin/sh
# Specific container in multi-container pod
kubectl logs -f deployment/auth9-core -c auth9-core -n auth9
# All containers
kubectl logs -f deployment/auth9-core --all-containers -n auth9
| 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 |
Run E2E tests for Auth9 portal using Playwright with hybrid testing strategy.
Run performance benchmarks for auth9-core API using hey load testing tool.
Execute scenario-based QA testing with browser automation, database validation, and automatic ticket creation for failures.
Reset Auth9 local Docker development environment to a clean state.
Rust coding conventions and patterns for auth9-core development.
Run tests and check coverage for Auth9 backend, frontend, and SDK with mock-based testing patterns.