Support building images for new vanilla plugin

New vanilla would contain following elements:

 * 2.7.1 version of hadoop
 * 4.2.0 version of oozie

Implements blueprint: support-vanilla-2-7-1
Depends-On: Iae884d9f044ba1fe64b6d4ff23fa6ebabdbb41d9

Change-Id: I4191d6bb7e323709cd14744df3d5c8695c1eddee
This commit is contained in:
Vitaly Gridnev 2015-08-04 14:35:24 +03:00
parent 97d05b9eff
commit 513d7d92ac
5 changed files with 40 additions and 1 deletions

View File

@ -127,7 +127,7 @@ case "$PLUGIN" in
"");; "");;
"vanilla") "vanilla")
case "$HADOOP_VERSION" in case "$HADOOP_VERSION" in
"" | "1" | "2.6");; "" | "1" | "2.6" | "2.7.1");;
*) *)
echo -e "Unknown hadoop version selected.\nAborting" echo -e "Unknown hadoop version selected.\nAborting"
exit 1 exit 1
@ -372,6 +372,8 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
export HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL=${HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL:-"http://sahara-files.mirantis.com/hadoop-native-libs-2.6.0.tar.gz"} export HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL=${HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL:-"http://sahara-files.mirantis.com/hadoop-native-libs-2.6.0.tar.gz"}
export EXTJS_DOWNLOAD_URL=${EXTJS_DOWNLOAD_URL:-"http://dev.sencha.com/deploy/ext-2.2.zip"} export EXTJS_DOWNLOAD_URL=${EXTJS_DOWNLOAD_URL:-"http://dev.sencha.com/deploy/ext-2.2.zip"}
export HIVE_VERSION=${HIVE_VERSION:-"0.11.0"} export HIVE_VERSION=${HIVE_VERSION:-"0.11.0"}
export HADOOP_V2_7_1_NATIVE_LIBS_DOWNLOAD_URL=${HADOOP_V2_7_1_NATIVE_LIBS_DOWNLOAD_URL:-"http://sahara-files.mirantis.com/hadoop-native-libs-2.7.1.tar.gz"}
export OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL=${OOZIE_HADOOP_V2_7_1_FILE:-"http://sahara-files.mirantis.com/oozie-4.2.0-hadoop-2.7.1.tar.gz"}
ubuntu_elements_sequence="vm ntp ubuntu hadoop oozie mysql hive $JAVA_ELEMENT" ubuntu_elements_sequence="vm ntp ubuntu hadoop oozie mysql hive $JAVA_ELEMENT"
fedora_elements_sequence="vm ntp fedora hadoop oozie mysql disable-firewall hive $JAVA_ELEMENT" fedora_elements_sequence="vm ntp fedora hadoop oozie mysql disable-firewall hive $JAVA_ELEMENT"
@ -421,6 +423,11 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
export ubuntu_image_name=${ubuntu_vanilla_hadoop_2_6_image_name:-"ubuntu_sahara_vanilla_hadoop_2_6_latest"} export ubuntu_image_name=${ubuntu_vanilla_hadoop_2_6_image_name:-"ubuntu_sahara_vanilla_hadoop_2_6_latest"}
disk-image-create $TRACING $ubuntu_elements_sequence -o $ubuntu_image_name disk-image-create $TRACING $ubuntu_elements_sequence -o $ubuntu_image_name
fi fi
if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.7.1" ]; then
export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_7_1:-"2.7.1"}
export ubuntu_image_name=${ubuntu_vanilla_hadoop_2_7_1_image_name:-"ubuntu_sahara_vanilla_hadoop_2_7_1_latest"}
disk-image-create $TRACING $ubuntu_elements_sequence -o $ubuntu_image_name
fi
unset DIB_CLOUD_INIT_DATASOURCES unset DIB_CLOUD_INIT_DATASOURCES
fi fi
@ -437,6 +444,11 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
export fedora_image_name=${fedora_vanilla_hadoop_2_6_image_name:-"fedora_sahara_vanilla_hadoop_2_6_latest$suffix"} export fedora_image_name=${fedora_vanilla_hadoop_2_6_image_name:-"fedora_sahara_vanilla_hadoop_2_6_latest$suffix"}
disk-image-create $TRACING $fedora_elements_sequence -o $fedora_image_name disk-image-create $TRACING $fedora_elements_sequence -o $fedora_image_name
fi fi
if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.7.1" ]; then
export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_7_1:-"2.7.1"}
export fedora_image_name=${fedora_vanilla_hadoop_2_7_1_image_name:-"fedora_sahara_vanilla_hadoop_2_7_1_latest$suffix"}
disk-image-create $TRACING $fedora_elements_sequence -o $fedora_image_name
fi
fi fi
# CentOS cloud image: # CentOS cloud image:
@ -457,6 +469,11 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
export centos_image_name=${centos_vanilla_hadoop_2_6_image_name:-"centos_sahara_vanilla_hadoop_2_6_latest$suffix"} export centos_image_name=${centos_vanilla_hadoop_2_6_image_name:-"centos_sahara_vanilla_hadoop_2_6_latest$suffix"}
disk-image-create $TRACING $centos_elements_sequence -o $centos_image_name disk-image-create $TRACING $centos_elements_sequence -o $centos_image_name
fi fi
if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.7.1" ]; then
export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_7_1:-"2.7.1"}
export centos_image_name=${centos_vanilla_hadoop_2_7_1_image_name:-"centos_sahara_vanilla_hadoop_2_7_1_latest$suffix"}
disk-image-create $TRACING $centos_elements_sequence -o $centos_image_name
fi
unset BASE_IMAGE_FILE DIB_CLOUD_IMAGES unset BASE_IMAGE_FILE DIB_CLOUD_IMAGES
fi fi
@ -467,6 +484,11 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
export centos7_image_name=${centos7_vanilla_hadoop_2_6_image_name:-"centos7_sahara_vanilla_hadoop_2_6_latest$suffix"} export centos7_image_name=${centos7_vanilla_hadoop_2_6_image_name:-"centos7_sahara_vanilla_hadoop_2_6_latest$suffix"}
disk-image-create $TRACING $centos7_elements_sequence -o $centos7_image_name disk-image-create $TRACING $centos7_elements_sequence -o $centos7_image_name
fi fi
if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.7.1" ]; then
export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_7_1:-"2.7.1"}
export centos7_image_name=${centos7_vanilla_hadoop_2_7_1_image_name:-"centos7_sahara_vanilla_hadoop_2_7_1_latest$suffix"}
disk-image-create $TRACING $centos7_elements_sequence -o $centos7_image_name
fi
fi fi
fi fi

