Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

This chapter is the complete, audited list of environment variables the framework reads, and where each read happens.

This chapter was produced by auditing the source (grep -rn "env::var" testing-framework/ cfgsync/ --include="*.rs"), not by convention. If a variable is not listed here, the framework does not read it. Re-run the grep after upgrading.


Core (testing-framework-core)

VariablePurposeRead inWhen unset
SLOW_TEST_ENVWhen exactly true, adjust_timeout doubles framework timeouts (slow CI runners)core/src/lib.rsnormal timeouts
LOGOS_BLOCKCHAIN_METRICS_QUERY_URLPrometheus-compatible query endpoint for ObservabilityInputs::from_envcore/src/scenario/observability.rsmetrics queries disabled (Metrics::empty())
LOGOS_BLOCKCHAIN_METRICS_OTLP_INGEST_URLOTLP metrics ingest endpointcore/src/scenario/observability.rsnone
LOGOS_BLOCKCHAIN_GRAFANA_URLGrafana base URL surfaced alongside run outputcore/src/scenario/observability.rsnone

The three LOGOS_BLOCKCHAIN_* names are historical; they are only consulted when telemetry inputs come from the environment rather than from an ObservabilityCapability; see Telemetry and External Observability.


Local Deployer (testing-framework-runner-local)

VariablePurposeRead inWhen unset
TF_KEEP_LOGSPreserve per-node working directories (1/true/yes)deployers/local/src/lib.rs, honored by the orchestrator and ManualClusterdirectories deleted at teardown (unless the deployment policy preserves them)

Two provider types read caller-named variables, where the framework defines the mechanism and the application names the variable:

  • EnvBinaryProvider::new("MY_NODE_BIN") reads that variable as an explicit executable path. Unset or not-a-file counts as unresolved, letting a FallbackBinaryProvider continue to the next provider.
  • DownloadUrl::Env(var) / DownloadChecksum::Env(var) on DownloadBinaryProvider read the download URL and expected SHA-256 from the named variables. A missing URL variable is a hard error (MissingDownloadUrl); a missing checksum variable disables verification.

See Binary Providers.


Compose Deployer (testing-framework-runner-compose)

VariablePurposeRead inWhen unset
COMPOSE_RUNNER_PRESERVESkip docker compose down, keep the workspacelifecycle/cleanup.rsfull teardown
TESTNET_RUNNER_PRESERVEAlias for the abovelifecycle/cleanup.rsfull teardown
COMPOSE_RUNNER_HOSTHost used to reach published container portsinfrastructure/ports.rs127.0.0.1
COMPOSE_RUNNER_HOST_GATEWAYExplicit extra_hosts gateway entry; disable or empty removes itdocker/platform.rsfalls through to DOCKER_HOST_GATEWAY
DOCKER_HOST_GATEWAYGateway IP mapped as host.docker.internal:<ip>docker/platform.rshost.docker.internal:host-gateway
TESTNET_PRINT_ENDPOINTSIf set (any value), print discovered endpoints after deploydeployer/orchestrator.rssilent
REPO_ROOT_OVERRIDE_DIROverride repository-root detection for stack assetsdocker/workspace.rsfalls through to CARGO_WORKSPACE_DIR, then manifest-relative detection
CARGO_WORKSPACE_DIRWorkspace root override (also used by template rendering)docker/workspace.rs, infrastructure/template.rsmanifest-relative detection
REL_ASSETS_STACK_DIRAlternative stack-assets directory (absolute, or relative to repo root)docker/workspace.rsbundled default assets

Per-application image selection is again a mechanism with caller-derived names: BinaryConfigNodeSpec::conventional("/usr/local/bin/kvstore-node", ...) derives the prefix KVSTORE and reads KVSTORE_IMAGE (default kvstore-node:local) and KVSTORE_PLATFORM (descriptor/node.rs).


Kubernetes Deployer (testing-framework-runner-k8s)

