c9991c2e31
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added a new template version for wallaby. This would allow us to use 2-argument variant of the ``if`` function that would allow for e.g. conditional definition of resource properties and help cleanup templates. If only two arguments are passed to ``if`` function, the entire enclosing item is removed when the condition is false. Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
65 lines
2.4 KiB
YAML
65 lines
2.4 KiB
YAML
heat_template_version: wallaby
|
|
|
|
description: >
|
|
OpenStack containerized Barbican service
|
|
|
|
parameters:
|
|
ContainerBarbicanApiImage:
|
|
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:
|
|
barbican::wsgi::apache::access_log_file: /var/log/httpd/access.log
|
|
barbican::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:
|
|
barbican_api_apache_error_logs:
|
|
start_order: 1
|
|
image: {get_param: ContainerBarbicanApiImage}
|
|
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:
|
|
- BarbicanApiLogs:/var/log/
|
|
barbican_api_apache_access_logs:
|
|
start_order: 1
|
|
image: {get_param: ContainerBarbicanApiImage}
|
|
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:
|
|
- BarbicanApiLogs:/var/log/
|
|
barbican_api_logs:
|
|
start_order: 2
|
|
image: {get_param: ContainerBarbicanApiImage}
|
|
user: barbican
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/barbican/main.log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/barbican && rm -f /var/log/barbican/main.log && mkfifo /var/log/barbican/main.log && while true; do cat /var/log/barbican/main.log; done']
|
|
volumes:
|
|
- BarbicanApiLogs:/var/log/
|
|
volumes:
|
|
description: The volumes needed to log to stdout or a sidecar container.
|
|
value:
|
|
- BarbicanApiLogs:/var/log/
|
|
host_prep_tasks:
|
|
description: Extra ansible tasks needed for logging to files in the host.
|
|
value: null
|
|
|