View File

@ -62,6 +62,9 @@ function install_hadoop_v2 {
"2.6.0") "2.6.0")
hadoop_native_libs_url="${HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL}" hadoop_native_libs_url="${HADOOP_V2_6_NATIVE_LIBS_DOWNLOAD_URL}"
;; ;;
"2.7.1")
hadoop_native_libs_url="${HADOOP_V2_7_1_NATIVE_LIBS_DOWNLOAD_URL}"
;;
*) *)
echo "Invalid DIB_HADOOP_VERSION: $DIB_HADOOP_VERSION" echo "Invalid DIB_HADOOP_VERSION: $DIB_HADOOP_VERSION"
exit 1 exit 1

View File

@ -22,6 +22,12 @@ elif [[ "$DIB_HADOOP_VERSION" == "2.6.0" ]]; then
else else
OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_6_DOWNLOAD_URL) OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_6_DOWNLOAD_URL)
fi fi
elif [[ "$DIB_HADOOP_VERSION" == "2.7.1" ]]; then
if [ -z "${OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL:-}" ]; then
OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_7_1_FILE)
else
OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL)
fi
else else
echo "Unknown Hadoop version selected. Aborting." echo "Unknown Hadoop version selected. Aborting."
exit 1 exit 1

View File

@ -16,6 +16,11 @@ elif [ "$DIB_HADOOP_VERSION" == "2.6.0" ]; then
echo "OOZIE_HADOOP_V2_6_FILE and OOZIE_HADOOP_V2_6_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit" echo "OOZIE_HADOOP_V2_6_FILE and OOZIE_HADOOP_V2_6_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit"
exit 1 exit 1
fi fi
elif [ "$DIB_HADOOP_VERSION" == "2.7.1" ]; then
if [ -z "${OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL:-}" -a -z "${OOZIE_HADOOP_V2_7_1_FILE:-}" ]; then
echo "OOZIE_HADOOP_V2_7_1_FILE and OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit"
exit 1
fi
else else
echo "Unknown Hadoop version selected. Aborting" echo "Unknown Hadoop version selected. Aborting"
exit 1 exit 1

View File

@ -15,6 +15,9 @@ if [[ "$DIB_HADOOP_VERSION" < "2.0.0" ]]; then
elif [[ "$DIB_HADOOP_VERSION" == "2.6.0" ]]; then elif [[ "$DIB_HADOOP_VERSION" == "2.6.0" ]]; then
OOZIE_DOWNLOAD_URL="${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-}" OOZIE_DOWNLOAD_URL="${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-}"
OOZIE_FILE="${OOZIE_HADOOP_V2_6_FILE:-}" OOZIE_FILE="${OOZIE_HADOOP_V2_6_FILE:-}"
elif [[ "$DIB_HADOOP_VERSION" == "2.7.1" ]]; then
OOZIE_DOWNLOAD_URL="${OOZIE_HADOOP_V2_7_1_DOWNLOAD_URL:-}"
OOZIE_FILE="${OOZIE_HADOOP_V2_7_1_FILE:-}"
else else
echo "Unknown Hadoop version selected. Aborting." echo "Unknown Hadoop version selected. Aborting."
exit 1 exit 1