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.

Note: DataStax recommends the latest build of a Technology Compatibility Kit (TCK) Certified OpenJDK version 8.

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.
If LCM is managing your Java installations and Oracle is selected as java-vendor, LCM can also manage installations of the Java Cryptography Extension (JCE) Unlimited Strength Policy files, instead of manually enabling JCE.
Note: Starting in JDK 8u161, JCE Unlimited is enabled by default. Refer to the Release Notes for JDK 8u161.
JCE files enable the use of strong encryption suites. JCE policy files are not necessary to unlock unlimited strength cryptography in OpenJDK installs.
Important: Ensure that usage of the JCE files is legal in your jurisdiction. JCE-based products are restricted for export to certain countries by the U.S. Export Administration Regulations.

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

Create a configuration profile (shell of defaults, optional).

Procedure

  1. Click Config Profiles from the Lifecycle Manager navigation menu.
  2. 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.
  3. In the Config Profile pane under the Lifecycle Manager section, click Java Setup.
    The settings including defaults for managing Java install versions appears.
  4. 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.
  5. 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.
  6. Choose Oracle and configure the parameters for the selected Java vendor.
    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, and 12 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.

    1. Optional: Enter the version of Java to install in the major-version box. For example, 1.8.0. To override the default, enter the applicable major version number.
    2. Optional: To override the default, enter the specific update number of a version in the update-version box.
      Each Java release is identified by an update-version within its file name. For example, the update-version for server-jre-8u121-linux-x64.tar.gz is 121 as indicated by 8u121 (version 8 update 121).
    3. Optional: To override the default, enter a value for final released build version in the build-version box.
      Each Java release is additionally identified by a build number in its download URL. For example, in the download-page at https://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html, the URL for server-jre-8u121-linux-x64.tar.gz includes .../java/jdk/8u121-b13/..., in which the build number is 13 as indicated by b13 (build 13).
    4. Optional: To override the default, enter a value (or leave blank as appropriate for older Java releases prior to 8u121-b13) for the build hash-version in the hash-version box.
      Java releases from 8u121-b13 onward are additionally identified by a build hash-version in their download URL. When downloading older Java releases, the build hash-version can be left blank.
    5. Optional: To download Java from a custom location rather than directly from Oracle, enter the location in the download-url box.

      LCM will attempt to download Java from the provided URL. If the download fails, the failure can be caused by a misconfiguration of download servers from the custom URL, or by lack of outbound network connectivity from the target node to Oracle servers. Verify the download URL of oracle-server-jre when local sources of error have been eliminated.

      Important: The *-version fields are still required to construct the particular download version from a custom location.
    6. Optional: To disable downloading JCE, clear the manage-jce-policy setting.
    7. Optional: If your organization has its own mirror, enter the location in the jce-download-url box. If left blank (default is auto) and managing JCE policy is enabled, the JCE is automatically downloaded directly from Oracle.
      Note: Kerberos, client-to-node encryption, and node-to-node encryption require JCE installed on every node.
  7. Click Save.

What's next