1c147e4def
- Updated the required variables to be sorted so that they are better visible one on each line - Removed variable defaults from each service scripts and added them to tools/genenv file which holds all default values Change-Id: Ia7b1b08ba3f963b46b81434ce84f476d56890a93 Closes-Bug: #1476494 Closes-Bug: #1467652
59 lines
1.6 KiB
Bash
Executable File
59 lines
1.6 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
|