diff options
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 |
