Files
tripleo-heat-templates/docker/services/logging/files/neutron-api.yaml
Jiri Stransky 85ec193403 Write readme.txt into old log directories
This should help operators find the new log files. We do have them
documented, but not everybody reads every word in the docs :)

The readme creation has ignore_errors: true so that if the directory
isn't present at all (e.g. on deployed server environments, which
don't have openstack packages installed), we don't fail the deployment
when we're not able to create the readme.

Change-Id: I6b36db7b7ce8b3e4da566eb7828d0c3b8646a14f
Partial-Bug: #1730957
2017-11-14 10:35:11 +01:00

48 lines
1.5 KiB
YAML

heat_template_version: pike
description: >
OpenStack containerized Neutron API service
parameters:
DockerNeutronApiImage:
description: image
type: string
outputs:
config_settings:
description: Extra hieradata needed to log to files in the host.
value: null
volumes:
description: extra volumes
value: &neutron_api_volumes
- /var/log/containers/neutron:/var/log/neutron
- /var/log/containers/httpd/neutron-api:/var/log/httpd
docker_config:
description: Extra containers needed for logging to files in the host.
value:
# db sync runs before permissions set by kolla_config
step_2:
neutron_init_logs:
image: {get_param: DockerNeutronApiImage}
privileged: false
user: root
volumes: *neutron_api_volumes
command: ['/bin/bash', '-c', 'chown -R neutron:neutron /var/log/neutron']
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value:
- name: create persistent logs directory
file:
path: "{{ item }}"
state: directory
with_items:
- /var/log/containers/neutron
- /var/log/containers/httpd/neutron-api
- name: neutron logs readme
copy:
dest: /var/log/neutron/readme.txt
content: |
Log files from neutron containers can be found under
/var/log/containers/neutron and /var/log/containers/httpd/neutron-api.
ignore_errors: true