1e854d613d
This adds the option to get the nova containers to log to stdout. The option is disabled by default. If enabled, for nova-api and placement it also adds a sidecar container that reads the apache access logs. bp logging-stdout-rsyslog Depends-On: I59d02fe8731c20c64ca389000f12c78cfc1f12be Change-Id: I8137d61f2d4352d4d8055e93a30511cf1aeaa6b0
61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
heat_template_version: pike
|
|
|
|
description: >
|
|
Template for nova-api's logging to stdout
|
|
|
|
parameters:
|
|
DockerNovaApiImage:
|
|
description: image
|
|
type: string
|
|
|
|
outputs:
|
|
config_settings:
|
|
description: Extra hieradata needed to log to stdout.
|
|
value:
|
|
nova::wsgi::apache_api::access_log_file: /var/log/httpd/access.log
|
|
nova::wsgi::apache_api::error_log_file: /var/log/httpd/error_log
|
|
volumes:
|
|
description: The volumes needed to log to stdout or a sidecar container.
|
|
value:
|
|
- NovaApiLogs:/var/log/
|
|
docker_config:
|
|
description: Extra containers needed for logging to stdout or a sidecar container.
|
|
value:
|
|
step_2:
|
|
nova_api_apache_error_logs:
|
|
start_order: 1
|
|
image: {get_param: DockerNovaApiImage}
|
|
user: root
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/httpd/error_log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && rm -f /var/log/httpd/error_log && mkfifo /var/log/httpd/error_log && while true; do cat /var/log/httpd/error_log; done']
|
|
volumes:
|
|
- NovaApiLogs:/var/log/
|
|
nova_api_apache_access_logs:
|
|
start_order: 1
|
|
image: {get_param: DockerNovaApiImage}
|
|
user: root
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/httpd/access.log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && rm -f /var/log/httpd/access.log && mkfifo /var/log/httpd/access.log && while true; do cat /var/log/httpd/access.log; done']
|
|
volumes:
|
|
- NovaApiLogs:/var/log/
|
|
nova_api_logs:
|
|
start_order: 2
|
|
image: {get_param: DockerNovaApiImage}
|
|
user: nova
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/nova/nova-api.log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/nova && rm -f /var/log/nova/nova-api.log && mkfifo /var/log/nova/nova-api.log && while true; do cat /var/log/nova/nova-api.log; done']
|
|
volumes:
|
|
- NovaApiLogs:/var/log/
|
|
host_prep_tasks:
|
|
description: Extra ansible tasks needed for logging to files in the host.
|
|
value: null
|