trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ama...@apache.org
Subject [1/6] incubator-trafodion git commit: [[Trafodion 1133]] [[Trafodion 1088]] [[Trafodion 1481]]
Date Sun, 13 Sep 2015 20:59:07 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 11af9ea6f -> eeb018998


[[Trafodion 1133]] [[Trafodion 1088]] [[Trafodion 1481]]

Trafodion 1133 and Trafodion 1088 allow installer to add a node.

Trafodion 1481 seperates rpm installs into its own script so that it can be
run during an upgrade (to make sure all new packages needed are added). Bug still needs to
be fixed is that it runs too many times (is ran once per node) and doesn't need to be. Will
create a new jira for that small bug. Would like to check this in to prevent issue when upgrading.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/330a6ea4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/330a6ea4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/330a6ea4

Branch: refs/heads/master
Commit: 330a6ea44d503d76b484c9a16550a9de72a583b2
Parents: 5d46472
Author: Amanda Moran <amanda@apache.com>
Authored: Wed Sep 9 17:40:14 2015 +0000
Committer: Amanda Moran <amanda@apache.com>
Committed: Wed Sep 9 17:40:14 2015 +0000

----------------------------------------------------------------------
 install/installer/traf_add_user            |   9 +-
 install/installer/traf_cloudera_mods98     |  18 +-
 install/installer/traf_config_setup        | 113 +++++++-----
 install/installer/traf_hortonworks_mods98  |  10 +-
 install/installer/traf_package_setup       | 224 ++++++++++++++++++++++++
 install/installer/traf_setup               | 172 +-----------------
 install/installer/trafodion_config_default |   3 +
 install/installer/trafodion_install        |  53 ++++--
 8 files changed, 364 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_add_user
----------------------------------------------------------------------
diff --git a/install/installer/traf_add_user b/install/installer/traf_add_user
index 2894d86..00620bc 100755
--- a/install/installer/traf_add_user
+++ b/install/installer/traf_add_user
@@ -144,7 +144,6 @@ if [ $return_code -ne 0 ]; then
     if [ $return_code -eq 9 ]; then
         echo "***WARNING: username already exists, will use existing userid, $TRAF_USER..."
         echo "***WARNING: ...and assume it was setup properly with passwordless ssh access
to all nodes."
-        userid_already_exists="Y"
     else
         echo "***ERROR: unable to create Trafodion userid: $TRAF_USER.$TRAF_GROUP, RC=$return_code"
         exit -1
@@ -153,9 +152,9 @@ fi
 #=================================================
 
 # Setup passwordless ssh for this Trafodion userid
-if [ "$userid_already_exists" == "Y" ]; then
-    echo "***INFO: skipping passwordless ssh setup because userid ($TRAF_USER) already exists"
-else
+#if [ "$userid_already_exists" == "Y" ]; then
+#    echo "***INFO: skipping passwordless ssh setup because userid ($TRAF_USER) already exists"
+#else
     sudo su $TRAF_USER --command "echo -e 'y\n' | ssh-keygen -t rsa -N \"\" -f $TRAF_USER_DIR/.ssh/id_rsa"
     if [[ "$SUSE_LINUX" == "true" ]]; then
        sudo su $TRAF_USER --command "cp $TRAF_USER_DIR/.ssh/id_rsa.pub $TRAF_USER_DIR/.ssh/authorized_keys"
@@ -165,7 +164,7 @@ else
     sudo su $TRAF_USER --command "echo localhost $(cat /etc/ssh/ssh_host_rsa_key.pub) >
$TRAF_USER_DIR/.ssh/known_hosts"
     sudo su $TRAF_USER --command "echo \"NoHostAuthenticationForLocalhost=yes\" >>
$TRAF_USER_DIR/.ssh/config"
     sudo chmod 600 $TRAF_USER_DIR/.ssh/config
-fi
+#fi
 
 echo "***INFO: creating .qpidports file"
 sudo su $TRAF_USER --command="echo $QPIDPORT > $TRAF_USER_DIR/.qpidports"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_cloudera_mods98
----------------------------------------------------------------------
diff --git a/install/installer/traf_cloudera_mods98 b/install/installer/traf_cloudera_mods98
index 03bdfd1..4839e28 100755
--- a/install/installer/traf_cloudera_mods98
+++ b/install/installer/traf_cloudera_mods98
@@ -43,9 +43,13 @@ if [ "$JAVA_VERSION" == "1.6" ]; then
    exit -1
 elif [ "$JAVA_VERSION" == "1.7" ]; then
    if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
-      hbase_trx_jar="hbase-trx-${TRAF_VERSION}.jar"
+      if [[ $CDH_5_4_SUPPORT == "Y" ]]; then
+         hbase_trx_jar="hbase-trx-cdh5_4-${TRAF_VERSION}.jar"
+      else
+         hbase_trx_jar="hbase-trx-${TRAF_VERSION}.jar" 
+      fi 
    else
-       hbase_trx_jar="hbase-trx-cdh5_3-${TRAF_VERSION}.jar"      
+      hbase_trx_jar="hbase-trx-cdh5_3-${TRAF_VERSION}.jar"
    fi
 else
     echo "***ERROR: unable to determine Hadoop's java version"
