Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Red Hat UBI OpenJDK Image

Informational variables

Table 1. Table Informational variables

Name

Value

Description

AB_JOLOKIA_AUTH_OPENSHIFT

true

Switch on client authentication for OpenShift TLS communication. The value of this parameter can be a relative distinguished name which must be contained in a presented client’s certificate. Enabling this parameter will automatically switch Jolokia into https communication mode. The default CA cert is set to /var/run/secrets/kubernetes.io/serviceaccount/ca.crt.

AB_JOLOKIA_HTTPS

true

Switch on secure communication with https. By default self signed server certificates are generated if no serverCert configuration is given in AB_JOLOKIA_OPTS.

AB_JOLOKIA_PASSWORD_RANDOM

true

Determines if a random AB_JOLOKIA_PASSWORD be generated. Set to true to generate random password. Generated value will be written to /opt/jolokia/etc/jolokia.pw.

AB_PROMETHEUS_JMX_EXPORTER_CONFIG

/opt/jboss/container/prometheus/etc/jmx-exporter-config.yaml

Path to configuration to use for the Prometheus JMX Exporter

HOME

/home/jboss

-

JAVA_DATA_DIR

/deployments/data

^ The location of the directory which should be used by the application for reading/writing application data. Users should override the default if their application should use a different directory, e.g. if a persistent volume is used to persist data across restarts.

JAVA_HOME

/usr/lib/jvm/java-1.8.0

-

JAVA_VENDOR

openjdk

-

JAVA_VERSION

1.8.0

-

JBOSS_CONTAINER_JAVA_JVM_MODULE

/opt/jboss/container/java/jvm

-

JBOSS_CONTAINER_JAVA_PROXY_MODULE

/opt/jboss/container/java/proxy

-

JBOSS_CONTAINER_JAVA_RUN_MODULE

/opt/jboss/container/java/run

-

JBOSS_CONTAINER_JAVA_S2I_MODULE

/opt/jboss/container/java/s2i

-

JBOSS_CONTAINER_JOLOKIA_MODULE

/opt/jboss/container/jolokia

-

JBOSS_CONTAINER_MAVEN_36_MODULE

/opt/jboss/container/maven/36/

-

JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE

/opt/jboss/container/maven/default/

-

JBOSS_CONTAINER_MAVEN_S2I_MODULE

/opt/jboss/container/maven/s2i

-

JBOSS_CONTAINER_OPENJDK_JDK_MODULE

/opt/jboss/container/openjdk/jdk

-

JBOSS_CONTAINER_PROMETHEUS_MODULE

/opt/jboss/container/prometheus

-

JBOSS_CONTAINER_S2I_CORE_MODULE

/opt/jboss/container/s2i/core/

-

JBOSS_CONTAINER_UTIL_LOGGING_MODULE

/opt/jboss/container/util/logging/

-

JOLOKIA_VERSION

1.6.2

Version of Jolokia being used.

MAVEN_VERSION

3.6

-

S2I_SOURCE_DEPLOYMENTS_FILTER

*.jar

-

Configuration variables

Table 2. Table Configuration variables

Name

Example

Description

AB_JOLOKIA_CONFIG

/opt/jolokia/custom.properties

If set uses this file (including path) as Jolokia JVM agent properties (as described in Jolokia’s reference manual). If not set, the /opt/jolokia/etc/jolokia.properties will be created using the settings as defined in the manual. Otherwise the rest of the settings in this document are ignored.

AB_JOLOKIA_DISCOVERY_ENABLED

true

Enable Jolokia discovery. Defaults to false.

AB_JOLOKIA_HOST

127.0.0.1

Host address to bind to. Defaults to 0.0.0.0.

AB_JOLOKIA_ID

openjdk-app-1-xqlsj

Agent ID to use ($HOSTNAME by default, which is the container id).

AB_JOLOKIA_OFF

true

If set disables activation of Joloka (i.e. echos an empty value). By default, Jolokia is enabled.

AB_JOLOKIA_OPTS

backlog=20

Additional options to be appended to the agent configuration. They should be given in the format key=value,key=value,…​.

AB_JOLOKIA_PASSWORD

mypassword

Password for basic authentication. By default authentication is switched off.

AB_JOLOKIA_PORT

5432

Port to listen to. Defaults to 8778.

AB_JOLOKIA_USER

myusername

