Deployments

What a deployment is, how it travels from the control plane to a cluster, and how the control plane itself is deployed.

The word deployment has two meanings in Robotelos. This page covers both.

1. A deployment of an agent version

A deployment puts one published agent version into one environment (dev, stg or prod).

A deployment reaches each cluster A deployment is recorded in the control plane database. The fleet agent in each cluster pulls it, applies it to its own data database and reports back. CLUSTER ROBTELOS-NONPROD · DEV, STG CLUSTER ROBTELOS-PROD · PROD Console / CLIdeploy v3 to stg Control planePostgreSQL:desired state,generation, fleet revision Fleet agentpulls, compiles,applies Data DBreleases +active pointer Fleet agentsame, own pool Data DBown copy 1 record 2 pull 2 pull 3 report: each agent sends back the applied generation and whether its pool is ready. The control plane never connects into a cluster. Agents connect out.
A deployment is recorded in the control plane and pulled by each cluster's fleet agent.
  1. Record. The console or the Platform API writes the deployment to the control plane’s PostgreSQL. The deployment gets the next generation number, so two deployments to one environment are always ordered. This record is the desired state.
  2. Pull. The fleet for that environment’s class sees its revision change and the agent pulls a snapshot. The control plane never connects into a cluster.
  3. Apply. The agent compiles the release into the fleet’s own data database. compiled_releases is append-only; serving_releases only moves forward. Pool intent is projected to AgentRuntimePool resources, which the runtime operator turns into a Deployment, Service and autoscaler.
  4. Report. The agent reports the generation it applied and the readiness of each pool. The console’s Management view shows desired state next to this report, so a fleet that is behind or silent is visible.

Environments and fleets

EnvironmentServed byCluster in the local setup
dev, stgthe non-production fleet classrobotelos-nonprod
prodthe production fleet classrobotelos-prod

Promoting a version means deploying it to the next environment. Each fleet converges on its own, with its own data database, so a slow or partitioned production cluster never blocks development.

What is guaranteed

  • Generations are never missing or doubled; the active version is the newest generation (checked under load by make test-load).
  • A fleet that loses the network keeps serving its current release. When the network returns it converges (2.8 s after a 20 s partition in the chaos test).
  • A replacement agent with no cache fetches everything and converges (0.4 s in the chaos test).
The fleet sync loop A committed change notifies the coordinator, which tells the fleet agent over a watch stream. The agent pulls a snapshot, verifies and applies it, then reports what it observed. STEP 1Change committedrevision +1, NOTIFY STEP 2Watch streambookmark to agent STEP 3Agent pullssnapshot, verifies STEP 4Agent appliesrelease + pools STEP 5Observe streamonly changes sent next change Waiting fleets cost the database nothing: one LISTEN connection per coordinator. Fallbacks: long poll and unary reports. Transports: gRPC, WebSocket, HTTP+SSE.
The fleet sync loop: notify, watch, pull, apply and observe.

2. How the control plane is deployed

Robotelos runs as two servers.

Two servers and their roles The control plane server runs the accounts, executions and fleets roles on its own PostgreSQL. The data plane server runs the gateway and engine roles on a data database per fleet. CONTROL PLANE SERVER · RUNTIME/CMD/CONTROLPLANE DATA PLANE SERVER · RUNTIME/CMD/DATAPLANE ROLEaccountsidentity, policy ROLEexecutionsagents, deploys ROLEfleetssync with agents ROLEgatewayclient connections ROLEengineruns executions Control plane PostgreSQLdesired state, revisions, observed status Data database · one per fleetcompiled releases, conversations One binary with roles. Development runs all roles in one process; production runs a Deployment per role from the same image. Split a role only when it scales, trusts, fails or releases differently.
The control plane and data plane servers, with the roles each runs.
ServerRolesHolds
Control plane (runtime/cmd/controlplane)accounts, executions, fleetsDefinitions, versions, deployments, policy, identity, fleet snapshots
Data plane (runtime/cmd/dataplane)gateway, engineClient connections, conversations, execution progress

Both ship as one binary with roles. For development, run every role in one process against one database. In production, run a Kubernetes Deployment per role from the same image, so the gateway scales with open connections and the engine with active executions.

Split a role into its own Deployment only when one of these is true: it scales differently, it holds different credentials, it fails independently, or it releases on its own cadence. Do not split in advance.

The fleets role is the coordinator the fleet agents talk to. Its gRPC port (ROBOTELOS_FLEET_GRPC_ADDR) and its HTTP port for the WebSocket and SSE fallbacks (ROBOTELOS_FLEET_HTTP_ADDR) are separate from the management API, so they can sit behind different network rules. See Transports.

Next steps