summaryrefslogtreecommitdiffstats
path: root/ci/openstack.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/openstack.sh')
-rwxr-xr-xci/openstack.sh35
1 files changed, 23 insertions, 12 deletions
diff --git a/ci/openstack.sh b/ci/openstack.sh
index 4fdf1f96..ed082b9b 100755
--- a/ci/openstack.sh
+++ b/ci/openstack.sh
@@ -95,11 +95,15 @@ create_openrc() {
v3api=`juju config keystone preferred-api-version`
if [[ "$v3api" == "3" ]]; then
- configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne > ~/joid_config/admin-openrc
+ configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne publicURL > ~/joid_config/admin-openrc
chmod 0600 ~/joid_config/admin-openrc
source ~/joid_config/admin-openrc
projectid=`openstack project show admin -c id -f value`
- configOpenrc admin $adminPasswd admin http://$keystoneIp:5000/v3 RegionOne $projectid > ~/joid_config/admin-openrc
+ projectdomainid=`openstack domain show admin_domain -c id -f value`
+ userdomainid=`openstack user show admin -c domain_id -f value`
+ urlapi=`openstack catalog show keystone --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)['endpoints']" | grep public | cut -d " " -f 4`
+ configOpenrc admin $adminPasswd admin $urlapi RegionOne publicURL $projectid $projectdomainid $userdomainid > ~/joid_config/admin-openrcinternal
+ configOpenrc admin $adminPasswd admin $urlapi RegionOne publicURL $projectid $projectdomainid $userdomainid > ~/joid_config/admin-openrc
else
configOpenrc2 admin $adminPasswd admin http://$keystoneIp:5000/v2.0 RegionOne > ~/joid_config/admin-openrc
chmod 0600 ~/joid_config/admin-openrc
@@ -121,21 +125,28 @@ EOF
configOpenrc() {
cat <<-EOF
-# unsetting v3 items in case set
-export OS_AUTH_URL=$4
+export OS_NO_CACHE='true'
+export OS_TENANT_NAME=$3
+#export OS_TENANT_ID=$7
+export OS_PROJECT_NAME=$3
export OS_USERNAME=$1
export OS_PASSWORD=$2
+export OS_IDENTITY_API_VERSION=3
+export OS_DEFAULT_DOMAIN=admin_domain
export OS_USER_DOMAIN_NAME=admin_domain
+export OS_USER_DOMAIN_ID=$9
export OS_PROJECT_DOMAIN_NAME=admin_domain
-export OS_PROJECT_NAME=$3
-export OS_TENANT_NAME=$3
-export OS_TENANT_ID=$6
+export OS_PROJECT_DOMAIN_ID=$8
+export OS_AUTH_STRATEGY='keystone'
export OS_REGION_NAME=$5
-export OS_IDENTITY_API_VERSION=3
-# Swift needs this:
-export OS_ENDPOINT_TYPE=publicURL
+export CINDER_ENDPOINT_TYPE=$6
+export GLANCE_ENDPOINT_TYPE=$6
+export KEYSTONE_ENDPOINT_TYPE=$6
+export NOVA_ENDPOINT_TYPE=$6
+export NEUTRON_ENDPOINT_TYPE=$6
+export OS_ENDPOINT_TYPE=$6
export OS_INTERFACE=public
-export OS_AUTH_VERSION=3
+export OS_AUTH_URL=$4
EOF
}
@@ -159,7 +170,7 @@ if [ "$API_FQDN" != "None" ]; then
fi"
# remove this enhancement for heat that does not manage endpoints
- juju run --service=heat "cp /etc/hosts /tmp/hosts ; \
+ juju run --application=heat "cp /etc/hosts /tmp/hosts ; \
grep -v $API_FQDN /tmp/hosts > /etc/hosts"
#change in jumphost as well as below commands will run on jumphost