Configure the Runtime
Overview
There are several entry points to configure the Runtime:
-
Using Environment Variables, you can configure the startup parameters of the runtime process.
-
In the Runtime Configuration File, you can configure the services, security, repositories, logging and all advanced runtime parameters.
-
In the Scheduler Configuration File, you can configure the runtime built-in scheduler service.
Environment Variables
Startup Variables
The following optional environment variables may be defined to configure the Runtime startup.
Environment variable | Description |
---|---|
|
Path of the Java Virtual Machine used by the Runtime. This variable is set to the default Java Virtual Machine installed, and may be changed to use a specific JVM version. |
|
Path of directory containing the configuration file. Use this property to store the configuration separately from the Runtime installation. For example, |
|
Space separated list of additional java arguments to use when running the Runtime runnable scripts. |
|
Space separated list of additional java arguments to use when running the Runtime |
With the default configuration, the Semarchy xDI Runtime memory is automatically managed by the JVM. This is recommended and enough in most cases. If you want to force memory settings, use the XDI_RUNTIME_OPTS and XDI_COMMAND_OPTS variables to pass the corresponding Java settings, such as -Xmx , -Xms and -Xss .
|
Environment Variables in Configuration Files
You can use system environment variables in Runtime Configuration File parameters using the following syntax:
${environment.variable:<ENV_VARIABLE_NAME>:<default value>}
In this syntax:
-
<ENV_VARIABLE_NAME>
is the environment variable name -
<default value>
is the fallback value to use if the environment variable is unset.
For example, the following syntax shows a launchSchedulerEngine
parameter taking the value of the XDI_DESIGNER_SCHEDULER_ENABLE
environment variable, but it falls back to a true
value if that environment variable is unset.
<parameter
name="launchSchedulerEngine"
value="${environment.variable:XDI_DESIGNER_SCHEDULER_ENABLE:true}"
/>
You can find examples of configurations customized with
environment variables in the properties/samples/enginesParameters directory.
|
Use this mechanism to configure Runtime entirely using environment variables, such as when running it in Docker containers. |
Java Management Extensions (JMX) Variable
The Java Management Extensions (JMX) is used to monitor Java applications. JMX allows following memory or class usage with external tools such as Visual VM (previously known as JVisualVM).
By default, the Semarchy xDI Runtime disables JMX, which avoids external tools to monitor its resources through this feature.
To enable it:
-
Stop the Semarchy xDI Runtime
-
Edit the
initvariable.bat
(Windows) orinitvariable.sh
(Unix, macOS). -
Remove the variable
-XX:+DisableAttachMechanism
from the variable XDI_RUNTIME_VM_PROPERTIES. -
Start the Semarchy xDI Runtime.
Configuration Files
The runtime uses two main configuration files:
-
engineParameters.xml
contains the runtime configuration -
engineScheduler.properties
contains the built-in scheduler configuration
Both these files are located by default in properties
sub-directory the Runtime installation directory.
For a runtime, you can define the location of the configuration files using the XDI_RUNTIME_PROPERTIES_LOCATION
environment variable.
To facilitate runtime upgrades, it is recommended to copy the properties folder in a folder not located under the runtime installation folder, and set the XDI_RUNTIME_PROPERTIES_LOCATION to point to that folder. With this configuration, overwriting the runtime folder during an upgrade will not lose the configuration.
|
Runtime Configuration File
By default, the Runtime configuration file is located in properties
sub-directory the Runtime installation directory and is named engineParameters.xml
.
Using this file, you can configure:
-
The services that are started, the listening ports, etc.
-
The security, for example, hostname and user/password restrictions, roles, etc.
-
The repositories storing the deliveries
-
The log storage where session logs are stored
Scheduler Configuration File
By default, the Runtime scheduler configuration file is located in properties
sub-directory the Runtime installation directory and is named engineScheduler.properties
.
Using this file, you can configure where the schedules are stored.
Refer to Runtime Scheduler for more information.