[TRAFODION 2221] HDP 2.5 support
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/af9c70ea Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/af9c70ea Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/af9c70ea Branch: refs/heads/master Commit: af9c70ea8eb86b2282c9469e30fa708f3ee2cb32 Parents: bd2d6b9 Author: Amanda Moran <ama...@apache.com> Authored: Tue Sep 13 22:30:16 2016 +0000 Committer: Amanda Moran <ama...@apache.com> Committed: Tue Sep 13 22:30:16 2016 +0000 ---------------------------------------------------------------------- install/installer/tools/ambari_setup | 2 +- install/installer/traf_config_check | 134 ++++++++++++++++++++++-------- 2 files changed, 101 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/af9c70ea/install/installer/tools/ambari_setup ---------------------------------------------------------------------- diff --git a/install/installer/tools/ambari_setup b/install/installer/tools/ambari_setup index aca1c41..b97a7fc 100755 --- a/install/installer/tools/ambari_setup +++ b/install/installer/tools/ambari_setup @@ -83,7 +83,7 @@ if [[ $AMBARI -eq 0 ]]; then if [[ "$SUSE_Installed" -eq "1" ]]; then wget http://public-repo-1.hortonworks.com/ambari/suse11/2.x/updates/2.0.0/ambari.repo else - wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo + wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.0.1/ambari.repo fi if [ $? -ne 0 ]; then http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/af9c70ea/install/installer/traf_config_check ---------------------------------------------------------------------- diff --git a/install/installer/traf_config_check b/install/installer/traf_config_check index 8e6d9b0..f404f94 100755 --- a/install/installer/traf_config_check +++ b/install/installer/traf_config_check @@ -32,13 +32,18 @@ source $TRAF_CONFIG function majorErrorFound { if [[ "$errorFound" == "1" ]]; then - cat $ERROR_LOG + echo + echo + echo "******************************************" + cat $TRAF_CONFIG echo echo echo "******************************************" - cat /etc/trafodion/trafodion_config + cat $ERROR_LOG echo "******************************************" echo + echo + echo "******************************************" exit -1 fi } @@ -193,6 +198,7 @@ else echo "TRAFODION NODE LIST" >> $ERROR_LOG echo "***ERROR: Could not ssh to $ERROR_NODES." >> $ERROR_LOG echo "***ERROR: Check permissions and known hosts files." >> $ERROR_LOG + majorErrorFound fi node_count=$(echo $NODE_LIST | wc -w) @@ -269,11 +275,12 @@ else done NODE_LIST=$NODES - if [[ $error == "1" ]]; then + if [[ $error == "1" ]]; then errorFound=1 - echo "MANAGEMENT NODE LIST" >> $ERROR_LOG + echo "MANAGEMENT NODE LIST" >> $ERROR_LOG echo "***ERROR: $ERROR_NODES does not have sudo access." >> $ERROR_LOG echo "***ERROR: Must have sudo access on all nodes." >> $ERROR_LOG + majorErrorFound fi @@ -291,6 +298,7 @@ else echo "TRAFODION NODE LIST" >> $ERROR_LOG echo "***ERROR: Could not ssh to $ERROR_NODES." >> $ERROR_LOG echo "***ERROR: Check permissions and known hosts files." >> $ERROR_LOG + majorErrorFound fi @@ -383,18 +391,31 @@ else REQ_VER="1.7.0_65" error="" - #Only checking on 1 node for now. This will change. - $LOCAL_WORKDIR/checkJava.py - if [[ $? != 0 ]]; then - error=1 + if [[ "$JAVA_8_SUPPORT" == "Y" ]]; then + $LOCAL_WORKDIR/checkJava8.py + if [[ $? != 0 ]]; then + error=1 + fi + else + $LOCAL_WORKDIR/checkJava.py + if [[ $? != 0 ]]; then + error=1 + fi fi + if [[ -n $error ]]; then errorFound=1 echo "JAVA HOME" >> $ERROR_LOG - echo "***ERROR: Your existing JAVA_HOME is less than $REQ_VER" >> $ERROR_LOG - echo "***ERROR: Required java version should be greater than $REQ_VER" >> $ERROR_LOG + if [[ "$JAVA_8_SUPPORT" == "Y" ]]; then + #Get used to this error. You are going to see it alot. + echo "***ERROR: Your existing JAVA_HOME is not JAVA 8" >> $ERROR_LOG + echo "***ERROR: Required java version is JAVA 8, any other version is not supported" >> $ERROR_LOG + else + echo "***ERROR: Your existing JAVA_HOME is less than $REQ_VER" >> $ERROR_LOG + echo "***ERROR: Required java version should be greater than $REQ_VER" >> $ERROR_LOG + fi fi @@ -444,23 +465,6 @@ source $TRAF_CONFIG } -function checkEPEL { - -if [[ "$SUSE_LINUX" != "true" ]]; then - if [[ ! -z $EPEL_RPM ]]; then - if [[ ! -f $EPEL_RPM ]]; then - errorFound=1 - echo "EPEL REPO PATH" >> $ERROR_LOG - echo "***ERROR: File not found. Please check path for existence and typos." >> $ERROR_LOG - fi - if [[ "$EPEL_RPM" != *"rpm"* ]]; then - errorFound=1 - echo "***ERROR: File enter is not an RPM. Check file is of type epel***.rpm" - fi - fi -fi -} - function checkBackupUser { TRAF_CONFIG="/etc/trafodion/trafodion_config" @@ -468,7 +472,7 @@ TRAF_CONFIG="/etc/trafodion/trafodion_config" source $TRAF_CONFIG if [ -z $BACKUP_USER ]; then - echo "***ERROR: BACKUP_USER variable not set in config file." + echo "***WARNING: BACKUP_USER variable not set in config file." echo "***WARNING: BACKUP_USER will be set to trafodion." sudo chmod 777 $TRAF_CONFIG sudo echo "export BACKUP_USER=\"trafodion\"" >> $TRAF_CONFIG @@ -584,6 +588,9 @@ source $TRAF_CONFIG } function setHBaseDistro { +if [[ "$HADOOP_TYPE" == "mapr" ]]; then + HBASE_DISTRO="MAPR" +fi if [[ $HADOOP_TYPE == "apache" ]]; then HBASE_DISTRO="APACHE"$APACHE_VERSION @@ -607,6 +614,10 @@ function getHadoopNodes { echo "***INFO: Getting list of all $HADOOP_TYPE nodes" +if [[ "$HADOOP_TYPE" == "mapr" ]]; then + HADOOP_TYPE="apache" +fi + if [[ $MULTI_CLUSTER == "N" ]]; then $LOCAL_WORKDIR/traf_getHadoopNodes fi @@ -625,6 +636,9 @@ fi function checkHadoopVersion { count=0 + +source $TRAF_CONFIG + for node in $HADOOP_NODES; do if [[ $HADOOP_TYPE == "apache" ]]; then @@ -751,7 +765,7 @@ if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then fi fi else - nameOfVersion=$( echo ${hdpVersion} | grep 2.[3-4]) + nameOfVersion=$( echo ${hdpVersion} | grep 2.[3-5]) #Check that HDP 2.[n>3].* is not installed. if [[ -z $nameOfVersion ]]; then versionInstalled=$( echo ${hdpVersion} | grep [1-3].[0-9].* | wc -l) @@ -927,6 +941,56 @@ fi } +function checkJavaSupport { + +if [[ "$ONE_TAR_INSTALL" == "N" ]] || [[ -z "$ONE_TAR_INSTALL" ]] ; then + TRAF_BUILD=$(tar -tf $TRAF_PACKAGE | grep "trafodion_.*server") + tar -xzf $TRAF_PACKAGE --directory $LOCAL_WORKDIR + TRAF_BUILD_PATH=$LOCAL_WORKDIR/$TRAF_BUILD + install_features_path=$(tar -tf $TRAF_BUILD_PATH | grep "install_features") + +else + TRAF_BUILD_PATH=$TRAF_PACKAGE + install_features_path=$(tar -tf $TRAF_PACKAGE | grep "install_features") + +fi + +if [[ ! -z $install_features_path ]]; then + if [[ "$ONE_TAR_INSTALL" == "N" ]]; then + tar -xzf $TRAF_BUILD_PATH $install_features_path + if [[ $? -ne "0" ]]; then + echo "***ERROR: Error with untar of $TRAF_BUILD_PATH" + exit -1 + fi + else + tar -xzf $TRAF_PACKAGE $install_features_path + if [[ $? -ne "0" ]]; then + echo "***ERROR: Error with untar of $TRAF_BUILD_PATH" + exit -1 + fi + fi + source $install_features_path + + if [[ -z $JAVA_8_SUPPORT ]]; then + sudo chmod 777 $TRAF_CONFIG + echo "export JAVA_8_SUPPORT=\"N\"" >> $TRAF_CONFIG + sudo chmod 777 $TRAF_CONFIG + else + sudo chmod 777 $TRAF_CONFIG + echo "export JAVA_8_SUPPORT=\"$JAVA_8_SUPPORT\"" >> $TRAF_CONFIG + sudo chmod 777 $TRAF_CONFIG + fi +else + JAVA_8_SUPPORT="N" + sudo chmod 777 $TRAF_CONFIG + echo "export JAVA_8_SUPPORT=\"$JAVA_8_SUPPORT\"" >> $TRAF_CONFIG + sudo chmod 777 $TRAF_CONFIG +fi + + + +} + function checkHadoopSupport { if [[ "$ONE_TAR_INSTALL" == "N" ]] || [[ -z "$ONE_TAR_INSTALL" ]] ; then @@ -1053,15 +1117,15 @@ createAllNodes createPDSH +checkJavaSupport + checkJavaVersion checkHomeDir -checkEPEL - checkHadoopSupport -if [[ "$HADOOP_TYPE" != "apache" ]]; then +if [[ "$HADOOP_TYPE" != "apache" ]] && [[ "$HADOOP_TYPE" != "mapr" ]]; then checkBackupUser checkHadoopUserPass @@ -1070,7 +1134,7 @@ if [[ "$HADOOP_TYPE" != "apache" ]]; then fi -if [[ "$HADOOP_TYPE" == "apache" ]]; then +if [[ "$HADOOP_TYPE" == "apache" ]] && [[ "$HADOOP_TYPE" != "mapr" ]]; then setPath fi @@ -1078,7 +1142,9 @@ getHadoopNodes setHBaseDistro -checkHadoopNames +if [[ "$HADOOP_TYPE" != "mapr" ]]; then + checkHadoopNames +fi checkSQROOT