Operate production
Deploy outside a release, change the config, or read the span log without breaking a run in flight.
You need:
- The operator directory
init --cloudflare … --zone …wrote (Deploy), orSWITCHBOARD_DEPLOY_PROFILEnaming the profile. CLOUDFLARE_API_TOKENfor the profile's account; noCLOUDFLARE_ACCOUNT_IDin the shell.- For
deploy restartand the span log, an ingress bearer whose subject holdsdeploy:writeortrace:read.
Read what is running
bash
npx @coreplane/switchboard deploy plan --affectedNothing runs: it prints which Workers are stale, why, and each preflight. GET /healthz on the bot is public: build.commit, inFlight, draining, startedAt.
Deploy outside a release
bash
npx @coreplane/switchboard deploy all --affecteddeploy all is the only runner: memory, bot, resident, sandbox, never the four by hand. A refusing preflight is retried every 60 s (--wait-max minutes); --force bypasses it.
| Preflight | Refuses while |
|---|---|
| bot | the container is mid-rollout |
| resident | any resident has work in flight (needs RESIDENT_READ_TOKEN) |
Change the config without a release
bash
npx @coreplane/switchboard deploy config # from the profile's configSource, or --source <path|github://…|op://…>
npx @coreplane/switchboard deploy restart # the running container keeps the config it started withdeploy config refuses an unreadable source, an invalid config, or a missing MEMORY_TOKEN. Secrets are the same two steps: Rotate a secret.
Read the bot's span log
The bot keeps every span end in a ring (20 000 lines or 8 MiB) that empties with the container, so read before you deploy.
bash
# the last 50 GitHub calls; `span` is a name or a family, `limit` 500 by default and 5 000 at most, `since` epoch ms
curl -sS -H "authorization: Bearer $SWITCHBOARD_INGRESS_TOKEN" \
"$SWITCHBOARD_BASE_URL/admin/trace/log?span=github&limit=50"
# everything one run did, from its run_meta.traceId
curl -sS -H "authorization: Bearer $SWITCHBOARD_INGRESS_TOKEN" \
"$SWITCHBOARD_BASE_URL/admin/trace/log?traceId=<32 hex>&limit=5000"For this installation
The project's own production, not OpenSwitchboard:
- Deploys run from CI, which refuses any ref but
main:gh workflow run deploy-production.yml --ref main -f targets=affected(also-f targets=bot,resident;-f force=truebypasses the preflights). - The profile and config live in a private repository named by the variable
SWITCHBOARD_DEPLOY_PROFILE, read with an App token minted asCONFIG_REPO_TOKEN. - CI holds
CLOUDFLARE_DEPLOY_TOKEN,RESIDENT_READ_TOKENandSANDBOX_TOKEN; the docs deploy usesCLOUDFLARE_API_TOKEN.