feat: Phase 3 — Runtime Orchestration + Environments #33
Reference in New Issue
Block a user
Delete Branch "feat/phase-3-runtime-orchestration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 3 delivers the core product differentiator: managed Camel runtime. Customers upload a JAR, the platform builds an immutable container image with the cameleer3 agent auto-injected, and deploys it to a logical environment.
POST /deployreturns 202, background thread builds image (~1-3s via pre-built base), starts container with cgroups resource constraints, polls agent health. Status polling viaGET /deployments/{id}.DockerRuntimeOrchestrator(docker-java). K8s implementation deferred to Phase 5.{tenant}-{env}-{app}for human-readabledocker ps.New API endpoints
/api/tenants/{tid}/environments/api/tenants/{tid}/environments/api/tenants/{tid}/environments/{eid}/api/environments/{eid}/apps/api/environments/{eid}/apps/api/environments/{eid}/apps/{aid}/api/environments/{eid}/apps/{aid}/jar/api/apps/{aid}/deploy/api/apps/{aid}/deployments/api/apps/{aid}/deployments/{did}/api/apps/{aid}/stop/api/apps/{aid}/restart/api/apps/{aid}/logsStats
Test plan
Closes #26
🤖 Generated with Claude Code
Implements POST/GET/PATCH/DELETE endpoints at /api/tenants/{tenantId}/environments with DTOs, mapping helpers, and a Spring Boot integration test (TestContainers). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Adds AppController at /api/environments/{environmentId}/apps with POST (multipart metadata+JAR), GET list, GET by ID, PUT jar reupload, and DELETE endpoints. Also adds CreateAppRequest and AppResponse DTOs, integration tests (AppControllerTest), and fixes ClickHouseConfig to be excluded in test profile via @Profile("!test"). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Add DeploymentResponse DTO, DeploymentController at /api/apps/{appId} with POST /deploy (202), GET /deployments, GET /deployments/{id}, POST /stop, POST /restart (202), and integration tests covering empty list, 404, and 401 cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>