Sandbox API

Operations

Deploy topology, secrets, env vars, warm pool, and verify gates for desktop pods and VMs.

Desktop traffic spans GKE pods (Linux) and an AWS desktop VPC (Windows VM via Guacamole + EC2 Mac). Trainers only talk to the gateway; sandboxes pods reach private streamers over VPN / PrivateLink.

ProfileWhere it runsNotes
desktop-ubuntuGKE sandbox-jobs podsWarm pool; recycle after image push
desktop-windowsEC2 VM + GuacamoleSANDBOX_VM_DESKTOP_VIEWER_HOST from sandboxes
desktop-macosExternal Mac (aws-ec2-mac)Stream only reachable from sandboxes pods

Public internet exposure of RDP / VNC / Mac streams without the sandboxes token proxy is not supported.

Image deploy (Linux)

  1. Build sandbox-desktop-ubuntu with TigerVNC -BlacklistThreshold 0 in supervisord.
  2. Push to the env registry; CD updates the deployment.
  3. Recycle warm pool: delete stale warm pods in sandbox-jobs.
  4. Run scripts/verify-viewer-dev.sh.

Secrets

SecretProfiles
Viewer signing keyall desktop
sandbox-desktop-awsdesktop-macos (secret_ref)
EC2 / Guacamole DB credentialsdesktop-windows

GSM → ESO wiring: in-repo docs/sandbox/SECRETS.md.

Env parity

New env vars must appear in payload*.json.example, Helm values, and Terraform.

VariablePurpose
SANDBOX_VM_DESKTOP_VIEWER_HOSTGuacamole host for Windows VM backend
SANDBOX_VM_DESKTOP_VIEWER_ENDPOINTAlternate host:port form
SANDBOX_VM_DESKTOP_VIEWER_PORTGuacamole port (default 4822)
SANDBOX_AWS_EC2_MAC_VIEWER_HOSTOverride Mac stream host (dev/smoke)

Verify gate (dev)

make check-sandbox
scripts/verify-viewer-dev.sh
scripts/verify-viewer-windows-dev.sh
scripts/verify-viewer-macos-dev.sh

Set catalog enabled: true for each profile only after its verify script passes. desktop-windows and desktop-macos ship enabled: false until then.

Warm pool

desktop-ubuntu uses SessionWarmPool. After image updates, drain old pods so trainers do not get stale TigerVNC configs.

Cross-cloud networking

Sandboxes pods must reach:

  • Guacamole (Windows) — typically :8080 / configured viewer port
  • EC2 Mac private stream port (macOS)

Document CIDRs and VPN/PrivateLink endpoints in the infra runbooks (turing-agios-infra).