tripleo-heat-templates/docker/services/logging/files/nova-api.yaml
Carlos Camacho 44ef2a3ec1 Change template names to rocky
The new master branch should point now to rocky.

So, HOT templates should specify that they might contain features
for rocky release [1]

Also, this submission updates the yaml validation to use only latest
heat_version alias. There are cases in which we will need to set
the version for specific templates i.e. mixed versions, so there
is added a variable to assign specific templates to specific heat_version
aliases, avoiding the introductions of error by bulk replacing the
the old version in new releases.

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky
Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
2018-05-09 08:28:42 +02:00

48 lines
1.5 KiB
YAML

heat_template_version: rocky
description: >
Template for nova-api's logging to files
parameters:
DockerNovaApiImage:
description: image
type: string
outputs:
config_settings:
description: Extra hieradata needed to log to files in the host.
value: null
volumes:
description: The volumes needed to log to files in the host.
value: &nova_api_volumes
- /var/log/containers/nova:/var/log/nova
- /var/log/containers/httpd/nova-api:/var/log/httpd
docker_config:
description: Extra containers needed for logging to files in the host.
value:
step_2:
# db sync runs before permissions set by kolla_config
nova_api_init_logs:
image: {get_param: DockerNovaApiImage}
privileged: false
user: root
volumes: *nova_api_volumes
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
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/nova
- /var/log/containers/httpd/nova-api
- name: nova logs readme
copy:
dest: /var/log/nova/readme.txt
content: |
Log files from nova containers can be found under
/var/log/containers/nova and /var/log/containers/httpd/nova-*.
ignore_errors: true