Wadm Configuration
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
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:
nats kv add wadm_manifests --history=1 --replicas=3 --storage=file
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:
Option | Environment Variable | Description | Default Value |
---|---|---|---|
-l , --structured-logging | WADM_STRUCTURED_LOGGING | Whether or not to use structured log output (as JSON) | false |
-t , --tracing | WADM_TRACING_ENABLED | Whether or not to enable opentelemetry tracing | false |
-e , --tracing-endpoint | WADM_TRACING_ENDPOINT | The endpoint to use for tracing. Setting this flag enables tracing, even if --tracing is set to false. | http://localhost:55681/v1/traces |
-d | WADM_JETSTREAM_DOMAIN | The NATS JetStream domain to connect to | None |
-s , --nats-server | WADM_NATS_SERVER | The URL of the remote nats server you want to connect to | 127.0.0.1:4222 |
--nats-seed | WADM_NATS_NKEY | Use the specified nkey file or seed literal for authentication. Must be used in conjunction with --nats-jwt | None |
--nats-jwt | WADM_NATS_JWT | Use the specified jwt file or literal for authentication. Must be used in conjunction with --nats-seed | None |
--nats-creds-file | WADM_NATS_CREDS_FILE | (Optional) NATS credential file to use when authenticating. If --nats-creds-file is set, --nats-seed and --nats-jwt cannot be used | None |
--state-bucket-name | WADM_STATE_BUCKET_NAME | Name of the bucket used for storage of lattice state | wadm_state |
--manifest-bucket-name | WADM_MANIFEST_BUCKET_NAME | Name of the bucket used for storage of manifests | wadm_manifests |
--cleanup-interval | WADM_CLEANUP_INTERVAL | The 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 interval | 120 |
-j , --max-jobs | WADM_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 performance | 256 |
-i , --host-id | WADM_HOST_ID | The ID for this wadm process. This is used to help with debugging when identifying which process is doing the work | Random UUIDv4 |
--api-prefix | WADM_API_PREFIX | The API topic prefix to use. This is an advanced setting that should only be used if you know what you are doing | wadm |
--multitenant | WADM_MULTITENANT | Whether or not to enable multitenancy. This is for advanced use cases with segmented NATS account traffic | false |