Managing Java installs
Automatically manage Java installs and upgrades from within configuration profiles. Manage installs of JCE Policy files.
Automatically manage Java installs and upgrades within configuration profiles. Managing Java installs is enabled by default in Lifecycle Manager (LCM), which downloads the JRE package and accepts the license on your behalf. The JRE or JDK is required for most DataStax products, including DataStax Enterprise (DSE), LCM, and DSE OpsCenter. You can also point to your own internal download location for packages.
The following descriptions explain how LCM responds to different scenarios regarding Java installations:
- No Java found: If there is no Java version found on a target during an install job or configuration job, LCM installs the specified version of Java.
- Different Java version found: If a Java version is found but it does not match the specified version, LCM installs the specified version of Java.
- Different Java vendor found: If an Oracle Java runtime environment is found, but OpenJDK is the specified vendor (or vice versa), LCM will install Java from that vendor.
- Java management disabled: If managing Java is disabled, and no version of Java is found on the target, the install job fails.
Additionally, compliance with United States export controls and with local law governing the import/export of products incorporating the JCE in the OpenJDK is the responsibility of the licensee. See The Security Group on the OpenJDK website.
Prerequisites
Procedure
- Click Config Profiles from the Lifecycle Manager navigation menu.
- Click the edit icon for the config profile you want to edit, or click Add config profile if you have not already created a profile.
-
In the Config Profile pane under the Lifecycle
Manager section, click Java Setup.
The settings including defaults for managing Java install versions appears.
- Optional: To disable automatic management of Java installs, uncheck the manage-java setting. Disabling Java management is useful if you have pre-installed your desired version of Java and do not want LCM to alter that Java deployment. Provisioning skips installing Java when manage-java is disabled. If managing Java is disabled, and Java is not found to be already installed when running an install job, the install job fails.
-
To enable automatic management of Java installs, check the
manage-java setting.
When manage-java is enabled, target nodes download Java directly from Oracle servers. To download the Oracle tarball from a local mirror, enter the complete URL to the tarball. In any case, complete the major-version, update-version, build-version, and build-hash (if applicable) fields so that target nodes can verify that the expected version of Java is available.
-
Choose either Platform OpenJDK or
Oracle and configure the parameters for the selected
Java vendor.
OpenJDK
Choose the version of OpenJDK to install from the os-openjdk-version list.
Note: DataStax recommends the latest build of a Technology Compatibility Kit (TCK) Certified OpenJDK version 8.LCM will attempt to install the selected version from the Linux operating system package repositories. If the specified version is not available, jobs will fail.
Oracle JDK
The version fields in the Java setup area of the configuration profiles are used to dynamically construct a URL string that downloads a particular Java version based on major version number, update version number, and build version number. For example, the following information is returned when you check the Java version at the command prompt:java -version java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
In the previous example,
1.8.0
is the major version,151
is the update version, and12
is the build. If your organization requires a version other than the default provided, enter the version information in the Java Setup page accessed in the Lifecycle Manager section of the Config Profile pane. For more details about Java version naming conventions, see the Oracle documentation. - Click Save.
What's next
- Configure a package proxy to cache and expedite package downloads.
- Run a configure job to apply the config profile changes.