@@ -121,8 +125,16 @@ sudo chmod 777 $TRAF_CONFIG
 source $TRAF_CONFIG
 
 #Copy hbase-site.xml file
+ssh -q -n $CDH_START_NODE sudo cp /etc/hbase/conf/hbase-site.xml $HOME
+ssh -q -n $CDH_START_NODE sudo chown $(whoami).$(whoami) $HOME/hbase-site.xml
+ssh -q -n $CDH_START_NODE sudo chmod 777 $HOME/hbase-site.xml
 
-scp -q $(whoami)@$CDH_START_NODE:/etc/hbase/conf/hbase-site.xml $TRAF_WORKDIR
+scp -q $(whoami)@$CDH_START_NODE:$HOME/hbase-site.xml $HOME
+if [[ $? -ne 0 ]]; then
+   echo "***ERROR: Unable to find /etc/hbase/conf/hbase-site.xml file on $CDH_START_NODE
or unable to copy."
+   exit -1
+fi
+sudo cp $HOME/hbase-site.xml $TRAF_WORKDIR
 sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_config_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_config_setup b/install/installer/traf_config_setup
index 8007168..dabeb4f 100755
--- a/install/installer/traf_config_setup
+++ b/install/installer/traf_config_setup
@@ -152,25 +152,23 @@ echo "export SQCONFIG=\"$SQCONFIG\"" >> $LOCAL_TRAF_CONFIG
 
 #==============================================
 # Password
