diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-27 17:40:42 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-28 00:50:29 -0700 |
| commit | ccdc01fb49f451366e89984bdfc61b793db62bcb (patch) | |
| tree | 9556aa5175b1c8576542b19e933612ed5d201164 /docker_templates/cinder/cinder-api | |
| parent | 8930c12922509a52c6ef8d0475ca5adefb61ea27 (diff) | |
| download | kolla-ccdc01fb49f451366e89984bdfc61b793db62bcb.tar.gz kolla-ccdc01fb49f451366e89984bdfc61b793db62bcb.zip | |
Move scripts for cinder to docker_templates
Change-Id: Id19cedf33e2acbbeebbde1c8d36e092225a25fe2
Partially-Implements: blueprint remove-docker-dir
Diffstat (limited to 'docker_templates/cinder/cinder-api')
| -rw-r--r--[l---------] | docker_templates/cinder/cinder-api/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/cinder/cinder-api/start.sh | 22 |
2 files changed, 31 insertions, 2 deletions
diff --git a/docker_templates/cinder/cinder-api/config-external.sh b/docker_templates/cinder/cinder-api/config-external.sh index dc4bc440d..08d8cde0a 120000..100644 --- a/docker_templates/cinder/cinder-api/config-external.sh +++ b/docker_templates/cinder/cinder-api/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/cinder/cinder-api/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/cinder-api/cinder.conf" +TARGET="/etc/cinder/cinder.conf" +OWNER="cinder" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/cinder/cinder-api/start.sh b/docker_templates/cinder/cinder-api/start.sh index 3cb418178..6c61b3a4e 120000..100755 --- a/docker_templates/cinder/cinder-api/start.sh +++ b/docker_templates/cinder/cinder-api/start.sh @@ -1 +1,21 @@ -../../../docker/common/cinder/cinder-api/start.sh
\ No newline at end of file +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/cinder-api" +ARGS="--config-file /etc/cinder/cinder.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "cinder-manage db sync" cinder + exit 0 +fi + +exec $CMD $ARGS |
