Chapter 5. Reference
5.1. Version details
The following table lists versions of technologies used in this image.
Technology | Version |
---|---|
Red Hat build of OpenJDK | 11 |
Jolokia | 1.6.2 |
Maven | 3.6 |
5.2. Information environment variables
The following information environment variables are designed to convey information about the image. Do not modify these variables.
Variable Name | Value |
---|---|
HOME | /home/jboss |
JAVA_HOME | /usr/lib/jvm/java-11 |
JAVA_VENDOR | openjdk |
JAVA_VERSION | 11 |
JOLOKIA_VERSION | 1.6.2 |
LD_PRELOAD | libnss_wrapper.so |
MAVEN_VERSION | 3.6 |
NSS_WRAPPER_GROUP | /etc/group |
NSS_WRAPPER_PASSWD | /home/jboss/passwd |
5.3. Configuration environment variables
Configuration environment variables are designed to conveniently adjust the image without requiring a rebuild, and should be set by the user as desired.
Variable name | Description | Default value | Example value |
---|---|---|---|
AB_JOLOKIA_CONFIG |
If set uses this file (including path) as Jolokia JVM agent properties (as described in the Jolokia reference manual). If not set, the | - | /opt/jolokia/custom.properties |
AB_JOLOKIA_DISCOVERY_ENABLED | Enable Jolokia discovery. | false | true |
AB_JOLOKIA_HOST | Host address to bind to. | 0.0.0.0 | 127.0.0.1 |
AB_JOLOKIA_ID | Agent ID to use, which is the container id. |
| openjdk-app-1-xqlsj |
AB_JOLOKIA_OFF | If set disables activation of Joloka (that is, echos an empty value). | Jolokia is enabled | true |
AB_JOLOKIA_OPTS |
Additional options to be appended to the agent configuration. They should be specified in the format | - | backlog=20 |
AB_JOLOKIA_PASSWORD | Password for basic authentication. By default authentication is switched off. | - | mypassword |
AB_JOLOKIA_PORT | Port to listen to. | 8778 | 5432 |
AB_JOLOKIA_USER | User for basic authentication. | jolokia | myusername |
AB_PROMETHEUS_ENABLE | Enable the use of the Prometheus agent. | - | True |
AB_PROMETHEUS_JMX_EXPORTER_PORT | Port to use for the Prometheus JMX Exporter. | - | 9799 |
CONTAINER_CORE_LIMIT | A calculated core limit as described in the CFS Bandwidth Control. | - | 2 |
CONTAINER_MAX_MEMORY | Memory limit assigned to the container. | - | 1024 |
GC_ADAPTIVE_SIZE_POLICY_WEIGHT | The weighting given to the current garbage collector time versus previous garbage collector times. | - | 90 |
GC_CONTAINER_OPTIONS | 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 value. | -XX:+UseParallelOldGC | -XX:+UseG1GC |
GC_MAX_HEAP_FREE_RATIO | Maximum percentage of heap free after GC to avoid shrinkage. | - | 40 |
GC_MAX_METASPACE_SIZE | The maximum metaspace size. | - | 100 |
GC_METASPACE_SIZE | The initial metaspace size. | - | 20 |
GC_MIN_HEAP_FREE_RATIO | Minimum percentage of heap free after GC to avoid expansion. | - | 20 |
GC_TIME_RATIO | 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. | - | 4 |
HTTPS_PROXY | 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. | - | myuser@127.0.0.1:8080 |
HTTP_PROXY | The location of the HTTP proxy. This will be used for both Maven builds and Java runtime. | - | 127.0.0.1:8080 |
JAVA_APP_DIR | The directory where the application resides. All paths in your application are relative to this directory. | - | myapplication/ |
JAVA_ARGS |
Arguments passed to the | - | - |
JAVA_CLASSPATH |
The classpath to use. If not given, the startup script checks for a file | - | - |
JAVA_DEBUG | If set remote debugging will be switched on. | false | true |
JAVA_DEBUG_PORT | Port used for remote debugging. | 5005 | 8787 |
JAVA_DIAGNOSTICS | Set this to print some diagnostics information to standard output during the command is running. | false | true |
JAVA_INITIAL_MEM_RATIO |
It is used when no | 25 | 25 |
JAVA_LIB_DIR |
Directory holding the Java jar files as well as an optional | JAVA_APP_DIR | - |
JAVA_MAIN_CLASS |
A main class to use as argument for | - | com.example.MainClass |
JAVA_MAX_INITIAL_MEM |
It is used when no | 4096 | 4096 |
JAVA_MAX_MEM_RATIO |
It is used when no | 50 | - |
JAVA_OPTS |
JVM options passed to the | - | -verbose:class |
JAVA_OPTS_APPEND | User-specified Java options to be appended to generated options in JAVA_OPTS. | - | -Dsome.property=foo |
LOGGING_SCRIPT_DEBUG |
Set to true to enable script debugging. Deprecates | true | True |
MAVEN_ARGS |
Arguments to use when calling Maven, replacing the default | package hawt-app:build -DskipTests -e | -e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga package |
MAVEN_ARGS_APPEND | Additional Maven arguments. | - | -X -am -pl |
MAVEN_CLEAR_REPO |
If set then the Maven repository is removed after the artifact is built. This is useful for for reducing the size of the created application image small, but prevents incremental builds. Will be overridden by | false | - |
MAVEN_LOCAL_REPO | Directory to use as the local Maven repository. | - | /home/jboss/.m2/repository |
MAVEN_MIRRORS |
If set, multi-mirror support is enabled, and other | - | dev-one,qe-two |
MAVEN_MIRROR_URL | The base URL of a mirror used for retrieving artifacts. | - | |
MAVEN_REPOS |
If set, multi-repo support is enabled, and other | - | dev-one,qe-two |
MAVEN_S2I_ARTIFACT_DIRS |
Relative paths of source directories to scan for build output, which will be copied to | target | target |
MAVEN_S2I_GOALS |
Space-separated list of goals to be executed with Maven build. For example, | package | package install |
MAVEN_SETTINGS_XML |
Location of custom Maven | - | /home/jboss/.m2/settings.xml |
NO_PROXY | 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. | - | foo.example.com,bar.example.com |
S2I_ARTIFACTS_DIR | 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 |
Root directory for S2I mount, as specified by the | - |
|
S2I_ENABLE_INCREMENTAL_BUILDS | Do not remove source and intermediate build files so they can be saved for use with future builds. | true | true |
S2I_IMAGE_SOURCE_MOUNTS |
Comma-separated list of relative paths in source directory that 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 |
Relative path to directory containing application configuration files to be copied over to the product configuration directory, see | configuration | configuration |
S2I_SOURCE_DATA_DIR |
Relative path to directory containing application data files to be copied over to the product data directory, see | data | data |
S2I_SOURCE_DEPLOYMENTS_DIR |
Relative path to directory containing binary files to be copied over to the product deployment directory, see | deployments | deployments |
S2I_SOURCE_DIR | Location of mount for source code to be built. This should not be overridden by end users. | - | ${S2I_DESTINATION_DIR}/src} |
S2I_TARGET_CONFIGURATION_DIR |
Absolute path to which files located in | - | /opt/eap/standalone/configuration |
S2I_TARGET_DATA_DIR |
Absolute path to which files located in | - | /opt/eap/standalone/data |
S2I_TARGET_DEPLOYMENTS_DIR |
Absolute path to which files located in | - | /deployments |
http_proxy | The location of the HTTP proxy. This takes precedence over HTTP_PROXY and is use for both Maven builds and Java runtime. | - | |
https_proxy | The location of the HTTPS proxy. This takes precedence over HTTPS_PROXY, http_proxy, and HTTP_PROXY, is use for both Maven builds and Java runtime. | - | myuser:mypass@127.0.0.1:8080 |
no_proxy | A comma-separated lists of hosts, IP addresses or domains that can be accessed directly. This takes precedence over NO_PROXY and is use for both Maven builds and Java runtime. | - | *.example.com |
prefix_MAVEN_MIRROR_ID | ID to be used for the specified mirror. If omitted, a unique ID is generated. | - | internal-mirror |
prefix_MAVEN_MIRROR_OF | Repository IDs mirrored by this entry. | external:* | - |
prefix_MAVEN_MIRROR_URL | The URL of the mirror. | - | |
prefix_MAVEN_REPO_DIRECTORY_PERMISSIONS | Maven repository directory permissions. | - | 775 |
prefix_MAVEN_REPO_FILE_PERMISSIONS | Maven repository file permissions. | - | 664 |
prefix_MAVEN_REPO_HOST | Maven repository host (if not using fully defined URL, it will fall back to service). | - | repo.example.com |
prefix_MAVEN_REPO_ID | Maven repository id. | - | my-repo-id |
prefix_MAVEN_REPO_LAYOUT | Maven repository layout. | - | default |
prefix_MAVEN_REPO_NAME | Maven repository name. | - | my-repo-name |
prefix_MAVEN_REPO_PASSPHRASE | Maven repository passphrase. | - | maven1! |
prefix_MAVEN_REPO_PASSWORD | Maven repository password. | - | maven1! |
prefix_MAVEN_REPO_PATH | Maven repository path (if not using fully defined URL, it will fall back to service). | - | /maven2/ |
prefix_MAVEN_REPO_PORT | Maven repository port (if not using fully defined URL, it will fall back to service). | - | 8080 |
prefix_MAVEN_REPO_PRIVATE_KEY | Maven repository private key. | - | ${user.home}/.ssh/id_dsa |
prefix_MAVEN_REPO_PROTOCOL | Maven repository protocol (if not using fully defined URL, it will fall back to service). | - | http |
prefix_MAVEN_REPO_RELEASES_CHECKSUM_POLICY | Maven repository releases checksum policy. | - | warn |
prefix_MAVEN_REPO_RELEASES_ENABLED | Maven repository releases enabled. | - | true |
prefix_MAVEN_REPO_RELEASES_UPDATE_POLICY | Maven repository releases update policy. | - | always |
prefix_MAVEN_REPO_SERVICE | Maven repository service to look up if prefix_MAVEN_REPO_URL not specified. | - | buscentr-myapp |
prefix_MAVEN_REPO_SNAPSHOTS_CHECKSUM_POLICY | Maven repository snapshots checksum policy. | - | warn |
prefix_MAVEN_REPO_SNAPSHOTS_ENABLED | Maven repository snapshots enabled. | - | true |
prefix_MAVEN_REPO_SNAPSHOTS_UPDATE_POLICY | Maven repository snapshots update policy. | - | always |
prefix_MAVEN_REPO_URL | Maven repository URL (fully defined). | - | |
prefix_MAVEN_REPO_USERNAME | Maven repository username. | - | mavenUser |
5.3.1. Configuration environment variables with default values
The following configuration Environment variables have default values specified that can be overridden.
Variable name | Description | Defaul value |
---|---|---|
AB_JOLOKIA_AUTH_OPENSHIFT |
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 | true |
AB_JOLOKIA_HTTPS |
Switch on secure communication with HTTPS. By default self-signed server certificates are generated if no | true |
AB_JOLOKIA_PASSWORD_RANDOM |
Determines if a random | true |
AB_PROMETHEUS_JMX_EXPORTER_CONFIG | Path to configuration to use for the Prometheus JMX exporter. | /opt/jboss/container/prometheus/etc/jmx-exporter-config.yaml |
S2I_SOURCE_DEPLOYMENTS_FILTER | Space-separated list of filters to be applied when copying deployments. Defaults to *. | * |
5.4. Exposed ports
The following table lists the exposed ports.
Port Number | Description |
---|---|
8080 | HTTP |
8443 | HTTPS |
8778 | Jolokia Monitoring |
5.5. Maven settings
Default Maven settings with Maven arguments
The default value of MAVEN_ARGS
environment variable contains the -Dcom.redhat.xpaas.repo.redhatga
property. This property activates a profile with the https://maven.repository.redhat.com/ga/
repository within the default jboss-settings.xml
file, which resides in the S2I for OpenShift image.
When specifying a custom value for the MAVEN_ARGS
environment variable, if a custom source_dir/configuration/settings.xml
file is not specified, the default jboss-settings.xml
in the image is used.
To specify which Maven repository will be used within the default jboss-settings.xml, there are two properties:
-
The
-Dcom.redhat.xpaas.repo.redhatga
property, to use the https://maven.repository.redhat.com/ga/ repository. -
The
-Dcom.redhat.xpaas.repo.jbossorg
property to use the https://repository.jboss.org/nexus/content/groups/public/ repository.
Provide custom Maven settings
To specify a custom settings.xml
file along with Maven arguments, create the source_dir/configuration directory
and place the settings`.xml` file inside.
Sample path should be similar to: source_dir/configuration/settings.xml
.
Revised on 2024-05-09 16:48:40 UTC