Java Options and Environment Variables¶
The docker image of QIE is the same code base as the regular QIE install. So, to control its behavior and make sure that QIE runs correctly when running in a cluster Qvera introduced several environment variables that are used.
Java Options¶
Because Docker leverages environment variables as the standard method for passing parameters into the application, most parameters are passed into the container using environment variables, however, there are some options used by the JVM. When setting JVM java options, such as max memory and other settings, use the JAVA_OPTIONS environment variable. Each option is separated by a space.
Example:
In the above example, "-Xmx3g" tells the JVM that it can use a maximum of 3G of ram while running.
Available Java Options and Environment Variables¶
A complete list of available java options and environment variables is in the help documentation, under System Administration -> All Java Options, or search for an option by name. It lists each option with its default value and what it controls.
Each option shows the java option -Dqie.someOption=??? parameter, and the environment variable SOME_OPTION that can be used to change the option. Qvera recommends that the environment variables be used to set options for the QIE environment as opposed to the java options. However, some of the options are for the JVM and not QIE so they need to be used in the JAVA_OPTIONS environment variable.
Variables Used in Docker Environments¶
The following variables are the primary variables that need to be set when running in a containerized environment.
| Environment Variable | Description |
|---|---|
JAVA_OPTIONS |
Passes any Java options into the JVM or QIE service. The default value is blank. Set JVM options using the syntax -D{optionName}={optionValue}; separate multiple options with a space. |
QIE_HAENGINE |
By default, QIE cannot run in a clustered environment and this variable is not defined. To run QIE in a clustered environment, set this variable to EnterpriseHAServiceImpl. |
QIE_CONTAINERMODE |
Tells the QIE service that this instance is running in a container. This prevents QIE from executing tasks that would cause problems in a container environment (such as upgrading the QIE engine on the container itself). It also forces all log entries to log to standard out. Generally not needed unless a custom image was built from scratch instead of using the default QIE image on DockerHub or AWS ECR. |
QIE_PROBEPORT |
Used for two purposes. 1) When set, the QIE service responds to simple HTTP-GET calls on this port with HTTP Status 200 if the container is ready to receive messages from a load balancer. Kubernetes uses this to ensure a pod is initialized before putting it into the cluster. 2) When set, the QIE service responds to simple HTTP-GET requests with a query parameter, returning the current environment statistics for the pod or cluster. The two query parameters are: • individualNode (returns data relative to the single node only)• allNodes (returns totals of all nodes running in the cluster)Each call returns the following information in a JSON payload: • instanceId: The instance ID of the instance that processed the HTTP-GET request.• processorThreadCount: The number of threads currently in the processor thread pool. The default is 10 processor threads per node; the count increases based on memory allocation and current backlog.• processorQueueSize: The number of messages in the processor queue waiting for a processor thread to process them to the outbound queue.• processorThroughput: The number of messages processed per second, averaged over the last 10 seconds.• completionThreadCount: The number of threads currently in the completion thread pool. The default is 10 completion threads per node.• completionQueueSize: The number of messages in the completion queue waiting to be marked completed.• completionThroughput: The number of messages completed per second, averaged over the last 10 seconds.• loggerThreadCount: The number of threads currently in the logger thread pool. The default is 2 logger threads per node.• loggerQueueSize: The number of log messages in the log queue waiting to be written to the database.• loggerThroughput: The number of log messages written per second, averaged over the last 10 seconds. |
QIE_JETTYRESOURCEBASE |
Tells QIE where to find the extracted WAR file, a folder where the WAR has already been decompressed and extracted. Skipping the extraction lets the container start quicker. The official QIE images already have the WAR extracted and this value is set by default. Generally not needed unless a custom image was built from scratch instead of using the default QIE image on DockerHub or AWS ECR. |
QIE_LOGTOSTANDARDOUT |
By default, QIE logs all messages to the log files in the QIE home directory's log folder. When running in containers, it is helpful to have all log messages output to standard out as well so external log services can capture them. Generally not needed unless a custom image was built from scratch instead of using the default QIE image on DockerHub or AWS ECR. |