Deploying Java on Cluster Instances

When you set up Cloudera Manager and CDH clusters in the cloud, a version of the Java JDK must be installed on each instance. Choose one of the three JDK installation strategies described below for your Cloudera Manager instance and the CDH clusters it manages. The JDK installation strategy can be set using a configuration file or using the Altus Director API, but it is not currently configurable in the Altus Director web UI.

Once a particular JDK installation strategy has been used to bootstrap a new Cloudera Manager deployment and JDK cluster, Altus Director continues to follow that JDK installation strategy for all additional clusters added to that Cloudera Manager deployment.

AUTO JDK Installation Strategy

With the AUTO setting, Altus Director installs the JDK on the Cloudera Manager node, and then Cloudera Manager handles JDK installation for all instances in the cluster. If needed, Altus Director also installs unlimited strength JCE policy files on the Cloudera Manager instance, and directs Cloudera Manager to install them on all cluster instances.

The JDK version installed depends on the cmJavaPackages and defaultCmJavaPackage properties in the application.properties file, as described below:
  • By default, Altus Director 6 installs Java 8 for Cloudera Manager 6 on all nodes. By default, Altus Director 6 installs Java 7 for Cloudera Manager 5 on all nodes.
  • When Altus Director can determine the Cloudera Manager version, the configuration property lp.bootstrap.packages.cmJavaPackages determines the Java package used. The property is a list of key-value pairs, where each key is a regular expression for a Cloudera Manager version, and each value is the corresponding Java package to use for it. In this example, Java 8 is used for Cloudera Manager 5.13.x, and Java 7 for any other version:
    5\.13\..*=oracle-j2sdk1.8,5\..*=oracle-j2sdk1.7
  • When Altus Director cannot determine the Cloudera Manager version, the configuration property lp.bootstrap.packages.defaultCmJavaPackage determines the Java package used.

To guarantee that JDK 8 is used, change cmJavaPackages to .*=oracle-j2sdk1.8 and change defaultCmJavaPackage to oracle-j2sdk1.8.

You must ensure that yum is configured with a repository that contains the Java package you have chosen, as described below:
  • If you select oracle-j2sdk1.8 for Cloudera Manager 6, which is the default behavior for Altus Director, then you don't have to do anything further, because Altus Director always configures the Cloudera Manager repository, and the Cloudera Manager repository has oracle-j2sdk1.8.
  • If you select oracle-j2sdk1.8 for Cloudera Manager 5, then you need to use a bootstrap script or AMI that ensures that the right yum repository is configured. The repository for Altus Director 2.x has oracle-j2sdk1.7 and oracle-j2sdk1.8.

AUTO is the default JDK installation strategy, so it is not necessary to specify it in a configuration file or using the API. All installations done with the Altus Director web UI use the default AUTO setting.

DIRECTOR_MANAGED JDK Installation Strategy

With the DIRECTOR_MANAGED setting, Altus Director installs the JDK for all Cloudera Manager and cluster instances from a yum repository. The JDK installation includes unlimited strength JCE policy files, should you require them.

With this installation strategy, you can choose the Java version to be installed for Cloudera Manager and for CDH cluster instances.
  • By default, Altus Director 6 installs Java 8 for Cloudera Manager 6 on all nodes. By default, Altus Director 6 installs Java 7 for Cloudera Manager 5 on all nodes.
  • When Altus Director can determine the Cloudera Manager version, the configuration property lp.bootstrap.packages.cmJavaPackages determines the Java package used. The property is a list of key-value pairs, where each key is a regular expression for a Cloudera Manager version, and each value is the corresponding Java package to use for it. In this example, Java 8 is used for Cloudera Manager 5.13.x, and Java 7 for any other version:
    5\.13\..*=oracle-j2sdk1.8,5\..*=oracle-j2sdk1.7
  • When Altus Director cannot determine the Cloudera Manager version, the configuration property lp.bootstrap.packages.defaultCmJavaPackage determines the Java package used.

To guarantee that JDK 8 is used, change cmJavaPackages to .*=oracle-j2sdk1.8 and change defaultCmJavaPackage to oracle-j2sdk1.8.

You must ensure that yum is configured with a repository that contains the Java package you have chosen, as described below:
  • If you select oracle-j2sdk1.8 for Cloudera Manager 6, then you don't have to do anything further, because Altus Director always configures the Cloudera Manager repository, and the Cloudera Manager 6 repository has oracle-j2sdk1.8.
  • If you select oracle-j2sdk1.8 for Cloudera Manager 5, then you need to use a bootstrap script or AMI that ensures that the right yum repository is configured. The repository for Altus Director 2.x has oracle-j2sdk1.7 and oracle-j2sdk1.8.

Here is how the DIRECTOR_MANAGED setting looks in a configuration file:

...
cloudera-manager {

    instance: ${instances.m3x} {
        tags {
            application: "Cloudera Manager 5"
        }
    }
    javaInstallationStrategy: DIRECTOR_MANAGED
    ...
}

NONE JDK Installation Strategy

With the NONE installation strategy, neither Altus Director nor Cloudera Manager install a JDK; you must manage all JDK installation yourself, for example, by using bootstrap scripts or pre-baked images. When running a bootstrap script, Altus Director can install any Java package that instances can find with yum.

Here is how this setting looks in a configuration file:

...
cloudera-manager {

    instance: ${instances.m3x} {
        tags {
            application: "Cloudera Manager 5"
        }
    }
    javaInstallationStrategy: NONE
    ...
}