From 10ebdc81abd7d89c87510703cf48e124508814d4 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 17 Jul 2018 10:58:32 +0300 Subject: [PATCH] Bind mount mistral state for external deployments External deployments, like openshift-ansible, rely on contents of /var/lib/mistral and /usr/share/ansible/ host paths. Bind mount those to allow containerized mistral access data required for external deployments. Allow only executor to write into /var/lib/mistral. The other non-API components are only allowed to read. Change-Id: I4299442de0efaa66253ecc45acb2d0a8c082f018 Signed-off-by: Bogdan Dobrelya --- docker/services/mistral-engine.yaml | 2 ++ docker/services/mistral-event-engine.yaml | 2 ++ docker/services/mistral-executor.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/docker/services/mistral-engine.yaml b/docker/services/mistral-engine.yaml index c97739470f..3536abb39a 100644 --- a/docker/services/mistral-engine.yaml +++ b/docker/services/mistral-engine.yaml @@ -110,6 +110,8 @@ outputs: - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro - /var/lib/config-data/puppet-generated/mistral/:/var/lib/kolla/config_files/src:ro - /var/log/containers/mistral:/var/log/mistral + - /var/lib/mistral:/var/lib/mistral:ro + - /usr/share/ansible/:/usr/share/ansible/:ro environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS host_prep_tasks: diff --git a/docker/services/mistral-event-engine.yaml b/docker/services/mistral-event-engine.yaml index 4a797c852e..2f44f267bd 100644 --- a/docker/services/mistral-event-engine.yaml +++ b/docker/services/mistral-event-engine.yaml @@ -110,6 +110,8 @@ outputs: - /var/lib/kolla/config_files/mistral_event_engine.json:/var/lib/kolla/config_files/config.json:ro - /var/lib/config-data/puppet-generated/mistral/:/var/lib/kolla/config_files/src:ro - /var/log/containers/mistral:/var/log/mistral + - /var/lib/mistral:/var/lib/mistral:ro + - /usr/share/ansible/:/usr/share/ansible/:ro environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS host_prep_tasks: diff --git a/docker/services/mistral-executor.yaml b/docker/services/mistral-executor.yaml index e086517983..1b3400f68a 100644 --- a/docker/services/mistral-executor.yaml +++ b/docker/services/mistral-executor.yaml @@ -125,6 +125,7 @@ outputs: - /var/run/docker.sock:/var/run/docker.sock:rw - /var/log/containers/mistral:/var/log/mistral - /var/lib/mistral:/var/lib/mistral + - /usr/share/ansible/:/usr/share/ansible/:ro - {get_param: MistralExecutorVolumes} - {get_param: MistralExecutorExtraVolumes} environment: