![Juan Antonio Osorio Robles](/assets/img/avatar_default.png)
This adds the option to get the panko container to log to stdout. The option is disabled by default. If enabled, It also adds a sidecar container that reads the apache access logs. bp logging-stdout-rsyslog Change-Id: I56fa3de7427330c1d7bc10e0f8b1adbacec00e46
64 lines
2.4 KiB
YAML
64 lines
2.4 KiB
YAML
heat_template_version: pike
|
|
|
|
description: >
|
|
OpenStack containerized Keystone service
|
|
|
|
parameters:
|
|
DockerPankoApiImage:
|
|
description: image
|
|
type: string
|
|
|
|
outputs:
|
|
cmd_extra_args:
|
|
description: Extra command line arguments for running the service in the container.
|
|
value: "--log-dir= --log-file="
|
|
config_settings:
|
|
description: Extra hieradata needed to log to stdout.
|
|
value:
|
|
panko::wsgi::apache::access_log_file: /var/log/httpd/access.log
|
|
panko::wsgi::apache::error_log_file: /var/log/httpd/error_log
|
|
docker_config:
|
|
description: Extra containers needed for logging to stdout or a sidecar container.
|
|
value:
|
|
step_2:
|
|
panko_api_apache_error_logs:
|
|
start_order: 1
|
|
image: {get_param: DockerPankoApiImage}
|
|
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:
|
|
- PankoApiLogs:/var/log/
|
|
panko_api_apache_access_logs:
|
|
start_order: 1
|
|
image: {get_param: DockerPankoApiImage}
|
|
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:
|
|
- PankoApiLogs:/var/log/
|
|
panko_api_logs:
|
|
start_order: 2
|
|
image: {get_param: DockerPankoApiImage}
|
|
user: panko
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/panko/app.log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/panko && rm -f /var/log/panko/app.log && mkfifo /var/log/panko/app.log && while true; do cat /var/log/panko/app.log; done']
|
|
volumes:
|
|
- PankoApiLogs:/var/log/
|
|
volumes:
|
|
description: The volumes needed to log to stdout or a sidecar container.
|
|
value:
|
|
- PankoApiLogs:/var/log/
|
|
host_prep_tasks:
|
|
description: Extra ansible tasks needed for logging to files in the host.
|
|
value: null
|