From 2d75fd3ca89656d40c82a162bb96151266b1982d Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Wed, 9 Dec 2015 08:52:07 -0600 Subject: modified to craete rc file consume by various tests. Change-Id: Ibedcd8def9cb94c9a06e8dd2e90003b2184e0a49 --- ci/deploy.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/ci/deploy.sh b/ci/deploy.sh index b98d2145..81f39b6a 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -85,6 +85,31 @@ check_status() { echo "...... deployment finishing ......." } +configOpenrc() +{ + cat <<-EOF + export OS_USERNAME=$1 + export OS_PASSWORD=$2 + export OS_TENANT_NAME=$3 + export OS_AUTH_URL=$4 + export OS_REGION_NAME=$5 + EOF +} + +unitAddress() +{ + juju status | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null +} + +createopenrc() +{ + mkdir -m 0700 -p cloud + + controller_address=$(unitAddress keystone 0) + configOpenrc admin openstack admin http://$controller_address:5000/v2.0 Canonical > cloud/admin-openrc + chmod 0600 cloud/admin-openrc +} + if [ "$#" -eq 0 ]; then echo "This installtion will use deploy.yaml" read_config @@ -94,6 +119,12 @@ echo "...... deployment started ......" #deploy_dep deploy check_status - echo "...... deployment finished ......." +echo "...... creating OpenRc file for consuming by various user ......." + +createopenrc + +echo "...... finished ......." + + -- cgit 1.2.3-korg