summaryrefslogtreecommitdiffstats
path: root/ci/generate-admin-rc.sh
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-09-12 16:34:24 -0400
committermbeierl <mark.beierl@dell.com>2017-09-14 14:52:26 -0400
commitf92f97f53e3ee43c5d3b75673122ec9f94db196e (patch)
tree51e284845da8b9d9797d05210a58660061f9d1fa /ci/generate-admin-rc.sh
parent9b2ba68b75ecd50600e6f375aeb4ea410cec0128 (diff)
Add Multi Arch to Docker
Adds multi arch support to the launching of the containers. Change-Id: Iee89cfad3dc455fe8fdd7861d73fadbe314c2c1e JIRA: STORPERF-220 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/generate-admin-rc.sh')
-rwxr-xr-xci/generate-admin-rc.sh30
1 files changed, 20 insertions, 10 deletions
diff --git a/ci/generate-admin-rc.sh b/ci/generate-admin-rc.sh
index 3c0b33a..e1e6bc9 100755
--- a/ci/generate-admin-rc.sh
+++ b/ci/generate-admin-rc.sh
@@ -8,21 +8,20 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-cd `dirname $0`
-
-# TODO: Switch based on installer type, for now this is hard coded to JOID only
+cd $(dirname "$0")
if [ ! -d job ]
then
mkdir job
fi
-export INSTALLER=`./detect_installer.sh`
+SSH_KEY=""
+INSTALLER="$(./detect_installer.sh)"
case $INSTALLER in
joid)
- export OS_AUTH_URL=http://`juju status keystone | grep public | awk '{print $2}'`:5000/v2.0
- export OS_USERNAME=admin
- export OS_PASSWORD=openstack
+ OS_AUTH_URL=http://`juju status keystone | grep public | awk '{print $2}'`:5000/v2.0
+ OS_USERNAME=admin
+ OS_PASSWORD=openstack
cat << EOF > job/openstack.rc
export OS_AUTH_URL=$OS_AUTH_URL
export OS_USERNAME=$OS_USERNAME
@@ -31,14 +30,25 @@ export OS_TENANT_NAME=admin
export OS_PROJECT_NAME=admin
EOF
;;
+ fuel)
+ INSTALLER_IP=$(sudo virsh domifaddr cfg01 | grep ipv4 | awk '{print $4}' | cut -d/ -f1)
+ export BRANCH="${BRANCH:-master}"
+ SSH_KEY="-s /var/lib/opnfv/mcp.rsa"
+ ;;
apex)
- INSTALLER_IP=`sudo virsh domifaddr undercloud | grep ipv4 | awk '{print $4}' | cut -d/ -f1`
+ INSTALLER_IP=$(sudo virsh domifaddr undercloud | grep ipv4 | awk '{print $4}' | cut -d/ -f1)
;;
+ *)
+ echo "Unknown installer ${INSTALLER}"
+ exit 1
esac
-if [ ! -z $INSTALLER_IP ]
+if [ ! -z "${INSTALLER_IP}" ]
then
- ./job/releng/utils/fetch_os_creds.sh -i $INSTALLER -a $INSTALLER_IP -d job/openstack.rc
+ CMD="./job/releng/utils/fetch_os_creds.sh -i $INSTALLER -a $INSTALLER_IP $SSH_KEY -d job/openstack.rc"
+ echo $CMD
+ $CMD
+
echo export OS_PROJECT_NAME=admin >> job/openstack.rc
fi