656ba297e7
Partially Implements: Blueprint standard-start Change-Id: I26e2fe52fe40efd001f9aae109ac6b7553d73264
54 lines
1.5 KiB
Bash
Executable File
54 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
. /opt/kolla/kolla-common.sh
|
|
. /opt/kolla/config-glance.sh
|
|
|
|
check_required_vars ADMIN_TENANT_NAME GLANCE_API_SERVICE_HOST \
|
|
GLANCE_KEYSTONE_PASSWORD GLANCE_KEYSTONE_USER \
|
|
GLANCE_REGISTRY_SERVICE_HOST KEYSTONE_ADMIN_SERVICE_HOST \
|
|
KEYSTONE_ADMIN_SERVICE_PORT KEYSTONE_ADMIN_TOKEN \
|
|
KEYSTONE_AUTH_PROTOCOL PUBLIC_IP \
|
|
RABBITMQ_SERVICE_HOST
|
|
|
|
fail_unless_os_service_running keystone
|
|
|
|
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
|
|
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
|
|
|
|
crux user-create --update \
|
|
-n "${GLANCE_KEYSTONE_USER}" \
|
|
-p "${GLANCE_KEYSTONE_PASSWORD}" \
|
|
-t "${ADMIN_TENANT_NAME}" \
|
|
-r admin
|
|
|
|
crux endpoint-create --remove-all \
|
|
-n glance -t image \
|
|
-I "http://${GLANCE_API_SERVICE_HOST}:9292" \
|
|
-P "http://${PUBLIC_IP}:9292" \
|
|
-A "http://${GLANCE_API_SERVICE_HOST}:9292"
|
|
|
|
# turn on notification sending by glance
|
|
crudini --set /etc/glance/glance-api.conf \
|
|
DEFAULT \
|
|
notification_driver \
|
|
"messaging"
|
|
|
|
crudini --set /etc/glance/glance-api.conf \
|
|
DEFAULT \
|
|
rabbit_host \
|
|
"${RABBITMQ_SERVICE_HOST}"
|
|
|
|
crudini --set /etc/glance/glance-api.conf \
|
|
DEFAULT \
|
|
registry_host \
|
|
"${GLANCE_REGISTRY_SERVICE_HOST}"
|
|
|
|
crudini --set /etc/glance/glance-api.conf \
|
|
DEFAULT \
|
|
debug \
|
|
"True"
|
|
|
|
exec /usr/bin/glance-api
|