User for basic authentication. Defaults to jolokia.

AB_PROMETHEUS_ENABLE

True

Enable the use of the Prometheus agent

AB_PROMETHEUS_JMX_EXPORTER_PORT

9799

Port to use for the Prometheus JMX Exporter.

APP_DATADIR

-

Deprecated by S2I_SOURCE_DATA_DIR.

ARTIFACT_DIR

-

Deprecated by MAVEN_S2I_ARTIFACT_DIRS.

CONTAINER_CORE_LIMIT

2

A calculated core limit as described in https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt.

CONTAINER_MAX_MEMORY

1024

Memory limit given to the container.

CUSTOM_INSTALL_DIRECTORIES

-

Deprecated by S2I_IMAGE_SOURCE_MOUNTS.

DATA_DIR

-

Deprecated by S2I_TARGET_DATA_DIR.

DEPLOYMENTS_DIR

-

Deprecated by S2I_TARGET_DEPLOYMENTS_DIR.

GC_ADAPTIVE_SIZE_POLICY_WEIGHT

90

The weighting given to the current GC time versus previous GC times.

GC_CONTAINER_OPTIONS

-XX:+UseG1GC

specify Java GC to use. The value of this variable should contain the necessary JRE command-line options to specify the required GC, which will override the default of -XX:+UseParallelOldGC.

GC_MAX_HEAP_FREE_RATIO

40

Maximum percentage of heap free after GC to avoid shrinking.

GC_MAX_METASPACE_SIZE

100

The maximum metaspace size.

GC_METASPACE_SIZE

20

The initial metaspace size.

GC_MIN_HEAP_FREE_RATIO

20

Minimum percentage of heap free after GC to avoid expansion.

GC_TIME_RATIO

4

Specifies the ratio of the time spent outside the garbage collection (for example, the time spent for application execution) to the time spent in the garbage collection.

HTTPS_PROXY

myuser@127.0.0.1:8080

The location of the https proxy. This takes precedence over http_proxy and HTTP_PROXY, and will be used for both Maven builds and Java runtime.

HTTP_PROXY

127.0.0.1:8080

The location of the http proxy. This will be used for both Maven builds and Java runtime.

JAVA_APP_DIR

myapplication/

^ The directory where the application resides. All paths in your application are relative to this directory.

JAVA_ARGS

-

Arguments passed to the java application.

JAVA_CLASSPATH

-