-if [[ "$userForTrafodion" == "0" ]]; then
-   echo -n "Enter $TRAF_USER password, default is [$TRAF_USER_PASSWORD]: "
-   read answer
-   if [ -z $answer ]; then
-      echo "export TRAF_USER_PASSWORD=\"$TRAF_USER_PASSWORD\"" >> $LOCAL_TRAF_CONFIG
-   else
-      length=${#answer}
-      if [[ $length -lt "6" ]]; then
-         echo "***ERROR: Linux requires password to be at least 6 characters"
-         echo "***ERROR: Password length must be from 6-8 characters."
-         exit -1
-      fi
-      if [[ $length -gt "8" ]]; then
-         echo "***ERROR: VNC server requires passwords be 8 or less characters"
-         echo "***ERROR: Password length must be from 6-8 characters."
-         exit -1  
-      fi
-      echo "export TRAF_USER_PASSWORD=\"$answer\"" >> $LOCAL_TRAF_CONFIG
-   fi
+echo -n "Enter $TRAF_USER password, default is [$TRAF_USER_PASSWORD]: "
+read answer
+if [ -z $answer ]; then
+   echo "export TRAF_USER_PASSWORD=\"$TRAF_USER_PASSWORD\"" >> $LOCAL_TRAF_CONFIG
+else
+   length=${#answer}
+    if [[ $length -lt "6" ]]; then
+       echo "***ERROR: Linux requires password to be at least 6 characters"
+       echo "***ERROR: Password length must be from 6-8 characters."
+       exit -1
+    fi
+    if [[ $length -gt "8" ]]; then
+       echo "***ERROR: VNC server requires passwords be 8 or less characters"
+       echo "***ERROR: Password length must be from 6-8 characters."
+       exit -1  
+    fi
+    echo "export TRAF_USER_PASSWORD=\"$answer\"" >> $LOCAL_TRAF_CONFIG
 fi
 
 #==============================================
@@ -418,7 +416,7 @@ if [ $package -eq 0 ]; then
    echo "***INFO: assuming it is a Trafodion build only tar file"
    
    # since it is not a package tar file, we'll need to prompt for the DCS build file
-   echo -n "Enter location of DCS tar file [DCS_BUILD]: "
+   echo -n "Enter location of DCS tar file [$DCS_BUILD]: "
    read answer
    if [ -z $answer ]; then
       if [ -z $DCS_BUILD ]; then
@@ -474,6 +472,9 @@ echo "export REST_BUILD=\"$REST_BUILD\"" >> $LOCAL_TRAF_CONFIG
 if [[ -z $TRAF_BUILD ]]; then
    TRAF_BUILD=$(tar -tf $TRAF_PACKAGE | grep "trafodion_server")
    tar -xzf $TRAF_PACKAGE --directory $LOCAL_WORKDIR
+   TRAF_BUILD_PATH=$LOCAL_WORKDIR/$TRAF_BUILD
+else
+   TRAF_BUILD_PATH=$TRAF_BUILD
 fi
 
 if [[ -z $TRAF_BUILD ]]; then 
@@ -482,15 +483,23 @@ if [[ -z $TRAF_BUILD ]]; then
    exit -1
 fi
 
-install_features_path=$(tar -tf $LOCAL_WORKDIR/$TRAF_BUILD | grep "install_features")
+install_features_path=$(tar -tf $TRAF_BUILD_PATH | grep "install_features")
+
 
 if [[ ! -z $install_features_path ]]; then
-   tar -xzf $LOCAL_WORKDIR/$TRAF_BUILD $install_features_path
+   tar -xzf $TRAF_BUILD_PATH $install_features_path
    source $install_features_path
    echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $LOCAL_TRAF_CONFIG
+   if [[ -z $CDH_5_4_SUPPORT ]]; then
+      echo "export CDH_5_4_SUPPORT=\"N\"" >> $LOCAL_TRAF_CONFIG
+   else
+      echo "export CDH_5_4_SUPPORT=\"$CDH_5_4_SUPPORT\"" >> $LOCAL_TRAF_CONFIG
+   fi
 else
    CDH_5_3_HDP_2_2_SUPPORT="N"
+   CDH_5_4_SUPPORT="N"
    echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $LOCAL_TRAF_CONFIG
+   echo "export CDH_5_4_SUPPORT=\"$CDH_5_4_SUPPORT\"" >> $LOCAL_TRAF_CONFIG
 fi
 
 #>>> to allow failed installs to be rerun easily we need to do something
@@ -550,10 +559,10 @@ else
    exit -1
 fi
 
-hadoopVersion=$(curl -su $username:$password http://$URL/api/v1/clusters | grep version |
grep -c CDH)
+hadoopVersion=$(curl -su admin:admin http://$URL/api/v1/clusters | grep version | grep -c
CDH)
 
 if [[ $hadoopVersion -ne "1" ]]; then
-   hadoopVersion=$(curl -su $username:$password http://$URL/api/v1/clusters | grep version
| grep -c HDP)
+   hadoopVersion=$(curl -su admin:admin http://$URL/api/v1/clusters | grep version | grep
-c HDP)
    if [[ $hadoopVersion -ne "1" ]]; then
       echo "***ERROR: Hadoop type can not be determined"
       echo "***ERROR: Check that URL and port are correct or if Hadoop is up"
@@ -593,7 +602,7 @@ if [ -z $CLUSTER_NAME ]; then
 fi
 
 echo "export CLUSTER_NAME=\"$CLUSTER_NAME\"" >> $LOCAL_TRAF_CONFIG
-
+echo "export CLUSTERNAME=\"$CLUSTER_NAME\"" >> $LOCAL_TRAF_CONFIG
 #=============================================
 #Get Hadoop Nodes
 
@@ -736,28 +745,43 @@ do
       if [[ $HADOOP_TYPE == "cloudera" ]]; then
          if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
             #Check that Cloudera 5.2 or 5.3 are not installed.
-            versionInstalled=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[0-1].* | wc -l)
-            nameOfVersion=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[0-1].*)
-            if [[ $versionInstalled -eq "0" ]]; then
-               echo "***ERROR: Only Cloudera Versions 5.0.* or 5.1.* are currently supported"
-               echo "***ERROR: Detected Cloudera version:"
-               ssh -q -n $node cat hbaseVersion.txt
-               exit -1
+            if [[ "$CDH_5_4_SUPPORT" == "Y" ]]; then
+               nameOfVersion=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.4.*)
+               #Check that Cloudera 5.[n>3].* is not installed.
+               if [[ -z $nameOfVersion ]]; then
+                  versionInstalled=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed
's/,.*//' | sed 's/.*\-//' | grep cdh[5-6].[0-9].* | wc -l)
+                  if [[ $versionInstalled -gt "0" ]]; then
+                     echo "***ERROR: Trafodion and Cloudera versions may not be compatible"
+                     echo "***ERROR: Detected Cloudera version:"
+                     ssh -q -n $node cat hbaseVersion.txt
+                     exit -1
+                  fi
+               fi
+            else
+               versionInstalled=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[0-1].* | wc -l)
+               nameOfVersion=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[0-1].*)
+               if [[ $versionInstalled -eq "0" ]]; then
+                  echo "***ERROR: Only Cloudera Versions 5.0.* or 5.1.* are currently supported"
+                  echo "***ERROR: Detected Cloudera version:"
+                  ssh -q -n $node cat hbaseVersion.txt
+                  exit -1
+               fi
             fi
          else
             nameOfVersion=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh5.[2-3].*)
-         fi
 
-         #Check that Cloudera 5.[n>3].* is not installed.
-         if [[ -z $nameOfVersion ]]; then
-            versionInstalled=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh[4-6].[0-9].* | wc -l)
-            if [[ $versionInstalled -gt "0" ]]; then
-               echo "***ERROR: Trafodion and Cloudera versions may not be compatible"
-               echo "***ERROR: Trafodion 1.1.0 is compatible with Cloudera 5.2 and 5.3"
-               echo "***ERROR: Trafodion 1.0.1 and 1.0.0 are compatible with Cloudera 5.1.2
and 5.1.3"
-               echo "***ERROR: Detected Cloudera version:"
-               ssh -q -n $node cat hbaseVersion.txt
-               exit -1
+            #Check that Cloudera 5.[n>3].* is not installed.
+            if [[ -z $nameOfVersion ]]; then
+               versionInstalled=$(ssh -q -n $node grep "Version" hbaseVersion.txt | sed 's/,.*//'
| sed 's/.*\-//' | grep cdh[4-6].[0-9].* | wc -l)
+               if [[ $versionInstalled -gt "0" ]]; then
+                  echo "***ERROR: Trafodion and Cloudera versions may not be compatible"
+                  echo "***ERROR: Trafodion 1.2.0 is compatible with Cloudera 5.4"
+                  echo "***ERROR: Trafodion 1.1.0 is compatible with Cloudera 5.2 and 5.3"
+                  echo "***ERROR: Trafodion 1.0.1 and 1.0.0 are compatible with Cloudera
5.1.2 and 5.1.3"
+                  echo "***ERROR: Detected Cloudera version:"
+                  ssh -q -n $node cat hbaseVersion.txt
+                  exit -1
+               fi
             fi
          fi
          HADOOP_PATH="/usr/lib/hbase/lib"
