From 4438d45a125391f5cf6cef0c6b2197433af7602b Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 27 Aug 2015 18:21:51 -0700 Subject: [PATCH] Move scripts for magnum to docker_templates Change-Id: Ia601291c5a618315e0494ab7d0673a5062ae6b99 Partially-Implements: blueprint remove-docker-dir --- .../magnum/magnum-api/config-external.sh | 10 --------- docker/common/magnum/magnum-api/start.sh | 20 ------------------ .../magnum-conductor/config-external.sh | 10 --------- .../common/magnum/magnum-conductor/start.sh | 14 ------------- .../magnum/magnum-api/config-external.sh | 11 +++++++++- docker_templates/magnum/magnum-api/start.sh | 21 ++++++++++++++++++- .../magnum-conductor/config-external.sh | 11 +++++++++- .../magnum/magnum-conductor/start.sh | 15 ++++++++++++- 8 files changed, 54 insertions(+), 58 deletions(-) delete mode 100644 docker/common/magnum/magnum-api/config-external.sh delete mode 100755 docker/common/magnum/magnum-api/start.sh delete mode 100644 docker/common/magnum/magnum-conductor/config-external.sh delete mode 100755 docker/common/magnum/magnum-conductor/start.sh mode change 120000 => 100644 docker_templates/magnum/magnum-api/config-external.sh mode change 120000 => 100755 docker_templates/magnum/magnum-api/start.sh mode change 120000 => 100644 docker_templates/magnum/magnum-conductor/config-external.sh mode change 120000 => 100755 docker_templates/magnum/magnum-conductor/start.sh diff --git a/docker/common/magnum/magnum-api/config-external.sh b/docker/common/magnum/magnum-api/config-external.sh deleted file mode 100644 index 573043f7d9..0000000000 --- a/docker/common/magnum/magnum-api/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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/common/magnum/magnum-api/start.sh b/docker/common/magnum/magnum-api/start.sh deleted file mode 100755 index ed154e29a2..0000000000 --- a/docker/common/magnum/magnum-api/start.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/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/common/magnum/magnum-conductor/config-external.sh b/docker/common/magnum/magnum-conductor/config-external.sh deleted file mode 100644 index b96e3179e0..0000000000 --- a/docker/common/magnum/magnum-conductor/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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/common/magnum/magnum-conductor/start.sh b/docker/common/magnum/magnum-conductor/start.sh deleted file mode 100755 index a5c76ee850..0000000000 --- a/docker/common/magnum/magnum-conductor/start.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/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 diff --git a/docker_templates/magnum/magnum-api/config-external.sh b/docker_templates/magnum/magnum-api/config-external.sh deleted file mode 120000 index 0adec980b2..0000000000 --- a/docker_templates/magnum/magnum-api/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/magnum/magnum-api/config-external.sh \ No newline at end of file diff --git a/docker_templates/magnum/magnum-api/config-external.sh b/docker_templates/magnum/magnum-api/config-external.sh new file mode 100644 index 0000000000..573043f7d9 --- /dev/null +++ b/docker_templates/magnum/magnum-api/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index d6de9b70ee..0000000000 --- a/docker_templates/magnum/magnum-api/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/magnum/magnum-api/start.sh \ No newline at end of file diff --git a/docker_templates/magnum/magnum-api/start.sh b/docker_templates/magnum/magnum-api/start.sh new file mode 100755 index 0000000000..ed154e29a2 --- /dev/null +++ b/docker_templates/magnum/magnum-api/start.sh @@ -0,0 +1,20 @@ +#!/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 deleted file mode 120000 index 694c7b5d73..0000000000 --- a/docker_templates/magnum/magnum-conductor/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/magnum/magnum-conductor/config-external.sh \ No newline at end of file diff --git a/docker_templates/magnum/magnum-conductor/config-external.sh b/docker_templates/magnum/magnum-conductor/config-external.sh new file mode 100644 index 0000000000..b96e3179e0 --- /dev/null +++ b/docker_templates/magnum/magnum-conductor/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index 42ca31c466..0000000000 --- a/docker_templates/magnum/magnum-conductor/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/magnum/magnum-conductor/start.sh \ No newline at end of file diff --git a/docker_templates/magnum/magnum-conductor/start.sh b/docker_templates/magnum/magnum-conductor/start.sh new file mode 100755 index 0000000000..a5c76ee850 --- /dev/null +++ b/docker_templates/magnum/magnum-conductor/start.sh @@ -0,0 +1,14 @@ +#!/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