VariablePurposeRead inWhen unset
K8S_RUNNER_NODE_HOSTHost used to reach NodePort serviceshost.rsKUBERNETES_SERVICE_HOST, then 127.0.0.1
KUBERNETES_SERVICE_HOSTStandard fallback for the above (e.g. Docker Desktop)host.rs127.0.0.1
K8S_RUNNER_PRESERVESkip Helm uninstall and namespace deletionenv.rsfull teardown
K8S_RUNNER_DEBUGLog Helm install stdout/stderrinfrastructure/helm.rsHelm output suppressed
K8S_RUNNER_DEPLOYMENT_TIMEOUT_SECSDeployment readiness timeout (integer seconds)lifecycle/wait/mod.rsbuilt-in default
K8S_RUNNER_HTTP_TIMEOUT_SECSNode HTTP readiness timeoutlifecycle/wait/mod.rsbuilt-in default
K8S_RUNNER_HTTP_PROBE_TIMEOUT_SECSPer-probe HTTP timeoutlifecycle/wait/mod.rsbuilt-in default
K8S_RUNNER_HTTP_POLL_INTERVAL_SECSReadiness poll intervallifecycle/wait/mod.rsbuilt-in default
TESTNET_PRINT_ENDPOINTSIf set, print Prometheus/Grafana/pprof endpoints after deploydeployer/orchestrator.rssilent

Image selection mirrors compose with a k8s-specific override first: BinaryConfigK8sSpec::conventional reads <PREFIX>_K8S_IMAGE, then <PREFIX>_IMAGE, then the <binary-name>:local default (env.rs). workspace.rs additionally exposes resolve_workspace_root / resolve_optional_relative_dir helpers that read a variable named by the caller.


cfgsync Runtime (cfgsync-runtime)

These are read by the cfgsync client inside node containers at startup, not by your test process; the deployers set them when rendering the stack. See Static Artifacts and cfgsync.

VariablePurposeWhen unset
CFG_SERVER_ADDRcfgsync server URLhttp://127.0.0.1:<default port>
CFG_HOST_IPThis node’s IPv4 address for registration127.0.0.1
CFG_HOST_IDENTIFIERNode identifier for registrationunidentified-node
CFG_REGISTRATION_METADATA_JSONExtra registration payload (JSON)empty payload
CFG_FILE_PATHWhere to write the fetched config.yamlconfig output not routed
CFG_DEPLOYMENT_PATHWhere to write the fetched deployment settingsdeployment output not routed
LOGOS_BLOCKCHAIN_CFGSYNC_PORTDefault server port for the cfgsync-client binary4400

Example-App Variables (Not Framework Variables)

The example applications define their own variables through the mechanisms above. These belong to the examples: KVSTORE_NODE_BIN is defined by the kvstore example’s environment implementation, not by the framework; your application will define its own equivalents. Found by auditing examples/:

VariableExamplePurpose
KVSTORE_NODE_BIN, OPENRAFT_KV_NODE_BINkvstore, openraft_kvoptional binary override (fallback builds with Cargo)
QUEUE_NODE_BIN, PUBSUB_NODE_BIN, METRICS_COUNTER_NODE_BINqueue, pubsub, metrics_counterrequired node binary path for local runs
NATS_SERVER_BINnatspath to an upstream nats-server executable
NATS_IMAGE / NATS_PLATFORMnatscompose image override (default nats:2.10)
REDIS_STREAMS_IMAGE / REDIS_STREAMS_PLATFORMredis_streamscompose image override (default redis:7)
KVSTORE_IMAGE, QUEUE_IMAGE, … (<PREFIX>_IMAGE/<PREFIX>_PLATFORM/<PREFIX>_K8S_IMAGE)all node appsderived image overrides via the conventional specs
METRICS_COUNTER_K8S_PROMETHEUS_NODE_PORTmetrics_counterfixed NodePort for the Prometheus service
LOGOS_BLOCKCHAIN_METRICS_QUERY_URLmetrics_counteralso consulted by the example to locate Prometheus

See Running the Examples for how these fit each binary.