Configure the Runtime

Overview

There are several entry points to configure the Runtime:

Environment Variables

Startup Variables

The following optional environment variables may be defined to configure the Runtime startup.

Environment variable Description

JAVA_HOME

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.

XDI_RUNTIME_PROPERTIES_LOCATION

Path of directory containing the configuration file. Use this property to store the configuration separately from the Runtime installation. For example, /xdi-conf/properties/. This directory is by default the properties sub-directory of the Runtime installation directory.

XDI_RUNTIME_INIT_MEMORY

Initial heap size (RAM allocated) of the Runtime’s Java Virtual Machine. For example, 32m.

XDI_RUNTIME_MAX_MEMORY

Maximum heap size (RAM allocated) of the Runtime’s Java Virtual Machine. For example, 512m.

XDI_RUNTIME_STACK_SIZE

Size limit of each thread in the Runtime’s Java Virtual Machine. For example, 256k.

Environment Variables in Configuration Files

You can also set parameters in the Runtime Configuration File from environment variables 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, with the following syntax, the launchSchedulerEngine parameter will take the value of the XDI_DESIGNER_SCHEDULER_ENABLE environement variable, with a fallback on the 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 the Runtime entirely from environment variables, for example to run it in Docker containers.

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.

You can define for a runtime the location for 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

The Runtime configuration file is located by default in properties sub-directory the Runtime installation directory and is named engineParameters.xml.

Using this file, you can configure:

Scheduler Configuration File

The Runtime scheduler configuration file is located by default in properties sub-directory the Runtime installation directory and is named engineScheduler.properties.

Using this file, you can configure where the schedules are stored.

See Runtime Scheduler for more information.