aboutsummaryrefslogtreecommitdiff
path: root/docker/common/base
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-06-30 21:34:49 +0000
committerGerrit Code Review <review@openstack.org>2015-06-30 21:34:49 +0000
commit90d92347e83e348ef5e2f1ed2faba2a3820ab436 (patch)
tree5d8dd8a5c1a26971050ec54d16ca2ff82e8c720a /docker/common/base
parentcc9432a57476ee043f81700e811d33f78f66adaf (diff)
parent3ac7da64d12c631def3640369998d292fd1a199f (diff)
downloadkolla-90d92347e83e348ef5e2f1ed2faba2a3820ab436.tar.gz
kolla-90d92347e83e348ef5e2f1ed2faba2a3820ab436.zip
Merge "Add initial config function and keystone support"
Diffstat (limited to 'docker/common/base')
-rw-r--r--docker/common/base/kolla-common.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/docker/common/base/kolla-common.sh b/docker/common/base/kolla-common.sh
index 8c2ef5ec1..bd6a539a0 100644
--- a/docker/common/base/kolla-common.sh
+++ b/docker/common/base/kolla-common.sh
@@ -168,3 +168,27 @@ dump_vars() {
set +o posix
}
+set_configs() {
+ case $KOLLA_CONFIG_STRATEGY in
+ CONFIG_INTERNAL)
+ # exec is intentional to preserve existing behaviour
+ exec /opt/kolla/config-internal.sh
+ ;;
+ CONFIG_EXTERNAL_COPY_ALWAYS)
+ source /opt/kolla/config-exernal.sh
+ ;;
+ CONFIG_EXTERNAL_COPY_ONCE)
+ if [[ -f /configured ]]; then
+ echo 'INFO - This container has already been configured; Refusing to copy new configs'
+ return
+ fi
+ source /opt/kolla/config-exernal.sh
+ touch /configured
+ ;;
+
+ *)
+ echo '$CONFIG_STRATEGY is not set properly'
+ exit 1
+ ;;
+ esac
+}