aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNauman_Ahad <nauman.ahad@xflowresearch.com>2016-02-23 15:24:29 +0500
committerNauman_Ahad <nauman.ahad@xflowresearch.com>2016-02-23 15:41:37 +0500
commit08349e676cf2a07616d6ae2ad3115f325760f1e5 (patch)
tree66cffc1565ea9fc71a3fdc806a545de36e642ffd
parent4fc4048a57a18a1eb5003e611f85824be8f091eb (diff)
Resolved bug for Compass CI Jobs
Resolved problem for ssh into baremetal nodes. Capability for CI Jobs through Apex also added Change-Id: Ide34b97f97269750e8ec3d6f18ca693d28359223 Signed-off-by: Nauman_Ahad <nauman.ahad@xflowresearch.com>
-rwxr-xr-xdata/qtip_creds.sh8
-rwxr-xr-xget_env_info.sh21
2 files changed, 23 insertions, 6 deletions
diff --git a/data/qtip_creds.sh b/data/qtip_creds.sh
index bcd4c246..bf316b4d 100755
--- a/data/qtip_creds.sh
+++ b/data/qtip_creds.sh
@@ -6,19 +6,21 @@ echo $INSTALLER_IP
sshoptions="-o StrictHostKeyChecking=no"
case "$INSTALLER_TYPE" in
apex)
- PSWD="vagrant"
+ scp $sshoptions -i $APEX_KEY ./data/QtipKey.pub stack@$INSTALLER_IP:/home/stack
+ scp $sshoptions -i $APEX_KEY ./data/QtipKey stack@$INSTALLER_IP:/home/stack
+ ssh $sshoptions -i $APEX_KEY stack@$INSTALLER_IP "ssh-copy-id $sshoptions -i /home/stack/QtipKey.pub heat-admin@$DEST_IP && rm -rf /home/stack/QtipKey && rm -rf /home/stack/QtipKey.pub"
;;
fuel)
PSWD="r00tme"
sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
- sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
+ sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id $sshoptions -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
;;
compass)
PSWD="root"
sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
- sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
+ sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id $sshoptions -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
;;
joid)
PSWD="joid";;
diff --git a/get_env_info.sh b/get_env_info.sh
index 6a4dd530..2fb0d22b 100755
--- a/get_env_info.sh
+++ b/get_env_info.sh
@@ -1,22 +1,37 @@
#! /bin/bash
usage() {
- echo "usage $0 -n <installer_type> -i <installer_ip>"
+ echo "usage $0 -n <installer_type> -i <installer_ip> -k <key incase of apex>"
}
-while getopts ":n:i:" optchar; do
+while getopts ":n:i:k:" optchar; do
case "${optchar}" in
n)
- export INSTALLER_TYPE=${OPTARG};;
+ export INSTALLER_TYPE=${OPTARG};;
i)
export INSTALLER_IP=${OPTARG};;
+ k)
+ export APEX_KEY=${OPTARG};;
+
*)
echo "Incorrect usage"
usage ;;
esac
done
+
+if [ $INSTALLER_TYPE == "apex" ]
+ then
+ if [ -z $APEX_KEY ]
+ then
+ echo "Please provide the the key to access the APEX Instack VM"
+ usage
+ exit 1
+ fi
+fi
+
+
./data/fetch_os_creds.sh -d ./opnfv-creds.sh