Skip to main content
Version: 1.0 (alpha)

Wadm Configuration

info

These guides are for deploying wadm in production. For local development and testing, simply run wash up. For more information on wadm, see the wadm docs.

Preconfiguring Storage

warning

The following is important to avoid data loss in production!

wadm uses two NATS Key Value buckets for storage: application manifests, and lattice state.

Application manifests

The manifests bucket contains the "source of truth" for wadm applications. If the manifest storage is lost, all knowledge of applications is gone. For production deployments, we highly recommend preconfiguring this bucket with multiple replicas and taking backups regularly.

For example, to configure the manifests bucket with 3 replicas:

bash
nats kv add wadm_manifests --history=1 --replicas=3 --storage=file
info

The default bucket name is wadm_manifests. If you use another name, you will need to set the --manifest-bucket-name flag

Lattice state

If the state bucket is lost, wadm will self-heal and recover state over the next couple of minutes, as hosts report their state via events.

Configuration Options

wadm is configured via command line flags or environment variables. The following configuration options are supported:

OptionEnvironment VariableDescriptionDefault Value
-l, --structured-loggingWADM_STRUCTURED_LOGGINGWhether or not to use structured log output (as JSON)false
-t, --tracingWADM_TRACING_ENABLEDWhether or not to enable opentelemetry tracingfalse
-e, --tracing-endpointWADM_TRACING_ENDPOINTThe endpoint to use for tracing. Setting this flag enables tracing, even if --tracing is set to false.http://localhost:55681/v1/traces
-dWADM_JETSTREAM_DOMAINThe NATS JetStream domain to connect toNone
-s, --nats-serverWADM_NATS_SERVERThe URL of the remote nats server you want to connect to127.0.0.1:4222
--nats-seedWADM_NATS_NKEYUse the specified nkey file or seed literal for authentication. Must be used in conjunction with --nats-jwtNone
--nats-jwtWADM_NATS_JWTUse the specified jwt file or literal for authentication. Must be used in conjunction with --nats-seedNone
--nats-creds-fileWADM_NATS_CREDS_FILE(Optional) NATS credential file to use when authenticating. If --nats-creds-file is set, --nats-seed and --nats-jwt cannot be usedNone
--state-bucket-nameWADM_STATE_BUCKET_NAMEName of the bucket used for storage of lattice statewadm_state
--manifest-bucket-nameWADM_MANIFEST_BUCKET_NAMEName of the bucket used for storage of manifestswadm_manifests
--cleanup-intervalWADM_CLEANUP_INTERVALThe amount of time in seconds to give for hosts to fail to heartbeat and be removed from the store. By default, this is 120s because it is 4x the host heartbeat interval120
-j, --max-jobsWADM_MAX_JOBS(Advanced) Tweak the maximum number of jobs to run for handling events and commands. Be careful how you use this as it can affect performance256
-i, --host-idWADM_HOST_IDThe ID for this wadm process. This is used to help with debugging when identifying which process is doing the workRandom UUIDv4
--api-prefixWADM_API_PREFIXThe API topic prefix to use. This is an advanced setting that should only be used if you know what you are doingwadm
--multitenantWADM_MULTITENANTWhether or not to enable multitenancy. This is for advanced use cases with segmented NATS account trafficfalse