ebab335f38
We may want to be able to specific different containers at a role level. This requires switching the container image parameters to be role specific too allow for role based overrides. Change-Id: I4090e889a32abd51e7c11139737a7a18e27d18e7
81 lines
2.9 KiB
YAML
81 lines
2.9 KiB
YAML
heat_template_version: wallaby
|
|
|
|
description: >
|
|
Template for nova-metadata's logging to stdout
|
|
|
|
parameters:
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
ContainerNovaMetadataImage:
|
|
description: image
|
|
type: string
|
|
tags:
|
|
- role_specific
|
|
|
|
resources:
|
|
|
|
RoleParametersValue:
|
|
type: OS::Heat::Value
|
|
properties:
|
|
type: json
|
|
value:
|
|
map_replace:
|
|
- map_replace:
|
|
- ContainerNovaMetadataImage: ContainerNovaMetadataImage
|
|
- values: {get_param: [RoleParameters]}
|
|
- values:
|
|
ContainerNovaMetadataImage: {get_param: ContainerNovaMetadataImage}
|
|
|
|
outputs:
|
|
config_settings:
|
|
description: Extra hieradata needed to log to stdout.
|
|
value:
|
|
nova::wsgi::apache_metadata::access_log_file: /var/log/httpd/access.log
|
|
nova::wsgi::apache_metadata::error_log_file: /var/log/httpd/error_log
|
|
volumes:
|
|
description: The volumes needed to log to stdout or a sidecar container.
|
|
value:
|
|
- NovaMetadataLogs:/var/log/
|
|
docker_config:
|
|
description: Extra containers needed for logging to stdout or a sidecar container.
|
|
value:
|
|
step_2:
|
|
nova_metadata_apache_error_logs:
|
|
start_order: 1
|
|
image: {get_attr: [RoleParametersValue, value, ContainerNovaMetadataImage]}
|
|
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:
|
|
- NovaMetadataLogs:/var/log/
|
|
nova_metadata_apache_access_logs:
|
|
start_order: 1
|
|
image: {get_attr: [RoleParametersValue, value, ContainerNovaMetadataImage]}
|
|
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:
|
|
- NovaMetadataLogs:/var/log/
|
|
nova_metadata_logs:
|
|
start_order: 2
|
|
image: {get_attr: [RoleParametersValue, value, ContainerNovaMetadataImage]}
|
|
user: nova
|
|
privileged: false
|
|
restart: always
|
|
healthcheck:
|
|
test: '[ -p /var/log/nova/nova-metadata-api.log ]'
|
|
command: ['/bin/bash', '-c', 'mkdir -p /var/log/nova && rm -f /var/log/nova/nova-metadata-api.log && mkfifo /var/log/nova/nova-metadata-api.log && while true; do cat /var/log/nova/nova-metadata-api.log; done']
|
|
volumes:
|
|
- NovaMetadataLogs:/var/log/
|
|
host_prep_tasks:
|
|
description: Extra ansible tasks needed for logging to files in the host.
|
|
value: null
|