aboutsummaryrefslogtreecommitdiff
path: root/docker/common/cinder-app/cinder-api
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-08-07 09:02:07 -0700
committerSteven Dake <stdake@cisco.com>2015-08-07 22:32:56 -0700
commitec272b8fe4da85351d549022829c6a2329666376 (patch)
tree4971a62eb388f208c376510ad7e49fddedda75b5 /docker/common/cinder-app/cinder-api
parentb84abb9425afebddf0109ecb36e383c2a228b5a8 (diff)
downloadkolla-ec272b8fe4da85351d549022829c6a2329666376.tar.gz
kolla-ec272b8fe4da85351d549022829c6a2329666376.zip
Remove config-internal from cinder
Partially-Implements: blueprint remove-config-internal Change-Id: Ic6b7cb217a126c53c0055dbcac4d345583599eb1
Diffstat (limited to 'docker/common/cinder-app/cinder-api')
-rwxr-xr-xdocker/common/cinder-app/cinder-api/config-internal.sh77
-rwxr-xr-xdocker/common/cinder-app/cinder-api/start.sh2
2 files changed, 1 insertions, 78 deletions
diff --git a/docker/common/cinder-app/cinder-api/config-internal.sh b/docker/common/cinder-app/cinder-api/config-internal.sh
deleted file mode 100755
index 158d1efe1..000000000
--- a/docker/common/cinder-app/cinder-api/config-internal.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-set -e
-
-. /opt/kolla/kolla-common.sh
-. /opt/kolla/config-cinder.sh
-
-check_required_vars ADMIN_TENANT_NAME \
- CINDER_API_SERVICE_HOST \
- CINDER_API_SERVICE_LISTEN \
- CINDER_API_SERVICE_PORT \
- CINDER_KEYSTONE_PASSWORD \
- CINDER_KEYSTONE_USER \
- KEYSTONE_ADMIN_SERVICE_HOST \
- KEYSTONE_ADMIN_SERVICE_PORT \
- KEYSTONE_AUTH_PROTOCOL \
- KEYSTONE_ADMIN_TOKEN \
- PUBLIC_IP
-
-fail_unless_os_service_running keystone
-
-cfg=/etc/cinder/cinder.conf
-
-# Set the auth credentials
-export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
-export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
-
-# Create Keystone User
-crux user-create --update \
- -n "${CINDER_KEYSTONE_USER}" \
- -p "${CINDER_KEYSTONE_PASSWORD}" \
- -t "${ADMIN_TENANT_NAME}" \
- -r admin
-
-# Configure Keystone
-crux endpoint-create --remove-all \
- -n cinder \
- -t volume \
- -P "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \
- -A "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \
- -I "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s"
-
-crux endpoint-create --remove-all \
- -n cinderv2 \
- -t volumev2 \
- -P "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \
- -A "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \
- -I "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s"
-
-# Logging
-crudini --set $cfg \
- DEFAULT \
- log_file \
- "${CINDER_API_LOG_FILE}"
-
-# API Configuration
-crudini --set $cfg \
- DEFAULT \
- osapi_volume_listen \
- "${CINDER_API_SERVICE_LISTEN}"
-
-crudini --set $cfg \
- DEFAULT \
- osapi_volume_listen_port \
- "${CINDER_API_SERVICE_PORT}"
-
-crudini --set $cfg \
- DEFAULT \
- enable_v1_api \
- "false"
-
-crudini --set $cfg \
- DEFAULT \
- enable_v2_api \
- "true"
-
-echo "Starting cinder-api"
-exec /usr/bin/cinder-api --config-file $cfg
diff --git a/docker/common/cinder-app/cinder-api/start.sh b/docker/common/cinder-app/cinder-api/start.sh
index 4385d0631..e6f79b3a6 100755
--- a/docker/common/cinder-app/cinder-api/start.sh
+++ b/docker/common/cinder-app/cinder-api/start.sh
@@ -8,7 +8,7 @@ ARGS=""
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Config-internal script exec out of this function, it does not return here.
+# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases