Environment Variables
Environment variables are used to manage a number of runtime behaviors which cannot be changed once the runtime is live. These variables can be set for native installations or in the Dockerfile for Docker installations.
Variables
The possible environment variables are:
- MASTER_KEY: The master key for the ecosystem.Ai instance.
- LOGGING_LEVEL_ROOT: The level of logs that the runtime should produce. Valid values are OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL. The default value is INFO.
- NO_MONGODB: Boolean variable indicating whether the runtime should start itβs own MongoDB instance or if an external MongoDB instance will be used.
- MONITORING_DELAY: The time period in seconds between updates of the options store when the runtime is configured to use the Ecosystem Rewards Dynamic Interaction algorithm.
- PORT: The port exposed by the runtime.
- TZ: The time zone that the runtime uses.
- ECOSYSTEM_PROP_FILE: The location of the ecosystem.Ai properties file in the the runtime file structure.
- CASSANDRA_CONFIG: The location of the Cassandra config file in the runtime file structure.
- CLI_SETTINGS: Command line options to be added to the runtime at startup.
- ECOSYSTEM_XMX: The amount of memory allocated to the runtime. This translated into the -Xmx option for the JVM.
To be supported in the future:
- FEATURE_DELAY: The time period in seconds between updates of the real time features.
Docker Startup Example
Variables can be set in the Docker run command like so:
docker run --rm -d -p 8091:8091 --env MASTER_KEY=<from ecosystem.Ai> --env LOGGING_LEVEL_ROOT=ERROR ecosystemai/ecosystem-runtime-solo
IntelliJ Run Configuration Example
Environment variables can be set in the run configuration in IntelliJ IDEA. This is done by adding the variables to the Environment Variables section of the run configuration.
OpenShift Deployment Example
Environment variables can be set in the OpenShift deployment configuration yaml file as shown below.
kind: Deployment
apiVersion: apps/v1
metadata:
...
spec:
replicas: 1
selector:
...
template:
metadata:
...
spec:
containers:
- name: ecosystem-runtime
env:
- name: NO_MONGODB
value: 'true'
- name: ECOSYSTEM_PROP_FILE
value: /config/ecosystem.properties
Security
If the runtime engine is started with --security
in CLI_SETTINGS then two additional variables can be set to define defaults:
- SPRING_SECURITY_USER_NAME: The default username for the runtime.
- SPRING_SECURITY_USER_PASSWORD: The default password for the runtime.
On restart of the runtime access is only allowed by the username and password set in these variables. The runtime will not allow access if access credentials are not set.