diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-10-17 18:19:35 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-10-17 18:32:08 -0500 |
commit | e9d7bab1c99f0c5cbac1265d3cbd661bc9c62dbc (patch) | |
tree | 9b87b5e68995a21b0b2f57144ef46f681fd82554 | |
parent | 5374c788e4f35c8295544e9be10523afcb7a17e7 (diff) |
modified the determination of keystone ip in case of HA.
Change-Id: I169cc86555c69cd705515be22a0c6e82e4b47132
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
-rwxr-xr-x | ci/openstack.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ci/openstack.sh b/ci/openstack.sh index a5b8a8ca..1e759ff7 100755 --- a/ci/openstack.sh +++ b/ci/openstack.sh @@ -71,8 +71,7 @@ unitMachine() { } keystoneIp() { - KEYSTONE=$(juju status keystone --format=short | grep " keystone") - if [ $(echo $KEYSTONE|wc -l) == 1 ];then + if [ $(juju status keystone --format=short | grep " keystone"|wc -l) == 1 ];then unitAddress keystone 0 else if [[ "$jujuver" < "2" ]]; then @@ -93,13 +92,16 @@ create_openrc() { adminPasswd=$(juju config keystone | grep admin-password -A 5 | grep value | awk '{print $2}' 2> /dev/null) fi - configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v2.0 RegionOne > ~/joid_config/admin-openrc + configOpenrc admin $adminPasswd admin http://$keystoneIp:35357/v2.0 RegionOne > ~/joid_config/admin-openrc chmod 0600 ~/joid_config/admin-openrc } configOpenrc() { if [ "$API_FQDN" != "None" ]; then cat <<-EOF + export SERVICE_ENDPOINT=$4 + unset SERVICE_TOKEN + unset SERVICE_ENDPOINT export OS_USERNAME=$1 export OS_PASSWORD=$2 export OS_TENANT_NAME=$3 @@ -114,6 +116,9 @@ if [ "$API_FQDN" != "None" ]; then EOF else cat <<-EOF + export SERVICE_ENDPOINT=$4 + unset SERVICE_TOKEN + unset SERVICE_ENDPOINT export OS_USERNAME=$1 export OS_PASSWORD=$2 export OS_TENANT_NAME=$3 @@ -159,7 +164,7 @@ fi # Create an load openrc create_openrc -. ./cloud/admin-openrc +. ~/joid_config/admin-openrc echo "...... deploy public api proxy ......" |