added informational messages for aws configuration
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/fc9f514e Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/fc9f514e Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/fc9f514e Branch: refs/heads/master Commit: fc9f514e0adca3496613ead047ca24d79381970d Parents: 9ef2954 Author: Anuradha Hegde <[email protected]> Authored: Fri Jan 8 19:32:37 2016 +0000 Committer: Anuradha Hegde <[email protected]> Committed: Fri Jan 8 19:32:37 2016 +0000 ---------------------------------------------------------------------- install/installer/cloud_cli_setup | 30 ++++++++++++++++++++---------- install/installer/trafodion_install | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fc9f514e/install/installer/cloud_cli_setup ---------------------------------------------------------------------- diff --git a/install/installer/cloud_cli_setup b/install/installer/cloud_cli_setup index 1bab234..725418f 100755 --- a/install/installer/cloud_cli_setup +++ b/install/installer/cloud_cli_setup @@ -28,17 +28,16 @@ source $TRAF_CONFIG if [ $node_count -eq 1 ]; then TRAF_PDSH="" - TRAF_PDCP="" + TRAF_PDCP="/bin/cp" else TRAF_PDSH="pdsh $MY_NODES" TRAF_PDCP="pdcp -r $MY_NODES" fi ###### Setting up CLI for AWS as sudo id -if [[ ! -z $AWS_CLOUD ]]; then - ###### Check if aws configuration file exist for Trafodion Id - AWSCONFIG_DIR=`sudo su $TRAF_USER --login --command "ls -altr | grep -w ".aws" | wc -l" ` - if [[ $AWSCONFIG_DIR == 0 ]]; then + +###### Check for existence of aws +if [[ ! -d /usr/local/aws ]]; then cd $HOME curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" unzip $HOME/awscli-bundle.zip @@ -47,12 +46,18 @@ if [[ ! -z $AWS_CLOUD ]]; then $TRAF_PDCP $HOME/awscli-bundle $HOME $TRAF_PDSH "sudo $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws" | tee -a $INSTALL_LOG else - $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws | tee -a $INSTALL_LOG + sudo $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws | tee -a $INSTALL_LOG fi $TRAF_PDSH "sudo rm -rf $HOME/awscli-bundle" rm -f $HOME/awscli-bundle.zip +fi +###### Check for existence of .aws for trafodion id +if [[ ! -z $AWS_CLOUD ]]; then + ###### Check if aws configuration file exist for Trafodion Id + AWSCONFIG_DIR=`sudo su $TRAF_USER --login --command "ls -altr | grep -w ".aws" | wc -l" ` + if [[ $AWSCONFIG_DIR == 0 ]]; then ###### Execute 'aws configure' command as a Trafodion Id echo echo "***INFO: Configuring AWS keys for executing CLI commands" @@ -62,9 +67,10 @@ if [[ ! -z $AWS_CLOUD ]]; then ###### Copy the .aws folder to all nodes in the cluster for Trafodion Id sudo su $TRAF_USER --login --command "$TRAF_PDCP $HOME_DIR/$TRAF_USER/.aws $HOME_DIR/$TRAF_USER" echo - echo "***INFO: AWS configuration located in $HOME_DIR/$TRAF_USER/.aws" + echo "***INFO: AWS configuration for trafodion id located in $HOME_DIR/$TRAF_USER/.aws" echo else + echo echo "AWS Configuration already exist for Trafodion Id" echo -n "Do you want to overwrite the configuration (Y/N), default is N: " read answer @@ -79,9 +85,13 @@ if [[ ! -z $AWS_CLOUD ]]; then ###### Copy the .aws folder to all nodes in the cluster for Trafodion Id sudo su $TRAF_USER --login --command "$TRAF_PDCP $HOME_DIR/$TRAF_USER/.aws $HOME_DIR/$TRAF_USER" echo - echo "***INFO: AWS configuration located in $HOME_DIR/$TRAF_USER/.aws" + echo "***INFO: AWS configuration for trafodion id located in $HOME_DIR/$TRAF_USER/.aws" + echo + else + echo + echo "***INFO: Skipping AWS configuration setup" echo fi - fi - fi + fi + fi fi http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fc9f514e/install/installer/trafodion_install ---------------------------------------------------------------------- diff --git a/install/installer/trafodion_install b/install/installer/trafodion_install index 54ad7c8..8cc2224 100755 --- a/install/installer/trafodion_install +++ b/install/installer/trafodion_install @@ -718,7 +718,7 @@ if [[ "$LDAP_SECURITY" == "Y" ]]; then $TRAF_PDSH sudo chmod 750 $HOME_DIR/$TRAF_USER/$LDAP_AUTH_FILE if [[ $LDAP_LEVEL == "2" ]] || [[ $LDAP_LEVEL == "1" ]]; then echo "***INFO: Copying $LDAP_CERT to Trafodion home dir" - $TRAF_PCP $LDAP_CERT $HOME + $TRAF_PDCP $LDAP_CERT $HOME $TRAF_PDSH sudo cp -r $HOME/$LDAP_CERT_BASE $HOME_DIR/$TRAF_USER $TRAF_PDSH sudo chown trafodion.trafodion $HOME_DIR/$TRAF_USER/$LDAP_CERT_BASE $TRAF_PDSH sudo chmod 750 $HOME_DIR/$TRAF_USER/$LDAP_CERT_BASE
