diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-27 18:02:04 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-28 00:50:29 -0700 |
| commit | 59138665acc96c6155d3046f10db32c38557e8b7 (patch) | |
| tree | 3bee2eeb173b4c141aacac2a8b48d5d02104472f /docker_templates | |
| parent | 19318667ba1175c684961e044f1c798f6f9768a6 (diff) | |
| download | kolla-59138665acc96c6155d3046f10db32c38557e8b7.tar.gz kolla-59138665acc96c6155d3046f10db32c38557e8b7.zip | |
Move scripts for gnocchi to docker_templates
Change-Id: Iabff693470d5b522cd82915ba3b7298d286c5fa4
Partially-Implements: blueprint remove-docker-dir
Diffstat (limited to 'docker_templates')
| -rw-r--r--[l---------] | docker_templates/gnocchi/gnocchi-api/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/gnocchi/gnocchi-api/start.sh | 22 | ||||
| -rw-r--r--[l---------] | docker_templates/gnocchi/gnocchi-statsd/config-external.sh | 11 | ||||
| -rwxr-xr-x[l---------] | docker_templates/gnocchi/gnocchi-statsd/start.sh | 15 |
4 files changed, 55 insertions, 4 deletions
diff --git a/docker_templates/gnocchi/gnocchi-api/config-external.sh b/docker_templates/gnocchi/gnocchi-api/config-external.sh index ef5155846..59639ba63 120000..100644 --- a/docker_templates/gnocchi/gnocchi-api/config-external.sh +++ b/docker_templates/gnocchi/gnocchi-api/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/gnocchi/gnocchi-api/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" +TARGET="/etc/gnocchi/gnocchi-api.conf" +OWNER="gnocchi" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/gnocchi/gnocchi-api/start.sh b/docker_templates/gnocchi/gnocchi-api/start.sh index 92849bb3d..657368a27 120000..100755 --- a/docker_templates/gnocchi/gnocchi-api/start.sh +++ b/docker_templates/gnocchi/gnocchi-api/start.sh @@ -1 +1,21 @@ -../../../docker/common/gnocchi/gnocchi-api/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/gnocchi-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 "gnocchi-manage db_sync" gnocchi + exit 0 +fi + +exec $CMD $ARGS + diff --git a/docker_templates/gnocchi/gnocchi-statsd/config-external.sh b/docker_templates/gnocchi/gnocchi-statsd/config-external.sh index a3d14b10e..59639ba63 120000..100644 --- a/docker_templates/gnocchi/gnocchi-statsd/config-external.sh +++ b/docker_templates/gnocchi/gnocchi-statsd/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/gnocchi/gnocchi-statsd/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" +TARGET="/etc/gnocchi/gnocchi-api.conf" +OWNER="gnocchi" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/gnocchi/gnocchi-statsd/start.sh b/docker_templates/gnocchi/gnocchi-statsd/start.sh index d27368708..636e71323 120000..100755 --- a/docker_templates/gnocchi/gnocchi-statsd/start.sh +++ b/docker_templates/gnocchi/gnocchi-statsd/start.sh @@ -1 +1,14 @@ -../../../docker/common/gnocchi/gnocchi-statsd/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/gnocchi-statsd" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS + |
