Full-system deployment orchestration for AcornOps local, VM, Kubernetes platform, and per-cluster agent tracks.
This repository orchestrates full-system deployment for AcornOps across deployment tracks:
- local full-stack development (all components together)
- production-like Docker-on-VM deployment
- per-cluster Kubernetes agent rollout
- central platform Kubernetes deployment
Central platform Kubernetes deployment is documented in kubernetes/README.md.
This repository owns full-system deployment wiring, environment templates, operator runbooks, compatibility metadata, and cross-repo harness checks. Component code coverage is generated in the component repositories; this orchestration repository has no runtime application package to instrument.
Start from docs/index.md for the repo-local knowledge base.
This repository supports human and agent-assisted development. Start coding
agents from this repository root for deployment-only work, and from the
AcornOps workspace cloned from the acornops
repository for changes that touch multiple AcornOps repositories.
Cross-repo deployment contract documentation lives in docs/contracts/README.md. Machine-readable contract data lives in docs/contracts/manifest.json.
Run task contracts:check to verify deployment contract metadata and task platform-contracts when sibling AcornOps repositories are available.
Primary docs:
AGENTS.mdARCHITECTURE.mddocs/index.mddocs/DEVELOPMENT.mddocs/OPERATIONS.mddocs/mcp-oauth.md- Deployment architecture:
docs/deployment-architecture.md - Whole-system architecture:
../docs/system-architecture.md
This repository is the distribution/orchestration layer, not component source code.
It owns:
- compose stacks and profile wiring
- environment templates and deployment scripts
- operator-facing runbooks and compatibility metadata
It does not own application runtime code for:
- management console
- control-plane
- execution-engine
- llm-gateway
- agentk
acornops-deployment/
compose/
vm-prod/
compose.yaml
proxy/
oidc/
local/
compose.source.yaml
env/
local/
.env.example
.env.local # user-created
.env.agent.example
.env.agent # user-created
vm/
.env.example
.env.prod # user-created
.env.agent.example
.env.agent # user-created
k8s/
.env.agent.example
.env.agent # user-created
scripts/
release/
stack-versions.yaml
docs/
kubernetes/
helm/
acornops-platform/
README.md
k8s/
demo-workloads.yaml.tpl
Taskfile.yml
explore.md
Environment files are organized by deployment surface first. Each track owns the settings it needs, including its agent settings.
For full-platform local development and VM deployment, treat this repository's env files as the source of truth. Component repository .env.example files still exist for standalone component development and CI-oriented documentation, but developers should not need to copy or maintain component-local .env files when running the whole platform through acornops-deployment.
Use this when developing AcornOps end-to-end with hot reload and local source mounts.
- compose base:
compose/vm-prod/compose.yaml - local source overlay:
compose/local/compose.source.yaml - default env file:
env/local/.env.local - default agent env file:
env/local/.env.agent - profiles:
local+ one OIDC profile (oidc-dexoroidc-keycloak)
Use this for production/pilot environments running containers directly on VMs.
- compose file:
compose/vm-prod/compose.yaml - default env file:
env/vm/.env.prod - default agent env file:
env/vm/.env.agent - profile:
prod - image-only deployment (no local bind-mount source workflow)
Use this for central platform deployment into Kubernetes. The platform chart deploys the management console, control-plane, execution-engine, and llm-gateway, while keeping Postgres and Redis external.
- chart:
kubernetes/helm/acornops-platform - single-node test values:
kubernetes/helm/acornops-platform/examples/values-k3s-single-node.yaml - single-node k3s + Keycloak values:
kubernetes/helm/acornops-platform/examples/values-k3s-keycloak.yaml - production baseline values:
kubernetes/helm/acornops-platform/examples/values-production.yaml - default platform Secret name:
acornops-platform-secrets - public hosts:
console.acornops.devfor the management console,api.acornops.devfor/api, anddocs.acornops.devfor Mintlify docs
The production baseline runs the management console, control-plane, execution-engine, and llm-gateway with three replicas. Control-plane HA depends on external Redis for agent ownership, cross-pod command routing, run event fanout, and renewed scheduler leases. Agent-backed commands in flight on a restarting owner pod can fail; the agent reconnects and later calls recover through the new owner.
Deployment defaults use OpenAI with gpt-5.5; OpenAI 4.x models are not in the default allow list. Workspace reasoning summaries default to auto when enabled by deployment policy.
Write confirmations for Agent, Workflow, and target write tools are enabled by default in the platform chart through assistantRuntime.writeConfirmationRequired and assistantRuntime.writeConfirmationTimeoutSeconds, which render to ASSISTANT_WRITE_CONFIRMATION_REQUIRED and ASSISTANT_WRITE_CONFIRMATION_TIMEOUT_SECONDS. The production timeout is 900 seconds. The setting is the deployment default; clusters can inherit it or set a per-cluster override in the control plane.
The durable automation runtime is controlled by automation.runtimeMode, automation.canaryWorkspaceIds, and automation.workerIntervalMs. Production starts in off; apply migrations and verify template backfill before progressing through shadow, canary, and on. Load observability/prometheus/alerts/control-plane-automation.rules.yaml into the environment's Prometheus-compatible rule evaluator.
The per-cluster agent rollout remains separate. Agent settings for the Kubernetes track live in env/k8s/.env.agent.
Prerequisites:
- Docker Desktop (or Docker Engine + Compose plugin)
- Task CLI (
task)
Bootstrap the rest with:
task install
task doctortask install bootstraps host tools used by task local-up and creates env/local/.env.local plus env/local/.env.agent from the examples when missing. On macOS, automated command installs use Homebrew. On Linux, task install supports apt-get, dnf, yum, pacman, and zypper for Docker Engine, then installs kubectl and k3d from their official release installers. task doctor validates the full local bring-up contract and exits non-zero when something is still missing.
- Bootstrap local prerequisites:
task install
task doctor- Start the stack:
task local-uplocal-up runs the llm-gateway and control-plane migrations before starting the full stack with deterministic local Kubernetes and Linux VM targets. It creates k3d, starts AgentK and AgentV with local-only development keys, and applies demo workloads by default. The seeded workspace receives the same universal starter automation as every workspace created through normal product flows. Set SEED_DEMO_K3S_WORKLOADS=false to skip the workloads. The VM fixture also advertises an approval-gated, simulated restart_service action for ssh.service; it does not restart a Docker or host process. Set ACORNOPS_VM_MOCK_RESTART_ENABLED=false before task local-up to hide it.
The platform-admin console starts by default against the real local control plane. Omit it when it is not needed with:
task local-up PLATFORM_ADMIN_CONSOLE=falseThe profile enables only the eight-scope platform-admin BFF contract,
requires a browser administrator session, and starts a dedicated local Keycloak
realm without changing the management console's selected OIDC profile. Open
http://127.0.0.1:4173 and sign in with
admin@acornops.local / devpass. Use PLATFORM_ADMIN_CONSOLE=false with
local-ps, local-logs, or local-down when intentionally operating without
the admin profile.
Use task local-up-cluster-fixture when only AgentK should connect. The same Kubernetes and VM records are seeded, but the VM remains offline because the profile does not start AgentV.
task local-up-target-fixtures is the explicit equivalent of the default local startup. IDs and keys can still be overridden in the ignored env/local/.env.agent when testing alternate local registrations.
- Verify:
task local-ps
task local-smoketask local-smoke is intentionally local-only. It connects to the local edge
proxy at http://127.0.0.1:8088 and sends Host headers for
console.acornops.localhost, acornops.localhost, and the direct local service
hosts. It refuses non-local endpoints unless ACORNOPS_SMOKE_ALLOW_NON_LOCAL=true
is set deliberately. It checks the console app shell, same-origin /api
routing, service readiness, authentication, connected-target behavior, and public
API host JWKS routing. It also resets the local repairable demo Deployment to
its misspelled image, drives a read-write assistant run through
get_resource, patch_resource, operator approval, and rollout verification,
then checks the Deployment is healthy when the explicit target fixture profile is active. Set
ACORNOPS_SMOKE_RUN_REMEDIATION=false only when intentionally skipping this
local mutation coverage.
- Stop while preserving data:
task local-down- Full reset to clean base state:
task local-resetNotes:
- default local OIDC profile is Dex (
LOCAL_OIDC_PROFILE=oidc-dex) - switch to Keycloak with
task local-up LOCAL_OIDC_PROFILE=oidc-keycloak - local OIDC test users are
dev@acornops.local / devpassas workspace owner andoperator@acornops.local / devpassas workspace operator - optional Vault profile:
SECRETS_BACKEND=vault task local-up LOCAL_EXTRA_PROFILES=local-vault - local Kubernetes bootstrap defaults to
LOCAL_K3D_CLUSTER_NAME=acornops-demo-cluster - set
LOCAL_K3D_AUTO_CREATE=falseto skip k3d bootstrap and use an existing kubeconfig instead - conversation history retention defaults to 30 days (
CONVERSATION_RETENTION_DAYS) - recent target chat activity warnings default to 5 minutes (
TARGET_CHAT_RECENT_ACTIVITY_WINDOW_SECONDS=300) - AI assistant behavior can be tuned from the deployment env with
ASSISTANT_CONTEXT_MAX_TOKENS,ASSISTANT_BUDGET_CENTS,ASSISTANT_LLM_TEMPERATURE,ASSISTANT_MAX_RUNTIME_MS,ASSISTANT_MAX_STEPS,ASSISTANT_MAX_TOOL_CALLS,ASSISTANT_MAX_DUPLICATE_TOOL_CALLS, andASSISTANT_TOOL_DEFAULT_TIMEOUT_MS; target instructions come from the registered target adapter, workspace Agent instructions come from the run snapshot of the selected Agent, and generated-document retention usesGENERATED_DOCUMENT_RETENTION_DAYS
- Prepare env file:
cp env/vm/.env.example env/vm/.env.prod- Set real values (domains, image tags, secrets, DB credentials, OIDC).
For private PKI, set ADDITIONAL_CA_BUNDLE_SOURCE_PATH to a readable host PEM
bundle. prod-up then enables the additional-CA Compose overlay for the control
plane, execution engine, LLM gateway, and both migration jobs.
Generate service/admin tokens, OIDC/CSRF secrets, and database passwords with openssl rand -base64 32. Generate SECRETS_KEK_BASE64 and WEBHOOK_SECRET_ENCRYPTION_KEY with openssl rand -base64 32; both runtime validators require decoded 32-byte keys. Generate GATEWAY_SIGNING_PRIVATE_KEY_PEM_B64 once and share it across all control-plane replicas. Production services reject placeholders and known development defaults at startup.
Production edge exposure is intentionally narrow: publish MANAGEMENT_CONSOLE_HOST for the browser app and API_HOST for the platform API; keep execution-engine and llm-gateway reachable only on the Docker network. Configure TLS at the edge proxy or in front of it with a load balancer, and firewall the VM so only the public edge ports are reachable from the internet.
VM production readiness gates execution-engine and llm-gateway on /ready; /health is liveness only. Execution-engine requires Redis DB 1 for run-id coordination, event retry, and terminal commit retry, and EXECUTION_GATEWAY_BASE_URL must point at the internal llm-gateway service.
- Deploy:
task prod-upprod-up also runs the llm-gateway and control-plane init jobs before starting services to prevent schema/code drift. During the pre-release phase, schema files may be rewritten directly; reset disposable deployment databases when they were created from older files.
- Verify:
task prod-ps- Stop:
task prod-downThis remains cluster-scoped and independent from central stack lifecycle.
For the current VM deployment track, prepare the AgentV env file:
cp env/vm/.env.agent.example env/vm/.env.agentThis env file is used by task agent-deploy and task agent-remove. For Kubernetes platform deployment, use env/k8s/.env.agent by passing ENV_AGENT=env/k8s/.env.agent.
- Set required values (
ACORNOPS_AGENT_PLATFORM_URL,ACORNOPS_CLUSTER_ID,ACORNOPS_AGENT_KEY). SetACORNOPS_AGENT_WRITE_ENABLED=trueonly for clusters where approved remediation is intended. The deploy task then grantspatchonly for Deployments, StatefulSets, and DaemonSets; read-only installs receive no mutation verbs.
For active-passive agent HA, set K8S_AGENT_REPLICAS above 1 and ACORNOPS_AGENT_LEADER_ELECTION_ENABLED=true. Passive replicas participate in Kubernetes Lease election only; they do not connect to the control plane until elected.
- Deploy/remove:
task agent-deploy
task agent-removeWhen running local profile through edge-proxy:
- Management console:
http://console.acornops.localhost:8088/ - Platform-admin console:
http://127.0.0.1:4173/ - Control plane API (same-origin path):
http://acornops.localhost:8088/api/v1 - Control plane API (direct host):
http://control-plane.acornops.localhost:8088/api/v1 - Control plane Swagger UI:
http://control-plane.acornops.localhost:8088/docs - Execution engine API:
http://execution-engine.acornops.localhost:8088/api/v1 - Execution engine Swagger UI:
http://execution-engine.acornops.localhost:8088/docs - LLM gateway API:
http://llm-gateway.acornops.localhost:8088/api/v1 - LLM gateway Swagger UI:
http://llm-gateway.acornops.localhost:8088/docs - Dex (
LOCAL_OIDC_PROFILE=oidc-dex):http://localhost:5556/dex - Keycloak (
LOCAL_OIDC_PROFILE=oidc-keycloak):http://localhost:8082 - Platform-admin Keycloak realm:
http://localhost:8082/realms/acornops-platform-admin
Production public routes are narrower than local development. The default production DNS layout uses subdomains under acornops.dev:
- Management console:
https://console.acornops.dev/ - Public documentation:
https://docs.acornops.dev/ - Public control-plane API:
https://api.acornops.dev/api/v1 - agentk WebSocket:
wss://api.acornops.dev/api/v1/agent/connect
Mintlify owns docs.acornops.dev; execution-engine and llm-gateway are internal-only in production and should not have public DNS, edge proxy routes, or open firewall rules.
task local-uptask local-downtask local-resettask local-logstask local-pstask local-smoketask installtask doctortask prod-uptask prod-downtask prod-logstask prod-pstask agent-deploytask agent-removetask k8s-chart-checktask release-matrix-checktask validate
Run the deployment checks that match the change:
task contracts:checktask harness:checktask validatetask platform-contractswhen sibling AcornOps repositories are availabletask local-psortask prod-psafter bringing up a stack
Supported stack combinations are documented in:
Use this as the source of truth when choosing image tags for production deployments.
This repository uses structured env paths:
env/local/.env.localenv/local/.env.agentenv/vm/.env.prodenv/vm/.env.agentenv/k8s/.env.agent
The scripts use these paths directly.