diff options
author | 2017-05-05 15:17:55 +0000 | |
---|---|---|
committer | 2017-05-05 15:17:55 +0000 | |
commit | 574617d007b02f98b2ac9b7e853cf4fd266fe085 (patch) | |
tree | 5a6069263cc5160b1051078370ae15785add0cd8 /docker/services/mistral-api.yaml | |
parent | c577755082a92e638ca03ae8a8bd38045bf7901c (diff) | |
parent | 58a8b282c2f244b2675a6da7aac161a53f58c288 (diff) |
Merge "Mount hostpath logs on /var/log"
Diffstat (limited to 'docker/services/mistral-api.yaml')
-rw-r--r-- | docker/services/mistral-api.yaml | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/docker/services/mistral-api.yaml b/docker/services/mistral-api.yaml index 652656ef..0684ee0c 100644 --- a/docker/services/mistral-api.yaml +++ b/docker/services/mistral-api.yaml @@ -66,14 +66,27 @@ outputs: kolla_config: /var/lib/kolla/config_files/mistral_api.json: command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api + permissions: + - path: /var/log/mistral + owner: mistral:mistral + recurse: true docker_config: + # db sync runs before permissions set by kolla_config step_3: - mistral_db_sync: - start_order: 1 + mistral_init_logs: + start_order: 0 image: &mistral_image list_join: - '/' - [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ] + privileged: false + user: root + volumes: + - /var/log/containers/mistral:/var/log/mistral + command: ['/bin/bash', '-c', 'chown -R mistral:mistral /var/log/mistral'] + mistral_db_sync: + start_order: 1 + image: *mistral_image net: host privileged: false detach: false @@ -82,6 +95,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/config-data/mistral/etc/:/etc/:ro + - /var/log/containers/mistral:/var/log/mistral command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'upgrade', 'head'] mistral_db_populate: start_order: 2 @@ -94,6 +108,7 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/config-data/mistral/etc/:/etc/:ro + - /var/log/containers/mistral:/var/log/mistral # NOTE: dprince this requires that we install openstack-tripleo-common into # the Mistral API image so that we get tripleo* actions command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'populate'] @@ -110,8 +125,14 @@ outputs: - - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro + - /var/log/containers/mistral:/var/log/mistral environment: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS + host_prep_tasks: + - name: create persistent logs directory + file: + path: /var/log/containers/mistral + state: directory upgrade_tasks: - name: Stop and disable mistral_api service tags: step2 |