diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-27 18:21:51 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-28 00:50:29 -0700 |
| commit | 4438d45a125391f5cf6cef0c6b2197433af7602b (patch) | |
| tree | fb1277ce0e7e564183def475f1017f9b31e46ed4 /docker_templates | |
| parent | 1dbb8311039da8bcd2fc328c188825b2fe84510e (diff) | |
| download | kolla-4438d45a125391f5cf6cef0c6b2197433af7602b.tar.gz kolla-4438d45a125391f5cf6cef0c6b2197433af7602b.zip | |
Move scripts for magnum to docker_templates
Change-Id: Ia601291c5a618315e0494ab7d0673a5062ae6b99
Partially-Implements: blueprint remove-docker-dir
Diffstat (limited to 'docker_templates')
| -rw-r--r--[l---------] | docker_templates/magnum/magnum-api/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/magnum/magnum-api/start.sh | 21 | ||||
| -rw-r--r--[l---------] | docker_templates/magnum/magnum-conductor/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/magnum/magnum-conductor/start.sh | 15 |
4 files changed, 54 insertions, 4 deletions
diff --git a/docker_templates/magnum/magnum-api/config-external.sh b/docker_templates/magnum/magnum-api/config-external.sh index 0adec980b..573043f7d 120000..100644 --- a/docker_templates/magnum/magnum-api/config-external.sh +++ b/docker_templates/magnum/magnum-api/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/magnum/magnum-api/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/magnum/magnum-api/magnum.conf" +TARGET="/etc/magnum/magnum.conf" +OWNER="magnum" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/magnum/magnum-api/start.sh b/docker_templates/magnum/magnum-api/start.sh index d6de9b70e..ed154e29a 120000..100755 --- a/docker_templates/magnum/magnum-api/start.sh +++ b/docker_templates/magnum/magnum-api/start.sh @@ -1 +1,20 @@ -../../../docker/common/magnum/magnum-api/start.sh
\ No newline at end of file +#!/bin/bash + +set -o errexit +CMD="/usr/bin/magnum-api" +ARGS="" + +# 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 "magnum-manage db_sync" magnum + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker_templates/magnum/magnum-conductor/config-external.sh b/docker_templates/magnum/magnum-conductor/config-external.sh index 694c7b5d7..b96e3179e 120000..100644 --- a/docker_templates/magnum/magnum-conductor/config-external.sh +++ b/docker_templates/magnum/magnum-conductor/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/magnum/magnum-conductor/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/magnum/magnum-conductor/magnum.conf" +TARGET="/etc/magnum/magnum.conf" +OWNER="magnum" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/magnum/magnum-conductor/start.sh b/docker_templates/magnum/magnum-conductor/start.sh index 42ca31c46..a5c76ee85 120000..100755 --- a/docker_templates/magnum/magnum-conductor/start.sh +++ b/docker_templates/magnum/magnum-conductor/start.sh @@ -1 +1,14 @@ -../../../docker/common/magnum/magnum-conductor/start.sh
\ No newline at end of file +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/magnum-conductor" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS |
