When you initialize a container, you pass the configuration information for the container to the runtime engine. There are different mechanisms for doing this, depending on your runtime environment. For example, for Podman, you can pass command line parameters to the
podman create command to set the container name, port assignments, and so on.
One of the configuration items you can set for the container is its environment variables (for the
docker create and
podman create commands, you use the
-env parameter). You can pass configuration keys to the software event broker by setting corresponding environment variables. Configuration keys are only evaluated upon initial startup of a software event broker container or after a reload to the default configuration.
You can specify broker-specific configuration by passing configuration keys as environment variables. Configuration keys only take effect when the container is booted for the first time, and the database is absent.
To pass a configuration key as an environment variable, set the variable name to the configuration key hierarchy concatenated with the underscore character. For example, to set the value of the
username/<name>/globalaccesslevel configuration key, use the following environment variable:
To set the
username/<name>/password configuration keys to assign the password
admin to the
admin user, add the following lines to the
docker create or
--env 'username_admin_globalaccesslevel=admin' --env 'username_admin_password=admin'
For configuration keys where portions of the key are passed to a container, those portions cannot contain an underscore. For example, configuration keys that contain
<name> as a key (for instance, as in
redundancy/group/node/<name>/connectvia) cannot contain underscore characters in
To learn more about the configuration keys that you can use with the software event broker, see Configuration Keys.
For configuration keys that specify a
<name> value, such as the
redundancy configuration keys, the name must consist only of lowercase letters and numbers.
Before you assign port numbers for configuration keys, consult the Default Configuration for Software Event Brokers regarding the default port assignment for the various software event broker services to help prevent port assignment conflicts.
In addition to configuration keys, there are other environment variables that can be set. These environment variables are processed by the container's operating system. Unlike configuration keys, these environment variables take effect whenever the container is rebooted. In the following example, UMASK and TZ (timezone) environment variables are set using the
--env parameter (for
docker create or
podman create). This configuration will take effect every time the container is restarted.
--env 'TZ=Canada/Eastern' --env 'umask=0022'
The table below lists the available environment variables.
Timezone configuration for the software event broker.
For more information, see Setting the Timezone.
Umask for all files and directories created by the application.