tripleo-heat-templates/deployment/logging/stdout/keystone.yaml
Emilien Macchi 81258ae551 Convert container environment from a list to a dict
Moving all the container environments from lists to dicts, so they can
be consumed later by the podman_container ansible module which uses
dict.

Using a dict is also easier to parse, since it doesn't involve "=" for
each item in the environment to export.

Change-Id: I894f339cdf03bc2a93c588f826f738b0b851a3ad
Depends-On: I98c75e03d78885173d829fa850f35c52c625e6bb
2019-10-16 01:29:31 +00:00

65 lines
2.4 KiB
YAML

heat_template_version: rocky
description: >
OpenStack containerized Keystone service
parameters:
ContainerKeystoneImage:
description: image
type: string
outputs:
config_settings:
description: Extra hieradata needed to log to stdout.
value:
keystone::wsgi::apache::access_log_file: /var/log/httpd/access.log
keystone::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:
keystone_apache_error_logs:
start_order: 1
image: {get_param: ContainerKeystoneImage}
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:
- KeystoneLogs:/var/log/
keystone_apache_access_logs:
start_order: 1
image: {get_param: ContainerKeystoneImage}
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:
- KeystoneLogs:/var/log/
keystone_logs:
start_order: 2
image: {get_param: ContainerKeystoneImage}
user: keystone
privileged: false
restart: always
healthcheck:
test: '[ -p /var/log/keystone/keystone.log ]'
command: ['/bin/bash', '-c', 'mkdir -p /var/log/keystone && rm -f /var/log/keystone/keystone.log && mkfifo /var/log/keystone/keystone.log && while true; do cat /var/log/keystone/keystone.log; done']
volumes:
- KeystoneLogs:/var/log/
environment:
description: Extra environment variables needed for the service to log to stdout.
value:
EXTRA_KEYSTONE_MANAGE_ARGS: '--log-dir= --log-file='
volumes:
description: The volumes needed to log to stdout or a sidecar container.
value:
- KeystoneLogs:/var/log/
host_prep_tasks:
description: Extra ansible tasks needed for logging to files in the host.
value: null