@@ -861,7 +885,8 @@ fi
 #==============================================
 #DCS Servers
 
-echo -n "Total number of DCS servers to start, default [$DCS_SERVERS_PARM]: "
+DCS_SERVERS_PARM=$(($node_count * 8))
+echo -n "Total number of concurrent sessions to start, default [$DCS_SERVERS_PARM]: "
 read answer
 
 if [ ! -z $answer ]; then

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_hortonworks_mods98
----------------------------------------------------------------------
diff --git a/install/installer/traf_hortonworks_mods98 b/install/installer/traf_hortonworks_mods98
index 0121c06..10bbca3 100755
--- a/install/installer/traf_hortonworks_mods98
+++ b/install/installer/traf_hortonworks_mods98
@@ -112,8 +112,16 @@ fi
 
 
 #Copy hbase-site.xml file
+ssh -q -n $AMBARI_HOST sudo cp /etc/hbase/conf/hbase-site.xml $HOME
+ssh -q -n $AMBARI_HOST sudo chown $(whoami).$(whoami) $HOME/hbase-site.xml
+ssh -q -n $AMBARI_HOST sudo chmod 777 $HOME/hbase-site.xml
 
-scp -q $(whoami)@$AMBARI_HOST:/etc/hbase/conf/hbase-site.xml $TRAF_WORKDIR
+scp -q $(whoami)@$AMBARI_HOST:$HOME/hbase-site.xml $HOME
+if [[ $? -gt 1 ]]; then
+   echo "***ERROR: Unable to find /etc/hbase/conf/hbase-site.xml file on $CDH_START_NODE
or unable to copy."
+   exit -1
+fi
+sudo cp $HOME/hbase-site.xml $TRAF_WORKDIR
 sudo chown trafodion.trafodion $TRAF_WORKDIR/hbase-site.xml
 
 #=====================================

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_package_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_package_setup b/install/installer/traf_package_setup
new file mode 100755
index 0000000..5a2ef1d
--- /dev/null
+++ b/install/installer/traf_package_setup
@@ -0,0 +1,224 @@
+#!/bin/bash
+
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+#  Setup Trafodion environment on a Cluster System
+
+#==============================================
+
+timestamp=$(date +%F-%H-%M-%S)
+source /etc/trafodion/trafodion_config
+
+cd $LOCAL_WORKDIR
+
+echo "***Log File: traf_package_setup script***" >> $INSTALL_LOG
+echo >> $INSTALL_LOG
+echo "Username: $TRAF_USER" >> $INSTALL_LOG
+echo "Nodes: $NODE_LIST" >> $INSTALL_LOG
+echo "Home directory: $HOME_DIR" >> $INSTALL_LOG
+echo >> $INSTALL_LOG
+
+echo "***INFO: Starting Trafodion Package Setup ($timestamp)"
+#========================================
+#Setting up pdsh variables
+if [ $node_count -eq 1 ]; then
+    TRAF_PDSH=""
+    TRAF_PDCP=""
+else
+    # use the -S option to cause pdsh to return largest of
+    # the remote command return values so we can tell if one
+    # or more of the remote commands failed
+    TRAF_PDSH="pdsh -R exec $MY_NODES ssh -q -n %h"
+    TRAF_PDCP="pdcp -R ssh $MY_NODES"
+fi
+#==========================================
+echo "***INFO: Installing required packages"
+echo "***INFO: Log file located in /var/log/trafodion"
+YUM_LOG=/var/log/trafodion/trafodion_yum_$timestamp.log
+ZYPP_LOG=/var/log/trafodion/trafodion_zypp_$timestamp.log
+
+#===============================
+#Set internet access
+internetAccess="true"
+
+#================================
+#Checking to see if epel package is installed. 
+if [[ $SUSE_LINUX == "false" ]]; then
+   for node in $NODE_LIST;
+   do
+     EPEL_INSTALLED=$(ssh -q -n $node rpm -qa | grep epel | wc -l)
+     if [[ $EPEL_INSTALLED == 0 ]]; then
+        break;
+     fi
+   done
+
+   if [[ $EPEL_INSTALLED == 0 ]]; then
+      echo "***INFO: ... EPEL rpm"
+      if [[ "$EPEL_RPM" != "" ]]; then
+         if [ $node_count -ne 1 ]; then
+            for node in $NODE_LIST
+            do
+               scp -q $EPEL_RPM $(whoami)@$node:$HOME
+            done
+         else
+            cp -rf $EPEL_RPM $HOME
+         fi
+      else
+         if [[ $internetAccess == "true" ]]; then
+            epel_rpm="epel-release-6-8.noarch.rpm"
+            wget http://download.fedoraproject.org/pub/epel/6/x86_64/$epel_rpm
+            if [ $node_count -ne 1 ]; then
+               for node in $NODE_LIST
+               do
+                  scp -q $LOCAL_WORKDIR/$epel_rpm $(whoami)@$node:$HOME
+               done
+            else
+               cp -rf $epel_rpm $HOME
+            fi
+
+            if [ $? != 0 ]; then
+               echo "***ERROR: Can't download EPEL rpm $epel_rpm"
+               echo "***ERROR: Please check http_proxy settings in .bashrc file"
+               echo
+               exit -1
+            fi 
+         else
+            echo "***ERROR: No EPEL RPM installed"
+            echo "***ERROR: No internet access to do automatic install."
+            exit -1         
+         fi
+      fi
+   fi
+
+   for node in $NODE_LIST;
+   do
+     EPEL_INSTALLED=$( ssh -q -n $node rpm -qa | grep epel | wc -l)
+     if [[ $EPEL_INSTALLED == 0 ]]; then
+        ssh -q -n $node sudo rpm -Uvh $HOME/epel* 2>> $YUM_LOG >> $YUM_LOG
+        if [ $? != 0 ]; then
+           echo "***ERROR: Can't install EPEL rpm $EPEL_RPM"
+           exit -1
+        fi
+     fi
+   done
+
+else
+   echo 
+   echo
+   echo 
+   echo "***WARNING: This system is using SUSE Linux"
+   echo "***WARNING: pdsh must be installed prior to installing Trafodion."
+   echo "***WARNING: If pdsh has not been installed. Please stop the installer and install
pdsh"
+   echo 
+   echo 
+   sleep 10
+fi
+
+#install pdsh if not on SUSE Linux
+if [[ $SUSE_LINUX == "false" ]]; then
+   if [ $node_count -ne 1 ]; then
+      for node in $NODE_LIST
+      do
+          echo "***INFO: ... pdsh on node $node"
+          #if not already installed on this node, then install it
+          ssh -q -n $node rpm -qa | grep pdsh &> /dev/null
+          if [ $? -ne 0 ]; then
+             ssh -q -n $node sudo mkdir -p $TRAF_WORKDIR
+             ssh -q -n $node sudo mkdir -p /var/log/trafodion
+             if [[ $internetAccess == "true" ]]; then
+                ssh -q -n $node sudo yum --assumeyes install pdsh >> $YUM_LOG
+                if [ $? != 0 ]; then
+                   echo "***ERROR: Can't install pdsh on node $node"
+                   exit -1
+                fi
+             else
+                echo "***ERROR: Can't install pdsh on node $node"
+                echo "***ERROR: Must have pdsh installed on each node."
+                echo "***ERROR: No internet access to do automatic install."
+                exit -1
+             fi
+          fi
+      done
+      # create working directory on all nodes
+      $TRAF_PDSH sudo mkdir -p $TRAF_WORKDIR &> /dev/null
+      $TRAF_PDSH sudo chmod -R 777 $TRAF_WORKDIR
+      $TRAF_PDSH mkdir -p /var/log/trafodion &> /dev/null
+
+   fi
+fi
+
+$TRAF_PDSH sudo mkdir -p $TRAF_WORKDIR
+$TRAF_PDSH sudo chmod 777 $TRAF_WORKDIR
+
+if [[ $SUSE_LINUX == "false" ]]; then
+   # to handle the case where the EPEL rpm was already
+   # installed but disabled, we enable it here
+   # it doesn't hurt if it was already enabled and we try to enable it again
+   $TRAF_PDSH sudo yum-config-manager --enable RedHat-6-x86_64-Fedora-EPEL 2>> $YUM_LOG
>> $YUM_LOG
+
+   package_list="log4cxx sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate
perl-Time-HiRes gzip"
+   if [[ $internetAccess == "true" ]]; then
+      for package in $package_list
+      do
+         echo "***INFO: Checking if $package is installed ..."
+         for node in $NODE_LIST
+         do
+            installed=`ssh -q -n $node sudo rpm -qa | grep $package | wc -l`
+            if [[ $installed -eq "0" ]]; then
+               echo "***INFO: Installing $package on all nodes"
+               ssh -q -n $node sudo yum --assumeyes install $package 2>> $YUM_LOG >>
$YUM_LOG
+               if [ $? != 0 ]; then
+                  echo "***ERROR: Can't install $package"
+                  exit -1
+               fi
+            fi
+         done
+      done
+   else
+      for node in $NODE_LIST
+      do
+         echo "***ERROR: No internet access on $node"
+         echo "***ERROR: Missing packages will need to be installed."
+         echo "***ERROR: Missing packages: " 
+         for package in $package_list
+         do
+             installed=$(sudo rpm -qa | grep $package | wc -l)
+             if [[ $installed -eq "0" ]]; then
+                echo "$package"
+                stopInstall=true
+             fi
+         done
+      done
+      if [[ $stopInstall == "true" ]]; then
+         exit -1   
+      fi
+   fi
+else
+   echo
+   echo 
+   echo "***WARNING: All needed RPM's must be installed in advance to install Trafodion on
SUSE."
+   echo "***WARNING: log4cxx sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate
perl-Time-HiRes gzip"
+   echo "***WARNING: If any of these packages have not been installed. Stop Trafodion installation
and install."
+   echo 
+   echo 
+   sleep 10
+fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/traf_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_setup b/install/installer/traf_setup
index 4e7be35..2d4dbc2 100755
--- a/install/installer/traf_setup
+++ b/install/installer/traf_setup
@@ -108,177 +108,15 @@ fi
 internetAccess=true
  
 #==========================================