^ The classpath to use. If not given, the startup script checks for a file JAVA_APP_DIR/classpath and use its content literally as classpath. If this file doesn’t exists all jars in the app dir are added (classes:JAVA_APP_DIR/*).

JAVA_DEBUG

true

If set remote debugging will be switched on. Disabled by default.

JAVA_DEBUG_PORT

8787

Port used for remote debugging. Defaults to 5005.

JAVA_DIAGNOSTICS

true

Set this to get some diagnostics information to standard output when things are happening. Disabled by default.

JAVA_INITIAL_MEM_RATIO

25

Is used when no -Xms option is given in JAVA_OPTS. This is used to calculate a default initial heap memory based on the maximum heap memory. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then -Xms is set to a ratio of the -Xmx memory as set here. The default is 25 which means 25% of the -Xmx is used as the initial heap size. You can skip this mechanism by setting this value to 0 in which case no -Xms option is added.

JAVA_LIB_DIR

-

^ Directory holding the Java jar files as well an optional classpath file which holds the classpath. Either as a single line classpath (colon separated) or with jar files listed line-by-line. If not set JAVA_LIB_DIR is the same as JAVA_APP_DIR.

JAVA_MAIN_CLASS

com.example.MainClass

^ A main class to use as argument for java. When this environment variable is given, all jar files in JAVA_APP_DIR are added to the classpath as well as JAVA_LIB_DIR.

JAVA_MAX_INITIAL_MEM

4096

Is used when no -Xms option is given in JAVA_OPTS. This is used to calculate the maximum value of the initial heap memory. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then -Xms is limited to the value set here. The default is 4096Mb which means the calculated value of -Xms never will be greater than 4096Mb. The value of this variable is expressed in MB.

JAVA_MAX_MEM_RATIO

-

Is used when no -Xmx option is given in JAVA_OPTS. This is used to calculate a default maximal heap memory based on a containers restriction. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then -Xmx is set to a ratio of the container available memory as set here. The default is 50 which means 50% of the available memory is used as an upper boundary. You can skip this mechanism by setting this value to 0 in which case no -Xmx option is added.

JAVA_OPTIONS

-verbose:class

JVM options passed to the java command. Use JAVA_OPTS.

JAVA_OPTS

-verbose:class

JVM options passed to the java command.

JAVA_OPTS_APPEND

-Dsome.property=foo

User specified Java options to be appended to generated options in JAVA_OPTS.

LOGGING_SCRIPT_DEBUG

True

Set to true to enable script debugging. Deprecates SCRIPT_DEBUG.

MAVEN_ARGS

-e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga package

Arguments to use when calling Maven, replacing the default package hawt-app:build -DskipTests -e. Please be sure to run the hawt-app:build goal (when not already bound to the package execution phase), otherwise the startup scripts won’t work.

MAVEN_ARGS_APPEND

-X -am -pl

Additional Maven arguments.

MAVEN_CLEAR_REPO

-

If set then the Maven repository is removed after the artifact is built. This is useful for keeping the created application image small, but prevents incremental builds. Will be overridden by S2I_ENABLE_INCREMENTAL_BUILDS. Defaults to false.

MAVEN_LOCAL_REPO

/home/jboss/.m2/repository

Directory to use as the local Maven repository.

MAVEN_MIRRORS

dev-one,qe-two

If set, multi-mirror support is enabled, and other MAVEN_MIRROR_* variables will be prefixed. For example: DEV_ONE_MAVEN_MIRROR_URL and QE_TWO_MAVEN_MIRROR_URL

MAVEN_MIRROR_URL

http://10.0.0.1:8080/repository/internal/

The base URL of a mirror used for retrieving artifacts.

MAVEN_REPOS

dev-one,qe-two

If set, multi-repo support is enabled, and other MAVEN_REPO_* variables will be prefixed. For example: DEV_ONE_MAVEN_REPO_URL and QE_TWO_MAVEN_REPO_URL

MAVEN_REPO_LOCAL

/home/jboss/.m2

^ DEPRECATED, use MAVEN_LOCAL_REPO Directory to use as the local Maven repository.

MAVEN_S2I_ARTIFACT_DIRS

target

Relative paths of source directories to scan for build output, which will be copied to $DEPLOY_DIR. Defaults to target

MAVEN_S2I_GOALS

package install

Space separated list of goals to be executed with maven build, e.g. mvn $MAVEN_S2I_GOALS. Defaults to package

MAVEN_SETTINGS_XML

/home/jboss/.m2/settings.xml

Location of custom Maven settings.xml file to use.

NO_PROXY

foo.example.com,bar.example.com

A comma separated lists of hosts, IP addresses or domains that can be accessed directly. This will be used for both Maven builds and Java runtime.

S2I_ARTIFACTS_DIR

${S2I_DESTINATION_DIR}/artifacts}

^ Location mount for artifacts persisted with save-artifacts script, which are used with incremental builds. This should not be overridden by end users.

S2I_DESTINATION_DIR

/tmp

^ Root directory for S2I mount, as specified by the io.openshift.s2i.destination label. This should not be overridden by end users.

S2I_ENABLE_INCREMENTAL_BUILDS

true

^ Do not remove source and intermediate build files so they can be saved for use with future builds. Defaults to true.

S2I_IMAGE_SOURCE_MOUNTS

extras/*

^ Comma separated list of relative paths in source directory which should be included in the image. List may include wildcards, which are expanded using find. By default, the contents of mounted directories are processed similarly to source folders, where the contents of $S2I_SOURCE_CONFIGURATION_DIR, $S2I_SOURCE_DATA_DIR, and $S2I_SOURCE_DEPLOYMENTS_DIR are copied to their respective target directories. Alternatively, if an install.sh file is located in the root of the mount point, it is executed instead. Deprecates CUSTOM_INSTALL_DIRECTORIES.

S2I_SOURCE_CONFIGURATION_DIR

configuration

^ Relative path to directory containing application configuration files to be copied over to the product configuration directory, see S2I_TARGET_CONFIGURATION_DIR. Defaults to configuration.

S2I_SOURCE_DATA_DIR

data

^ Relative path to directory containing application data files to be copied over to the product data directory, see S2I_TARGET_DATA_DIR. Defaults to data.

S2I_SOURCE_DEPLOYMENTS_DIR

deployments

^ Relative path to directory containing binary files to be copied over to the product deployment directory, see S2I_TARGET_DEPLOYMENTS_DIR. Defaults to deployments.

S2I_SOURCE_DIR

${S2I_DESTINATION_DIR}/src}

^ Location of mount for source code to be built. This should not be overridden by end users.

S2I_TARGET_CONFIGURATION_DIR

/opt/eap/standalone/configuration

^ Absolute path to which files located in $S2I_SOURCE_DIR/$S2I_SOURCE_CONFIGURATION_DIR are copied.

S2I_TARGET_DATA_DIR

/opt/eap/standalone/data

^ Absolute path to which files located in $S2I_SOURCE_DIR/$S2I_SOURCE_DATA_DIR are copied.

S2I_TARGET_DEPLOYMENTS_DIR

/deployments

^ Absolute path to which files located in $S2I_SOURCE_DIR/$S2I_SOURCE_DEPLOYMENTS_DIR are copied. Additionally, this is the directory to which build output is copied

http_proxy

http://127.0.0.1:8080

The location of the http proxy. This takes precedence over HTTP_PROXY and will be used for both Maven builds and Java runtime.

https_proxy

myuser:mypass@127.0.0.1:8080

The location of the https proxy. This takes precedence over HTTPS_PROXY, http_proxy, and HTTP_PROXY, and will be used for both Maven builds and Java runtime.

no_proxy

*.example.com

A comma separated lists of hosts, IP addresses or domains that can be accessed directly. This takes precedence over NO_PROXY and will be used for both Maven builds and Java runtime.

prefix_MAVEN_MIRROR_ID

internal-mirror

ID to be used for the specified mirror. If ommitted, a unique ID will be generated.

prefix_MAVEN_MIRROR_OF

-

Repository IDs mirrored by this entry. Defaults to external:*

prefix_MAVEN_MIRROR_URL

http://10.0.0.1:8080/repository/internal

The URL of the mirror.

prefix_MAVEN_REPO_DIRECTORY_PERMISSIONS

775

Maven repository directory permissions

prefix_MAVEN_REPO_FILE_PERMISSIONS

664

Maven repository file permissions

prefix_MAVEN_REPO_HOST

repo.example.com

Maven repository host (if not using fully defined url; will fallback to service)

prefix_MAVEN_REPO_ID

my-repo-id

Maven repository id

prefix_MAVEN_REPO_LAYOUT

default

Maven repository layout

prefix_MAVEN_REPO_NAME

my-repo-name

Maven repository name

prefix_MAVEN_REPO_PASSPHRASE

maven1!

Maven repository passphrase

prefix_MAVEN_REPO_PASSWORD

maven1!

Maven repository password

prefix_MAVEN_REPO_PATH

/maven2/

Maven repository path (if not using fully defined url; will fallback to service)

prefix_MAVEN_REPO_PORT

8080

Maven repository port (if not using fully defined url; will fallback to service)

prefix_MAVEN_REPO_PRIVATE_KEY

${user.home}/.ssh/id_dsa

Maven repository private key

prefix_MAVEN_REPO_PROTOCOL

http

Maven repository protocol (if not using fully defined url; will fallback to service)

prefix_MAVEN_REPO_RELEASES_CHECKSUM_POLICY

warn

Maven repository releases checksum policy

prefix_MAVEN_REPO_RELEASES_ENABLED

true

Maven repository releases enabled

prefix_MAVEN_REPO_RELEASES_UPDATE_POLICY

always

Maven repository releases update policy

prefix_MAVEN_REPO_SERVICE

buscentr-myapp

Maven repository service to lookup if prefix_MAVEN_REPO_URL not specified

prefix_MAVEN_REPO_SNAPSHOTS_CHECKSUM_POLICY

warn

Maven repository snapshots checksum policy

prefix_MAVEN_REPO_SNAPSHOTS_ENABLED

true

Maven repository snapshots enabled

prefix_MAVEN_REPO_SNAPSHOTS_UPDATE_POLICY

always

Maven repository snapshots update policy

prefix_MAVEN_REPO_URL

http://repo.example.com:8080/maven2/

Maven repository url (fully defined)

prefix_MAVEN_REPO_USERNAME

mavenUser

Maven repository username

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment