diff --git a/releasenotes/notes/ambari26-image-pack-88c9aad59bf635b2.yaml b/releasenotes/notes/ambari26-image-pack-88c9aad59bf635b2.yaml new file mode 100644 index 0000000000..25bed1ecc0 --- /dev/null +++ b/releasenotes/notes/ambari26-image-pack-88c9aad59bf635b2.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adding the ability to create Ambari 2.6 images on sahara-image-pack diff --git a/sahara/plugins/ambari/plugin.py b/sahara/plugins/ambari/plugin.py index 7d2506a892..d59059eac6 100644 --- a/sahara/plugins/ambari/plugin.py +++ b/sahara/plugins/ambari/plugin.py @@ -276,6 +276,9 @@ class AmbariPluginProvider(p.ProvisioningPluginBase): def pack_image(self, hadoop_version, remote, test_only=False, image_arguments=None): + if hadoop_version == '2.3': + image_arguments['ambari_version'] = '2.4.3.0' + self.validator.validate(remote, test_only=test_only, image_arguments=image_arguments) diff --git a/sahara/plugins/ambari/resources/images/common/mysql_connector_java_link b/sahara/plugins/ambari/resources/images/common/mysql_connector_java_link new file mode 100644 index 0000000000..8640208af2 --- /dev/null +++ b/sahara/plugins/ambari/resources/images/common/mysql_connector_java_link @@ -0,0 +1,14 @@ +#!/bin/bash -x + +# This is necessary due to the information on the link below +# https://community.hortonworks.com/articles/170133/hive-start-failed-because-of-ambari-error-mysql-co.html + +if [ ! -L /var/lib/ambari-server/resources/mysql-connector-java.jar ]; then + if [ $test_only -eq 0 ]; then + ln -s /usr/share/java/mysql-connector-java.jar /var/lib/ambari-server/resources/mysql-connector-java.jar + else + exit 1 + fi +else + exit 0 +fi diff --git a/sahara/plugins/ambari/resources/images/image.yaml b/sahara/plugins/ambari/resources/images/image.yaml index 901fa2307d..08976c8b21 100644 --- a/sahara/plugins/ambari/resources/images/image.yaml +++ b/sahara/plugins/ambari/resources/images/image.yaml @@ -1,11 +1,10 @@ arguments: ambari_version: - description: The version of Ambari to install. Defaults to 2.4.3.0. - default: 2.4.3.0 + description: The version of Ambari to install. Defaults to 2.6.2.0. + default: 2.6.2.0 choices: + - 2.6.2.0 # HDP 2.6 / HDP 2.5 / HDP 2.4 - 2.4.3.0 # HDP 2.5 / HDP 2.4 / HDP 2.3 - - 2.2.0.0 # HDP 2.3 - - 2.2.1.0 # HDP 2.4 java_distro: default: openjdk description: The distribution of Java to install. Defaults to openjdk. @@ -29,6 +28,11 @@ validators: - package: java-1.8.0-openjdk-devel oracle-java: - script: common/oracle_java + - argument_case: + argument_name: ambari_version + cases: + 2.6.2.0: + - package: libtirpc-devel - os_case: - redhat: - script: centos/disable_selinux @@ -67,6 +71,7 @@ validators: - mysql-client-5.5 - mysql-server-5.5 - libmysql-java + - script: common/mysql_connector_java_link - package: ambari-agent - script: common/fix_tls_ambari_agent - package: