Merge "Setup Keystone catalog information for Ceilometer"
This commit is contained in:
commit
434fac566b
@ -51,3 +51,8 @@ catalog.RegionOne.orchestration.publicURL = http://%SERVICE_HOST%:8000/v1
|
|||||||
catalog.RegionOne.orchestration.adminURL = http://%SERVICE_HOST%:8000/v1
|
catalog.RegionOne.orchestration.adminURL = http://%SERVICE_HOST%:8000/v1
|
||||||
catalog.RegionOne.orchestration.internalURL = http://%SERVICE_HOST%:8000/v1
|
catalog.RegionOne.orchestration.internalURL = http://%SERVICE_HOST%:8000/v1
|
||||||
catalog.RegionOne.orchestration.name = Heat Service
|
catalog.RegionOne.orchestration.name = Heat Service
|
||||||
|
|
||||||
|
catalog.RegionOne.metering.publicURL = http://%SERVICE_HOST%:8777/v1
|
||||||
|
catalog.RegionOne.metering.adminURL = http://%SERVICE_HOST%:8777/v1
|
||||||
|
catalog.RegionOne.metering.internalURL = http://%SERVICE_HOST%:8777/v1
|
||||||
|
catalog.RegionOne.metering.name = Telemetry Service
|
||||||
|
@ -48,8 +48,50 @@ CEILOMETER_BIN_DIR=$(get_python_exec_prefix)
|
|||||||
# Set up database backend
|
# Set up database backend
|
||||||
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql}
|
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql}
|
||||||
|
|
||||||
|
# Ceilometer connection info.
|
||||||
|
CEILOMETER_SERVICE_PROTOCOL=http
|
||||||
|
CEILOMETER_SERVICE_HOST=$SERVICE_HOST
|
||||||
|
CEILOMETER_SERVICE_PORT=${CEILOMETER_SERVICE_PORT:-8777}
|
||||||
|
#
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
|
#
|
||||||
|
# create_ceilometer_accounts() - Set up common required ceilometer accounts
|
||||||
|
|
||||||
|
create_ceilometer_accounts() {
|
||||||
|
|
||||||
|
SERVICE_TENANT=$(keystone tenant-list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
|
||||||
|
ADMIN_ROLE=$(keystone role-list | awk "/ admin / { print \$2 }")
|
||||||
|
|
||||||
|
# Ceilometer
|
||||||
|
if [[ "$ENABLED_SERVICES" =~ "ceilometer-api" ]]; then
|
||||||
|
CEILOMETER_USER=$(keystone user-create \
|
||||||
|
--name=ceilometer \
|
||||||
|
--pass="$SERVICE_PASSWORD" \
|
||||||
|
--tenant_id $SERVICE_TENANT \
|
||||||
|
--email=ceilometer@example.com \
|
||||||
|
| grep " id " | get_field 2)
|
||||||
|
keystone user-role-add \
|
||||||
|
--tenant-id $SERVICE_TENANT \
|
||||||
|
--user-id $CEILOMETER_USER \
|
||||||
|
--role-id $ADMIN_ROLE
|
||||||
|
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||||
|
CEILOMETER_SERVICE=$(keystone service-create \
|
||||||
|
--name=ceilometer \
|
||||||
|
--type=metering \
|
||||||
|
--description="OpenStack Telemetry Service" \
|
||||||
|
| grep " id " | get_field 2)
|
||||||
|
keystone endpoint-create \
|
||||||
|
--region RegionOne \
|
||||||
|
--service_id $CEILOMETER_SERVICE \
|
||||||
|
--publicurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/" \
|
||||||
|
--adminurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/" \
|
||||||
|
--internalurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
||||||
# runs that a clean run would need to clean up
|
# runs that a clean run would need to clean up
|
||||||
|
4
stack.sh
4
stack.sh
@ -901,6 +901,10 @@ if is_service_enabled key; then
|
|||||||
create_trove_accounts
|
create_trove_accounts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if is_service_enabled ceilometer; then
|
||||||
|
create_ceilometer_accounts
|
||||||
|
fi
|
||||||
|
|
||||||
if is_service_enabled swift || is_service_enabled s-proxy; then
|
if is_service_enabled swift || is_service_enabled s-proxy; then
|
||||||
create_swift_accounts
|
create_swift_accounts
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user