Production checklist¶
What to set before varTrack syncs production configuration. Each item says what goes wrong without it.
Services¶
- [ ]
APP_ENV=productionon the gateway. Outside production the gateway does not check webhook signatures or replays, so anyone who can reach it can trigger a sync. Its default istest. - [ ] TLS everywhere. With
APP_ENV=productionthe gateway and the watcher refuse to start without it: the gateway needsGATEWAY_TLS_CERT/GATEWAY_TLS_KEY(inbound) andGRPC_TLS_CERT/GRPC_TLS_KEY(to the orchestrator); the watcher needsTLS_CA_FILE,TLS_CERT_FILEandTLS_KEY_FILE. The orchestrator turns mTLS on (MTLS_ENABLED), but withoutTLS_CERT_FILE/TLS_KEY_FILEit falls back to plain gRPC with only a log line (MTLS_ENABLED=true but no cert available — gRPC falling back to insecure): give it both, andTLS_CA_FILEto verify its clients. - [ ]
INTERNAL_AUTH_SECRETon the gateway, the orchestrator and the watcher (the same value, 32+ characters, preferably from*_FILE). Without it the orchestrator accepts calls from anyone who can reach its HTTP API, gRPC port or admin port, which walks around every check the gateway makes. WithAPP_ENV=productionall three refuse to start without it. See Internal authentication. - [ ] The web UI can reach the permission engine if sign-in is on:
AUTHZ_ADDRon the gateway (TLS fromGATEWAY_TLS_CERT/KEY, signed grants fromINTERNAL_AUTH_SECRET),GATEWAY_AUTHZ_ADDRon the orchestrator, and port5658open to the orchestrator alone. Without it the UI answers503to everyone: it never decides for itself. The admins areui.auth.adminsin the bundle;UI_AUTH_ADMINSis no longer read. See the permission engine. - [ ] Admin ports stay internal. They serve health, metrics, and on the gateway
/debug/pprof/andPOST /admin/opa/reload. The orchestrator's admin listener binds to loopback unlessADMIN_HOSTsays otherwise, and withINTERNAL_AUTH_SECRETset needs an admin grant for everything but the health probes. - [ ]
CORS_ORIGINSon the orchestrator lists the web UI's origin; empty allows none, and a*is ignored in production.
Secrets¶
- [ ] No credentials written in
config.cue. Use{file: …}(a mounted secret) or{ref: …}(Vault) for platform tokens and webhook secrets, datasource passwords and keys, the UI's OAuth client secrets — see Secret value forms. A MongoDB datasource'spasswordand a Vault manager's own credentials take only a plain string: keep the whole file in a secret mount then. - [ ] A webhook
secretper platform. Two platforms of the same type are told apart by the secret that signed a delivery; when they share one, their webhooks are refused as ambiguous. - [ ] Tokens with the least access. A platform's
tokenneeds read access to the config repositories (and the presets); a declared tenant'sschema_repo.tokenread access to its schema repository.
Writing safely¶
- [ ]
forceon production rules for what no tenant or repository may change, e.g.force: {prune: {enabled: false}}or{strict_validation: true}. - [ ] Map every branch you push to. A push to a branch no strategy places is skipped
(nothing to do): there is no
defaultenvironment (Environment resolution). - [ ] Prune with a dry run first. A dry run (the UI's Dry run,
vt sync --dry-run) reports what would be deleted; addprotectionpatterns for keys other tools own. - [ ] MongoDB shape decided. Set
update_strategyexplicitly on each Mongo datasource; changing it later replaces the stored documents. - [ ] SSH host keys checked.
host_key_verification: "strict"with aknown_hosts_fileyou filled, oraccept-newwith a writable one; neveroff. - [ ]
strict_validationwhere a file that fails its schema must not be written.
Scaling and state¶
- [ ] Redis persistent (AOF): it holds the sync ledger prune and drift work from, the locks, and the UI's history.
- [ ] Shared
GIT_CACHE_DIRandSCHEMA_CACHE_DIRfor the API and the workers of a host. - [ ]
gateway_nonce_datasource: production requires it (the gateway does not start without a Redis it can reach), andwatcher_leader_election_datasourcewhen the watcher has more than one replica. See High availability. - [ ]
VARTRACK_ALLOW_DEGRADEDis unset. Each value is a weaker mode (config on environment variables, nocuevalidation, plain TLS, an in-process replay store); the last two are refused in production, and none should be needed. Whatever is on shows underdegradedin/health/readiness. - [ ] Alert on
vartrack_dependency_up == 0and on readinessdegradedbeing non-empty.
Checks¶
- [ ] CI runs
vt validate-configin every config repository and on every tenant'sbundle.json, andvt validateon the config files. - [ ] Alerts on refused webhooks, failing tasks, and a stopped watcher — see Monitoring.
- [ ] The web UI's sign-in (
ui.auth) is set: without it, anyone who reaches the UI sees every rule — see Web UI sign-in.