From ec50d50387977c6006f2357ee38cbd938d8a6fec Mon Sep 17 00:00:00 2001 From: Vitaly Gridnev Date: Wed, 6 Jul 2016 15:59:19 +0300 Subject: [PATCH] drop vanilla 2.6.0 support from elements we don't have vanilla 2.6.0 in supported list in all current branches of sahara. we can just drop that. if needed, stable/mitaka branch should be used for building that image. Change-Id: I81ed8209f2154f112fe7f6718029b84548793380 --- diskimage-create/README.rst | 6 ++--- diskimage-create/diskimage-create.sh | 26 ++----------------- elements/hadoop/README.rst | 10 +++---- elements/hadoop/install.d/40-setup-hadoop | 3 --- elements/oozie/install.d/50-setup-oozie | 8 +----- elements/oozie/root.d/0-check-oozie | 7 +---- elements/oozie/root.d/50-download-oozie | 5 +--- .../swift_hadoop/post-install.d/81-add-jar | 2 -- 8 files changed, 13 insertions(+), 54 deletions(-) diff --git a/diskimage-create/README.rst b/diskimage-create/README.rst index caec3108..651857bc 100644 --- a/diskimage-create/README.rst +++ b/diskimage-create/README.rst @@ -11,10 +11,10 @@ version. For users: 1. Use your environment (export / setenv) to alter the scripts behavior. -Environment variables the script accepts are 'DIB_HADOOP_VERSION_[2_6|2_7_1]', +Environment variables the script accepts are 'DIB_HADOOP_VERSION_2_7_1', 'JAVA_DOWNLOAD_URL', 'JAVA_TARGET_LOCATION', 'OOZIE_DOWNLOAD_URL', 'HIVE_VERSION', -'[ubuntu|fedora|centos|centos7]_vanilla_[hadoop_2_6|hadoop_2_7_1]_image_name', +'[ubuntu|fedora|centos|centos7]_vanilla_hadoop_2_7_1_image_name', 'ubuntu_spark_image_name', 'ubuntu_storm_image_name', 'ambari_[ubuntu|centos|centos7]_image_name', 'cloudera_[5_0|5_3|5_4|5_5]_[ubuntu|centos]_image_name', @@ -51,7 +51,7 @@ like this: .. sourcecode:: bash - tox -e venv -- sahara-image-create -v [2.6|2.7.1|4|5.0|5.3|5.4|5.5] + tox -e venv -- sahara-image-create -v [2.7.1|4|5.0|5.3|5.4|5.5] Also, if you are planning to select which ambari version to target use the '-v' commandline option like this: diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh index cbab765e..4017324c 100755 --- a/diskimage-create/diskimage-create.sh +++ b/diskimage-create/diskimage-create.sh @@ -32,7 +32,7 @@ usage() { echo "Usage: $(basename $0)" echo " [-p vanilla|spark|cloudera|storm|mapr|ambari|plain]" echo " [-i ubuntu|fedora|centos|centos7]" - echo " [-v 2.6|2.7.1|4|5.0|5.3|5.4|5.5|5.7|2.2.0.0|2.2.1.0]" + echo " [-v 2.7.1|4|5.0|5.3|5.4|5.5|5.7|2.2.0.0|2.2.1.0]" echo " [-r 5.0.0|5.1.0]" echo " [-s 1.3.1|1.6.0]" echo " [-t 0.9.2|1.0.1]" @@ -149,7 +149,7 @@ case "$PLUGIN" in "");; "vanilla") case "$HADOOP_VERSION" in - "" | "2.6" | "2.7.1");; + "" | "2.7.1");; *) echo -e "Unknown hadoop version selected.\nAborting" exit 1 @@ -472,8 +472,6 @@ image_create() { ############################# if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then - export OOZIE_HADOOP_V2_6_DOWNLOAD_URL=${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-"http://sahara-files.mirantis.com/oozie-4.0.1-hadoop-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 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"} @@ -503,11 +501,6 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "ubuntu" ]; then export DIB_CLOUD_INIT_DATASOURCES=$CLOUD_INIT_DATASOURCES - if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.6" ]; then - export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_6:-"2.6.0"} - export ubuntu_image_name=${ubuntu_vanilla_hadoop_2_6_image_name:-"ubuntu_sahara_vanilla_hadoop_2_6_latest"} - image_create ubuntu $ubuntu_image_name $ubuntu_elements_sequence - 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"} @@ -518,11 +511,6 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then # Fedora cloud image if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "fedora" ]; then - if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.6" ]; then - export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_6:-"2.6.0"} - export fedora_image_name=${fedora_vanilla_hadoop_2_6_image_name:-"fedora_sahara_vanilla_hadoop_2_6_latest$suffix"} - image_create fedora $fedora_image_name $fedora_elements_sequence - 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"} @@ -532,11 +520,6 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then # CentOS 6 cloud image if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "centos" ]; then - if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.6" ]; then - export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_6:-"2.6.0"} - export centos_image_name=${centos_vanilla_hadoop_2_6_image_name:-"centos_sahara_vanilla_hadoop_2_6_latest$suffix"} - image_create centos $centos_image_name $centos_elements_sequence - 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"} @@ -546,11 +529,6 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then # CentOS 7 cloud image if [ -z "$BASE_IMAGE_OS" -o "$BASE_IMAGE_OS" = "centos7" ]; then - if [ -z "$HADOOP_VERSION" -o "$HADOOP_VERSION" = "2.6" ]; then - export DIB_HADOOP_VERSION=${DIB_HADOOP_VERSION_2_6:-"2.6.0"} - export centos7_image_name=${centos7_vanilla_hadoop_2_6_image_name:-"centos7_sahara_vanilla_hadoop_2_6_latest$suffix"} - image_create centos7 $centos7_image_name $centos7_elements_sequence - 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"} diff --git a/elements/hadoop/README.rst b/elements/hadoop/README.rst index 561570c2..3d3a0682 100644 --- a/elements/hadoop/README.rst +++ b/elements/hadoop/README.rst @@ -13,24 +13,24 @@ HOWTO build Hadoop Native Libs .. code:: bash - wget http://archive.apache.org/dist/hadoop/core/hadoop-2.6.0/hadoop-2.6.0-src.tar.gz + wget http://archive.apache.org/dist/hadoop/core/hadoop-2.7.1/hadoop-2.7.1-src.tar.gz - Unpack source: .. code:: bash - tar xvf hadoop-2.6.0-src.tar.gz + tar xvf hadoop-2.7.1-src.tar.gz - Build Hadoop: .. code:: bash - cd hadoop-2.6.0-src + cd hadoop-2.7.1-src mvn package -Pdist,native -DskipTests - Create tarball with Hadoop Native Libs: .. code:: bash - cd hadoop-dist/target/hadoop-2.6.0/lib - tar -czvf hadoop-native-libs-2.6.0.tar.gz native + cd hadoop-dist/target/hadoop-2.7.1/lib + tar -czvf hadoop-native-libs-2.7.1.tar.gz native diff --git a/elements/hadoop/install.d/40-setup-hadoop b/elements/hadoop/install.d/40-setup-hadoop index 77226888..65601172 100755 --- a/elements/hadoop/install.d/40-setup-hadoop +++ b/elements/hadoop/install.d/40-setup-hadoop @@ -8,9 +8,6 @@ set -o pipefail function install_hadoop_v2 { case "$DIB_HADOOP_VERSION" in - "2.6.0") - 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}" ;; diff --git a/elements/oozie/install.d/50-setup-oozie b/elements/oozie/install.d/50-setup-oozie index ebe3e185..7fafb1f4 100755 --- a/elements/oozie/install.d/50-setup-oozie +++ b/elements/oozie/install.d/50-setup-oozie @@ -10,13 +10,7 @@ echo "Oozie setup" tmp_dir=/tmp/oozie -if [[ "$DIB_HADOOP_VERSION" == "2.6.0" ]]; then - if [ -z "${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-}" ]; then - OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_6_FILE) - else - OOZIE_FILE=$(basename $OOZIE_HADOOP_V2_6_DOWNLOAD_URL) - fi -elif [[ "$DIB_HADOOP_VERSION" == "2.7.1" ]]; then +if [[ "$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 diff --git a/elements/oozie/root.d/0-check-oozie b/elements/oozie/root.d/0-check-oozie index 4bd7b52b..eec18077 100755 --- a/elements/oozie/root.d/0-check-oozie +++ b/elements/oozie/root.d/0-check-oozie @@ -6,12 +6,7 @@ fi set -eu set -o pipefail -if [ "$DIB_HADOOP_VERSION" == "2.6.0" ]; then - if [ -z "${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-}" -a -z "${OOZIE_HADOOP_V2_6_FILE:-}" ]; then - echo "OOZIE_HADOOP_V2_6_FILE and OOZIE_HADOOP_V2_6_DOWNLOAD_URL are not set. Impossible to install Oozie. Exit" - exit 1 - fi -elif [ "$DIB_HADOOP_VERSION" == "2.7.1" ]; then +if [ "$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 diff --git a/elements/oozie/root.d/50-download-oozie b/elements/oozie/root.d/50-download-oozie index 64466fec..7d059134 100755 --- a/elements/oozie/root.d/50-download-oozie +++ b/elements/oozie/root.d/50-download-oozie @@ -9,10 +9,7 @@ set -o pipefail tmp_dir=$TARGET_ROOT/tmp/oozie mkdir -p $tmp_dir -if [[ "$DIB_HADOOP_VERSION" == "2.6.0" ]]; then - OOZIE_DOWNLOAD_URL="${OOZIE_HADOOP_V2_6_DOWNLOAD_URL:-}" - OOZIE_FILE="${OOZIE_HADOOP_V2_6_FILE:-}" -elif [[ "$DIB_HADOOP_VERSION" == "2.7.1" ]]; then +if [[ "$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 diff --git a/elements/swift_hadoop/post-install.d/81-add-jar b/elements/swift_hadoop/post-install.d/81-add-jar index f60042ec..a78d9627 100755 --- a/elements/swift_hadoop/post-install.d/81-add-jar +++ b/elements/swift_hadoop/post-install.d/81-add-jar @@ -10,8 +10,6 @@ hadoop="2.7.1" case "$plugin_type" in "vanilla") case "$DIB_HADOOP_VERSION" in - "2.6" | "2.6.0") - hadoop="2.6.0";; "2.7.1") hadoop="2.7.1";; esac