diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2015-12-09 08:52:07 -0600 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2015-12-09 08:52:07 -0600 |
commit | 2d75fd3ca89656d40c82a162bb96151266b1982d (patch) | |
tree | bb8cca2a5c42146814de5286c81b951f37cc3e45 /ci | |
parent | 5c09d22e91046a2888dcf66f094f4f799ab93d3b (diff) |
modified to craete rc file consume by various tests.
Change-Id: Ibedcd8def9cb94c9a06e8dd2e90003b2184e0a49
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/deploy.sh | 33 |
1 files changed, 32 insertions, 1 deletions
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 ......." + + |