Skip to main content
Version: next

Deploy and operate

This section is for platform and operations engineers who install, upgrade and run moca. If you only use moca, start at Get started instead.

Moca has two capabilities, each with its own deployment paths. You can deploy the sandbox service without the harness, and the harness without the sandbox service. The combined profile runs both on one control plane.

Choose a deployment​

DeploymentDeliversLabelRuns onYou need
Docker ComposeHarness (trial)Preview, trial onlyA dev machineDocker or podman's docker CLI with Compose, curl, a model credential
Single VMHarnessPreviewOne Linux VMsystemd 247+, podman with netavark isolate=strict, nft, Node.js 22+, pnpm 9+, a built workspace, root. Verified on Amazon Linux 2023
Kubernetes and OpenShiftHarnessPreview, first target for StableKind 0.24+ or OpenShift (accepted on 4.20.8)A NetworkPolicy-enforcing CNI. Kind also needs Docker, kubectl, jq, openssl and sha256sum or shasum
MicroVM tier (P4)The harness's microVM sandbox tierPreviewA KVM host attached to a VM deployment, or to an in-cluster relay/dev/kvm, cgroups v2, no swap, Firecracker and jailer
Sandbox serviceSandbox servicePreviewA dedicated OpenShift namespace plus KVM hostskubectl with edit rights in the namespace, jq, OpenSSL 1.1.1+, three distinct route hosts, a GitHub OAuth app (device flow)
One control plane for bothHarness and sandbox servicePreviewAn OpenShift namespace of its own, plus KVM hostsEverything the sandbox service needs, a fourth route host, and images pinned by digest. Egress credentials aren't supported here yet

Some deployments are not supported:

  • MicroVMs inside a Kubernetes cluster. The KVM host always stays outside the cluster.
  • MicroVMs or the P6 runtime on macOS or Windows. On a dev machine, use Docker Compose or Kind, which use container sandboxes.
  • The sandbox service on Compose or Kind. Only the OpenShift overlays set the sandbox route profile.

The pieces you are running​

ComponentHarnessSandbox service
Supervisor and warm workers (@moca/supervisor, @moca/server)yescombined only
Control plane (@moca/control-plane), route profile SH_ROUTE_PROFILEharness (the default)sandbox (or combined)
Sandbox relay (@moca/sandbox-relay)yesyes
Redissessionsthe sandbox service's state
Sandbox workers (Go, remote-worker/)container remote-worker (image ghcr.io/rossoctl/moca-remote-worker), or microvm-worker on a KVM hosta host build of microvm-worker on each KVM host (SBX_WORKER_BIN), one worker per template

Default ports for the harness:

PortService
8080Supervisor (data plane)
8081Supervisor admin (/metrics, /healthz, /readyz)
9443Relay attach (sandboxes dial in). The code default is 8443; the shipped templates use 9443
9444Relay SandboxExec (workers)
6379Redis (never published)

Compose publishes the control plane on 8090. The sandbox service is reached through three OpenShift Routes:

  • api: edge TLS;
  • attach: passthrough;
  • exec: passthrough.

After install​