diff options
author | Dimitri Mazmanov <dimitri.mazmanov@ericsson.com> | 2016-11-22 11:39:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-11-22 11:39:03 +0000 |
commit | 5063ff27231b2d5a6a617392f3c282d5637096aa (patch) | |
tree | 81d6adb07b1650f3730505c3df3e022733915c59 /tools/keystone | |
parent | 01ada341470f55fd16bdb8c8c2af02d191b699f7 (diff) | |
parent | 4b9f995a95f1b56cc729ebe087200de01944360e (diff) |
Merge "Add new region registration script"
Diffstat (limited to 'tools/keystone')
-rwxr-xr-x | tools/keystone/region.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/keystone/region.sh b/tools/keystone/region.sh new file mode 100755 index 0000000..f3b0180 --- /dev/null +++ b/tools/keystone/region.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# Author: Dimitri Mazmanov (dimitri.mazmanov@ericsson.com) +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# + +set -o xtrace +set -o errexit +set -o nounset +set -o pipefail +source openrc + +# This script registers a new OpenStack region in Keystone. +# It relies on availability of the following environment variables +# +# $NEW_PUBLIC_URL - public URL for the OpenStack services +# $NEW_INTERNAL_URL - internal URL for the OpenStack services +# $NEW_ADMIN_URL - admin URL for the OpenStack services. Typically the same as internal URL +# $NEW_REGION - new region name. E.g. RegionTwo +# +# Invoke the script on the master region - the region which hosts a centralized Keystone instance. +# Additional services can be register using the following pattern: +# +# openstack endpoint create --publicurl "" --adminurl "" --internalurl "" --region ${region} <service> + +public_url=${NEW_PUBLIC_URL} +internal_url=${NEW_INTERNAL_URL} +admin_url=${NEW_ADMIN_URL} +region=${NEW_REGION} + +# Nova +openstack endpoint create --publicurl "http://${public_url}:8774/v2.1" --adminurl "http://${admin_url}:8774/v2.1" --internalurl "http://${internal_url}:8774/v2.1" --region ${region} nova +openstack endpoint create --publicurl "http://${public_url}:8774/v2/%(tenant_id)s" --adminurl "http://${admin_url}:8774/v2/%(tenant_id)s" --internalurl "http://${internal_url}:8774/v2/%(tenant_id)s" --region ${region} compute_legacy +# Neutron +openstack endpoint create --publicurl "http://${public_url}:9696" --adminurl "http://${admin_url}:9696" --internalurl "http://${internal_url}:9696" --region ${region} neutron +# Cinder +openstack endpoint create --publicurl "http://${public_url}:8776/v1/%(tenant_id)s" --adminurl "http://${admin_url}:8776/v1/%(tenant_id)s" --internalurl "http://${internal_url}:8776/v1/%(tenant_id)s" --region ${region} cinder +openstack endpoint create --publicurl "http://${public_url}:8776/v2/%(tenant_id)s" --adminurl "http://${admin_url}:8776/v2/%(tenant_id)s" --internalurl "http://${internal_url}:8776/v2/%(tenant_id)s" --region ${region} cinderv2 +openstack endpoint create --publicurl "http://${public_url}:8776/v3/%(tenant_id)s" --adminurl "http://${admin_url}:8776/v3/%(tenant_id)s" --internalurl "http://${internal_url}:8776/v3/%(tenant_id)s" --region ${region} cinderv3 +# Glance +openstack endpoint create --publicurl "http://${public_url}:9292" --adminurl "http://${admin_url}:9292" --internalurl "http://${internal_url}:9292" --region ${region} glance +# Heat +openstack endpoint create --publicurl "http://${public_url}:8004/v1/%(tenant_id)s" --adminurl "http://${admin_url}:8004/v1/%(tenant_id)s" --internalurl "http://${internal_url}:8004/v1/%(tenant_id)s" --region ${region} heat +openstack endpoint create --publicurl "http://${public_url}:8000/v1" --adminurl "http://${admin_url}:8000/v1" --internalurl "http://${internal_url}:8000/v1" --region ${region} heat-cfn +# Swift +openstack endpoint create --publicurl "http://${public_url}:8080/swift/v1" --adminurl "http://${admin_url}:8080/swift/v1" --internalurl "http://${internal_url}:8080/swift/v1" --region ${region} swift +# Glare +openstack endpoint create --publicurl "http://${public_url}:9494" --adminurl "http://${admin_url}:9494" --internalurl "http://${internal_url}:9494" --region ${region} swift
\ No newline at end of file |