-echo "***INFO: Installing required packages"
-echo "***INFO: Log file located in /var/log/trafodion"
-YUM_LOG=/var/log/trafodion/trafodion_yum_$timestamp.log
-ZYPP_LOG=/var/log/trafodion/trafodion_zypp_$timestamp.log
+#installing required packages"
 
-#================================
-#Checking to see if epel package is installed. 
-if [[ $SUSE_LINUX == "false" ]]; then
-   for node in $NODE_LIST;
-   do
-     EPEL_INSTALLED=$(ssh -q -n $node rpm -qa | grep epel | wc -l)
-     if [[ $EPEL_INSTALLED == 0 ]]; then
-        break;
-     fi
-   done
-
-   if [[ $EPEL_INSTALLED == 0 ]]; then
-      echo "***INFO: ... EPEL rpm"
-      if [[ "$EPEL_RPM" != "" ]]; then
-         if [ $node_count -ne 1 ]; then
-            for node in $NODE_LIST
-            do
-               scp -q $EPEL_RPM $(whoami)@$node:$HOME
-            done
-         else
-            cp -rf $EPEL_RPM $HOME
-         fi
-      else
-         if [[ $internetAccess == "true" ]]; then
-            epel_rpm="epel-release-6-8.noarch.rpm"
-            wget http://download.fedoraproject.org/pub/epel/6/x86_64/$epel_rpm
-            if [ $node_count -ne 1 ]; then
-               for node in $NODE_LIST
-               do
-                  scp -q $LOCAL_WORKDIR/$epel_rpm $(whoami)@$node:$HOME
-               done
-            else
-               cp -rf $epel_rpm $HOME
-            fi
-
-            if [ $? != 0 ]; then
-               echo "***ERROR: Can't download EPEL rpm $epel_rpm"
-               echo "***ERROR: Please check http_proxy settings in .bashrc file"
-               echo
-               exit -1
-            fi 
-         else
-            echo "***ERROR: No EPEL RPM installed"
-            echo "***ERROR: No internet access to do automatic install."
-            exit -1         
-         fi
-      fi
-   fi
-
-   for node in $NODE_LIST;
-   do
-     EPEL_INSTALLED=$( ssh -q -n $node rpm -qa | grep epel | wc -l)
-     if [[ $EPEL_INSTALLED == 0 ]]; then
-        ssh -q -n $node sudo rpm -Uvh $HOME/epel* 2>> $YUM_LOG >> $YUM_LOG
-        if [ $? != 0 ]; then
-           echo "***ERROR: Can't install EPEL rpm $EPEL_RPM"
-           exit -1
-        fi
-     fi
-   done
-
-else
-   echo 
-   echo
-   echo 
-   echo "***WARNING: This system is using SUSE Linux"
-   echo "***WARNING: pdsh must be installed prior to installing Trafodion."
-   echo "***WARNING: If pdsh has not been installed. Please stop the installer and install
pdsh"
-   echo 
-   echo 
-   sleep 10
-fi
-
-#install pdsh if not on SUSE Linux
-if [[ $SUSE_LINUX == "false" ]]; then
-   if [ $node_count -ne 1 ]; then
-      for node in $NODE_LIST
-      do
-          echo "***INFO: ... pdsh on node $node"
-          #if not already installed on this node, then install it
-          ssh -q -n $node rpm -qa | grep pdsh &> /dev/null
-          if [ $? -ne 0 ]; then
-             ssh -q -n $node sudo mkdir -p $TRAF_WORKDIR
-             ssh -q -n $node sudo mkdir -p /var/log/trafodion
-             if [[ $internetAccess == "true" ]]; then
-                ssh -q -n $node sudo yum --assumeyes install pdsh >> $YUM_LOG
-                if [ $? != 0 ]; then
-                   echo "***ERROR: Can't install pdsh on node $node"
-                   exit -1
-                fi
-             else
-                echo "***ERROR: Can't install pdsh on node $node"
-                echo "***ERROR: Must have pdsh installed on each node."
-                echo "***ERROR: No internet access to do automatic install."
-                exit -1
-             fi
-          fi
-      done
-      # create working directory on all nodes
-      $TRAF_PDSH sudo mkdir -p $TRAF_WORKDIR &> /dev/null
-      $TRAF_PDSH sudo chmod -R 777 $TRAF_WORKDIR
-      $TRAF_PDSH mkdir -p /var/log/trafodion &> /dev/null
+$LOCAL_WORKDIR/traf_package_setup
 
-   fi
+if [ $? != 0 ]; then
+    echo "***ERROR: Error installing required packages"
+    exit -1
 fi
 
-$TRAF_PDSH sudo mkdir -p $TRAF_WORKDIR
-$TRAF_PDSH sudo chmod 777 $TRAF_WORKDIR
-
-if [[ $SUSE_LINUX == "false" ]]; then
-   # to handle the case where the EPEL rpm was already
-   # installed but disabled, we enable it here
-   # it doesn't hurt if it was already enabled and we try to enable it again
-   $TRAF_PDSH sudo yum-config-manager --enable RedHat-6-x86_64-Fedora-EPEL 2>> $YUM_LOG
>> $YUM_LOG
-
-   package_list="log4cxx sqlite "
-   package_list+="expect perl-DBD-SQLite* protobuf xerces-c "
-   package_list+="perl-Params-Validate perl-Time-HiRes gzip"
-
-   if [[ $internetAccess == "true" ]]; then
-      for package in $package_list
-      do
-         echo "***INFO: Checking if $package is installed ..."
-         for node in $NODE_LIST
-         do
-            installed=`ssh -q -n $node sudo rpm -qa | grep $package | wc -l`
-            if [[ $installed -eq "0" ]]; then
-               echo "***INFO: Installing $package on all nodes"
-               ssh -q -n $node sudo yum --assumeyes install $package 2>> $YUM_LOG >>
$YUM_LOG
-               if [ $? != 0 ]; then
-                  echo "***ERROR: Can't install $package"
-                  exit -1
-               fi
-               break
-            fi
-         done
-      done
-   else
-      for node in $NODE_LIST
-      do
-         echo "***ERROR: No internet access on $node"
-         echo "***ERROR: Missing packages will need to be installed."
-         echo "***ERROR: Missing packages: " 
-         for package in $package_list
-         do
-             installed=$(sudo rpm -qa | grep $package | wc -l)
-             if [[ $installed -eq "0" ]]; then
-                echo "$package"
-                stopInstall=true
-             fi
-         done
-      done
-      if [[ $stopInstall == "true" ]]; then
-         exit -1   
-      fi
-   fi
-else
-   echo
-   echo 
-   echo "***WARNING: All needed RPM's must be installed in advance to install Trafodion on
SUSE."
-   echo "***WARNING: log4cxx sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate
perl-Time-HiRes gzip"
-   echo "***WARNING: If any of these packages have not been installed. Stop Trafodion installation
and install."
-   echo 
-   echo 
-   sleep 10
-fi
 #================================
 # Set some limits needed by Trafodion
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/trafodion_config_default
----------------------------------------------------------------------
diff --git a/install/installer/trafodion_config_default b/install/installer/trafodion_config_default
index 7b054c7..b8bb19f 100755
--- a/install/installer/trafodion_config_default
+++ b/install/installer/trafodion_config_default
@@ -125,6 +125,9 @@ export PASSWORD="admin"
 # hadoop cluster name
 export CLUSTER_NAME=""
 
