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 10:42:44 +0000
commit6be6dcd2ae6997b45e82762b44d2e56d34f17814 (patch)
tree66cffc1565ea9fc71a3fdc806a545de36e642ffd
parent314a28c3ad9b10fa1468fe9c8f484e3d8036065b (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> (cherry picked from commit 08349e676cf2a07616d6ae2ad3115f325760f1e5)
-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 bcd4c24..bf316b4 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 6a4dd53..2fb0d22 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