diff options
| author | Sam Yaple <sam@yaple.net> | 2015-06-17 08:11:44 +0000 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-06-30 17:26:23 +0000 |
| commit | 3ac7da64d12c631def3640369998d292fd1a199f (patch) | |
| tree | 9198ece863949437490f58c88cbea664c8b6b961 /docker/common/base | |
| parent | 6370bf25cb3c624067d7327ef54bf2fe654c87be (diff) | |
| download | kolla-3ac7da64d12c631def3640369998d292fd1a199f.tar.gz kolla-3ac7da64d12c631def3640369998d292fd1a199f.zip | |
Add initial config function and keystone support
Add set_configs function that implements the flow from the proposed
ansible-multi spec. Move start.sh to config-internal.sh to preserve existing
behaviour.
config-externall.sh copies the appropriate configs in from the bind'd
location and sets permissions and ownership appropriately.
Partially Implements: blueprint ansible-multi
Change-Id: I53fca0660451087f273fefc3c63e0d8cf1a2c096
Diffstat (limited to 'docker/common/base')
| -rw-r--r-- | docker/common/base/kolla-common.sh | 24 |
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 +} |