+#Trafodion Cluster name, normally the same as Cloudera cluster name
+export CLUSTERNAME=""
+
 # the Hadoop HDFS userid
 export HDFS_USER="hdfs"
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/330a6ea4/install/installer/trafodion_install
----------------------------------------------------------------------
diff --git a/install/installer/trafodion_install b/install/installer/trafodion_install
index 2fc2267..531f1cd 100755
--- a/install/installer/trafodion_install
+++ b/install/installer/trafodion_install
@@ -413,8 +413,15 @@ if [[ -n "$USER_CONFIG" ]]; then
          tar -xzf $TRAF_BUILD $install_features_path
          source $install_features_path
          echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $TRAF_CONFIG
+          if [[ -z $CDH_5_4_SUPPORT ]]; then
+             echo "export CDH_5_4_SUPPORT=\"N\"" >> $LOCAL_TRAF_CONFIG
+          else
+             echo "export CDH_5_4_SUPPORT=\"$CDH_5_4_SUPPORT\"" >> $LOCAL_TRAF_CONFIG
+          fi
       else
          CDH_5_3_HDP_2_2_SUPPORT="N"
+         CDH_5_4_SUPPORT="N"
+         echo "export CDH_5_4_SUPPORT=\"$CDH_5_4_SUPPORT\"" >> $TRAF_CONFIG
          echo "export CDH_5_3_HDP_2_2_SUPPORT=\"$CDH_5_3_HDP_2_2_SUPPORT\"" >> $TRAF_CONFIG
       fi
    fi
@@ -449,10 +456,18 @@ do
       fi
       if [[ $HADOOP_TYPE == "cloudera" ]]; then
          if [[ $CDH_5_3_HDP_2_2_SUPPORT == "N" ]]; then
-            supportedHBase=$(echo $version | grep "0.98.1" | wc -l)
-            if [[ $supportedHBase -eq "0" ]]; then
-               echo "***ERROR: HBase installed must be 0.98.1 on node $node"
-               exit -1
+            if [[ $CDH_5_4_SUPPORT == "Y" ]]; then
+               supportedHBase=$(echo $version | grep "1.0.0" | wc -l)
+               if [[ $supportedHBase -eq "0" ]]; then
+                  echo "***ERROR: HBase installed must be 1.0.0 on node $node"
+                  exit -1
+               fi
+            else 
+               supportedHBase=$(echo $version | grep "0.98.1" | wc -l)
+               if [[ $supportedHBase -eq "0" ]]; then
+                  echo "***ERROR: HBase installed must be 0.98.1 on node $node"
+                  exit -1
+               fi
             fi
          else
             supportedHBase=$(echo $version | grep "0.98.6" | wc -l)
@@ -462,11 +477,6 @@ do
             fi
          fi
       fi
-      hbaseVersion=$(echo "${version#*.}"| cut -f1 -d".")
-      if [[ $hbaseVersion -lt "98" ]]; then
-         echo "***ERROR: HBase installed must be 0.98"
-         exit -1
-      fi
       hbaseVersion=$(ssh -q -n $node grep "Version" $HOME/hbaseVersion.txt | sed 's/-.*//'
| awk {'print$2'})
       break
    fi
@@ -574,9 +584,9 @@ echo "******************************"
 echo
 
 if [[ "$UPGRADE_TRAF" == "true" ]]; then
-
-   sed -i -e "s@export NODE_LIST=.*@export NODE_LIST=\"$NODE_LIST\"@" $HOME_DIR/$TRAF_USER/.bashrc
  
-   sed -i -e "s@export MY_NODES=.*@export MY_NODES=\"$NODE_LIST\"@" $HOME_DIR/$TRAF_USER/.bashrc
+   sudo chmod 777 $HOME_DIR/$TRAF_USER/.bashrc
+   sudo sed -i -e "s@export NODE_LIST=.*@export NODE_LIST=\"$NODE_LIST\"@" $HOME_DIR/$TRAF_USER/.bashrc
  
+   sudo sed -i -e "s@export MY_NODES=.*@export MY_NODES=\"$MY_NODES\"@" $HOME_DIR/$TRAF_USER/.bashrc
    
    for node in $NODE_LIST
    do
@@ -591,6 +601,13 @@ if [[ "$UPGRADE_TRAF" == "true" ]]; then
          else
             echo "***INFO: Trafodion environment setup completed" | tee -a $INSTALL_LOG
          fi
+      else
+         echo "***INFO: Installing required RPM packages" | tee -a $INSTALL_LOG
+         $LOCAL_WORKDIR/traf_package_setup | tee -a $INSTALL_LOG
+         if [ $? != 0 ]; then
+            echo "***ERROR: Unable to create Trafodion userid: $TRAF_USER"
+            exit -1
+         fi
       fi
    done  
    
@@ -640,15 +657,15 @@ do
    redhatSystem=$(ssh -q -n $node '/sbin/sysctl net.ipv4.ip_local_reserved_ports | wc -l')
    if [[ "$redhatSystem" -ge "1" ]]; then
       reserved_ports=$(ssh -q -n $node '/sbin/sysctl net.ipv4.ip_local_reserved_ports' |
awk -F'=' '{print $2;}' | sed 's/^ //')
-      ssh -q -n $node 'sudo chmod 777 /etc/sysctl.conf'
-      ssh -q -n $node 'sudo sed -i '/net.ipv4.ip_local_reserved_ports""\=*/d' /etc/sysctl.conf'
+      ssh -q -n $node 'sudo chmod 777 /etc/sysctl.conf' 2>&1 > /dev/null
+      ssh -q -n $node 'sudo sed -i '/net.ipv4.ip_local_reserved_ports""\=*/d' /etc/sysctl.conf'
2>&1 > /dev/null
 
    if [[ -z "${reserved_ports}" ]]; then
-      ssh -q -n $node "sudo echo "$reservedTrafodionPorts" >> /etc/sysctl.conf"
+      ssh -q -n $node "sudo echo "$reservedTrafodionPorts" >> /etc/sysctl.conf" 2>&1
> /dev/null
    else
-      ssh -q -n $node "sudo echo "$reservedTrafodionPorts","$reserved_ports" >> /etc/sysctl.conf"
+      ssh -q -n $node "sudo echo "$reservedTrafodionPorts","$reserved_ports" >> /etc/sysctl.conf"
2>&1 > /dev/null
    fi
-   ssh -q -n $node 'sudo chmod 644 /etc/sysctl.conf'
+   ssh -q -n $node 'sudo chmod 644 /etc/sysctl.conf' 2>&1 > /dev/null
    ssh -q -n $node 'sudo /sbin/sysctl -p' 2>&1 > /dev/null
    else
       echo "***ERROR: Unable to reserve DCS ports (${trafodion_ports})."
@@ -658,7 +675,7 @@ done
 
 #Set Max kernel pid 
 
-$TRAF_PDSH sudo sysctl -w kernel.pid_max=65535
+$TRAF_PDSH sudo sysctl -w kernel.pid_max=65535 2>&1 > /dev/null
 
 
 #Create install directory


Mime
View raw message