Configuring Tarmac
Tarmac supports multiple configuration sources such as Environment Variables, JSON files, or using HashiCorp Consul. All of these configuration options can also exist together to provide both static and dynamic configurations.
When using Environment Variables, all configurations are prefixed with APP_
. The list below will show both Environment and Consul/JSON format for configuration.
Environment Variable | Consul/JSON | Type | Description |
---|---|---|---|
When using Consul the consul_keys_prefix
should be the path to a key with a JSON string
as the value. For example, a key of tarmac/config
will have a value of {"from_consul":true}
.
APP_ENABLE_TLS
enable_tls
bool
Enable the HTTPS Listener (default: True
)
APP_LISTEN_ADDR
listen_addr
string
Define the HTTP/HTTPS Listener address (default: 0.0.0.0:8443
)
APP_CONFIG_WATCH_INTERVAL
config_watch_interval
int
Frequency in seconds which Consul configuration will be refreshed (default: 15
)
APP_USE_CONSUL
use_consul
bool
Enable Consul based configuration (default: False
)
APP_CONSUL_ADDR
consul_addr
string
Consul address (i.e. consul.example.com:8500
)
APP_CONSUL_KEYS_PREFIX
consul_keys_prefix
string
Key path for app specific consul configuration
from_consul
bool
Indicator to reflect whether Consul config was loaded
APP_DEBUG
debug
bool
Enable debug logging
APP_TRACE
trace
bool
Enable trace logging
APP_DISABLE_LOGGING
disable_logging
bool
Disable all logging
APP_CERT_FILE
cert_file
string
Certificate File Path (i.e. /some/path/cert.crt
)
APP_KEY_FILE
key_file
string
Key File Path (i.e. /some/path/cert.key
)
APP_CA_FILE
ca_file
string
Certificate Authority Bundle File Path (i.e /some/path/ca.pem
). When defined, enables mutual-TLS authentication
APP_IGNORE_CLIENT_CERT
ignore_client_cert
string
When defined will disable Client Cert validation for m-TLS authentication
APP_WASM_FUNCTION
wasm_function
string
Path and Filename of the WASM Function to execute (Default: /functions/tarmac.wasm
)
APP_WASM_FUNCTION_CONFIG
wasm_function_config
string
Path to Service configuration for multi-function services (Default: /functions/tarmac.json
)
APP_WASM_POOL_SIZE
wasm_pool_size
int
Number of WASM function instances to create (Default: 100
). Only applicable when wasm_function
is used.
APP_ENABLE_PPROF
enable_pprof
bool
Enable PProf Collection HTTP end-points
APP_ENABLE_KVSTORE
enable_kvstore
bool
Enable the KV Store
APP_KVSTORE_TYPE
kvstore_type
string
Select KV Store to use (Options: redis
, cassandra
, boltdb
, in-memory
, internal
)
APP_ENABLE_SQL
enable_sql
bool
Enable the SQL Store
APP_SQL_TYPE
sql_type
string
Select SQL Store to use (Options: postgres
, mysql
)
APP_RUN_MODE
run_mode
string
Select the run mode for Tarmac (Options: daemon
, job
). Default: daemon
. The job
option will cause Tarmac to exit after init functions are executed.
APP_ENABLE_MAINTENANCE_MODE
enable_maintenance_mode
bool
Enable Maintenance Mode. When enabled, Tarmac will return a 503 for requests to /ready
allowing the service to go into "maintenance mode".
Configuring Tarmac with Cassandra
This page contains Cassandra specific configuration to utilize Cassandra with Tarmac.
Tarmac supports multiple configuration sources such as Environment Variables, JSON files, or using HashiCorp Consul. All of these configuration options can also exist together to provide both static and dynamic configurations.
When using Environment Variables, all configurations are prefixed with APP_
. The list below will show both Environment and Consul/JSON format for configuration.
Environment Variable | Consul/JSON | Type | Description |
---|---|---|---|
When using Consul the consul_keys_prefix
should be the path to a key with a JSON string
as the value. For example, a key of tarmac/config
will have a value of {"from_consul":true}
.
Configuring Tarmac with BoltDB
This page contains BoltDB specific configuration to utilize BoltDB with Tarmac.
Tarmac supports multiple configuration sources such as Environment Variables, JSON files, or using HashiCorp Consul. All of these configuration options can also exist together to provide both static and dynamic configurations.
When using Environment Variables, all configurations are prefixed with APP_
. The list below will show both Environment and Consul/JSON format for configuration.
Environment Variable | Consul/JSON | Type | Description |
---|
When using Consul the consul_keys_prefix
should be the path to a key with a JSON string
as the value. For example, a key of tarmac/config
will have a value of {"from_consul":true}
.
Configuring Tarmac with Redis
This page contains Redis specific configuration to utilize Redis with Tarmac.
Tarmac supports multiple configuration sources such as Environment Variables, JSON files, or using HashiCorp Consul. All of these configuration options can also exist together to provide both static and dynamic configurations.
When using Environment Variables, all configurations are prefixed with APP_
. The list below will show both Environment and Consul/JSON format for configuration.
Environment Variable | Consul/JSON | Type | Description |
---|
When using Consul the consul_keys_prefix
should be the path to a key with a JSON string
as the value. For example, a key of tarmac/config
will have a value of {"from_consul":true}
.
APP_CASSANDRA_HOSTS
cassandra_hosts
[]string
Cassandra node addresses
APP_CASSANDRA_PORT
cassandra_port
int
Cassandra node port
APP_CASSANDRA_KEYSPACE
cassandra_keyspace
string
Cassandra Keyspace name
APP_CASSANDRA_CONSISTENCY
cassandra_consistency
string
Desired Consistency (Default: Quorum
)
APP_CASSANDRA_REPL_STRATEGY
cassandra_repl_strategy
string
Replication Strategy for Cluster (Default: SimpleStrategy
)
APP_CASSANDRA_REPLICAS
cassandra_replicas
int
Default number of replicas for data (Default: 1
)
APP_CASSANDRA_USER
cassandra_user
string
Username to authenticate with
APP_CASSANDRA_PASSWORD
cassandra_password
string
Password to authenticate with
APP_CASSANDRA_HOSTNAME_VERIFY
cassandra_hostname_verify
bool
Enable/Disable hostname verification for TLS
|
|
| The full path and filename of the BoltDB file. If the file does not exist, it will be created. |
|
|
| The name of the BoltDB bucket to use. If the bucket does not exist, it will be created. |
|
|
| The permissions to use when creating the BoltDB file. This is an octal value. |
|
|
| The timeout in seconds to wait for BoltDB to open. |
|
|
| Redis server address |
|
|
| Redis Database (default: |
|
|
| Redis password |
|
|
| Redis Sentinel Server Addresses |
|
|
| Redis Sentinel Master Instance Name |
|
|
| Redis Connection Timeout in seconds |
|
|
| Skip hostname verification for TLS |
|
|
| TCP Keepalive Interval in seconds (Default: |
|
|
| Max Active Connections |
|
|
| Read timeout in seconds |
|
|
| Write timeout in seconds |