Add CI/CD & Deployment docs to CLAUDE.md and HOWTO.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
43
HOWTO.md
43
HOWTO.md
@@ -253,3 +253,46 @@ docker exec -it cameleer3-server-clickhouse-1 clickhouse-client \
|
||||
--user cameleer --password cameleer_dev -d cameleer3 \
|
||||
-q "SELECT count() FROM route_executions"
|
||||
```
|
||||
|
||||
## Kubernetes Deployment
|
||||
|
||||
The full stack is deployed to k3s via CI/CD on push to `main`. K8s manifests are in `deploy/`.
|
||||
|
||||
### Architecture
|
||||
|
||||
```
|
||||
cameleer namespace:
|
||||
ClickHouse (StatefulSet, 2Gi PVC) ← clickhouse:8123 (ClusterIP)
|
||||
cameleer3-server (Deployment) ← NodePort 30081
|
||||
cameleer3-sample (Deployment) ← NodePort 30080 (from cameleer3 repo)
|
||||
```
|
||||
|
||||
### Access (from your network)
|
||||
|
||||
| Service | URL |
|
||||
|---------|-----|
|
||||
| Server API | `http://192.168.50.86:30081/api/v1/health` |
|
||||
| Swagger UI | `http://192.168.50.86:30081/api/v1/swagger-ui.html` |
|
||||
| Sample App | `http://192.168.50.86:30080/api/orders` |
|
||||
|
||||
### CI/CD Pipeline
|
||||
|
||||
Push to `main` triggers: **build** (Maven, unit tests) → **docker** (buildx cross-compile amd64, push to Gitea registry) → **deploy** (kubectl apply + rolling update).
|
||||
|
||||
Required Gitea org secrets: `REGISTRY_TOKEN`, `KUBECONFIG_BASE64`, `CAMELEER_AUTH_TOKEN`.
|
||||
|
||||
### Manual K8s Commands
|
||||
|
||||
```bash
|
||||
# Check pod status
|
||||
kubectl -n cameleer get pods
|
||||
|
||||
# View server logs
|
||||
kubectl -n cameleer logs -f deploy/cameleer3-server
|
||||
|
||||
# View ClickHouse logs
|
||||
kubectl -n cameleer logs -f statefulset/clickhouse
|
||||
|
||||
# Restart server
|
||||
kubectl -n cameleer rollout restart deployment/cameleer3-server
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user