Add option for nova containers to log to stdout/stderr
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
This commit is contained in:
parent
f037da0f36
commit
1e854d613d
docker/services
logging
files
stdout
environments
overcloud-resource-registry-puppet.j2.yaml
40
docker/services/logging/files/nova-api.yaml
Normal file
40
docker/services/logging/files/nova-api.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
heat_template_version: pike
|
||||
|
||||
description: >
|
||||
Template for nova-api's logging to files
|
||||
|
||||
parameters:
|
||||
DockerNovaApiImage:
|
||||
description: image
|
||||
type: string
|
||||
|
||||
outputs:
|
||||
config_settings:
|
||||
description: Extra hieradata needed to log to files in the host.
|
||||
value: null
|
||||
volumes:
|
||||
description: The volumes needed to log to files in the host.
|
||||
value: &nova_api_volumes
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-api:/var/log/httpd
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to files in the host.
|
||||
value:
|
||||
step_2:
|
||||
# db sync runs before permissions set by kolla_config
|
||||
nova_api_init_logs:
|
||||
image: {get_param: DockerNovaApiImage}
|
||||
privileged: false
|
||||
user: root
|
||||
volumes: *nova_api_volumes
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to files in the host.
|
||||
value:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- /var/log/containers/nova
|
||||
- /var/log/containers/httpd/nova-api
|
57
docker/services/logging/files/nova-common.yaml
Normal file
57
docker/services/logging/files/nova-common.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
heat_template_version: pike
|
||||
|
||||
description: >
|
||||
Template for nova's logging to files
|
||||
|
||||
parameters:
|
||||
DockerNovaImage:
|
||||
description: image
|
||||
type: string
|
||||
NovaServiceName:
|
||||
description: service name
|
||||
type: string
|
||||
|
||||
resources:
|
||||
|
||||
InitLogContainerName:
|
||||
type: OS::Heat::Value
|
||||
properties:
|
||||
type: string
|
||||
value:
|
||||
str_replace:
|
||||
template: nova_SERVICE_init_log
|
||||
params:
|
||||
SERVICE: {get_param: NovaServiceName}
|
||||
|
||||
outputs:
|
||||
cmd_extra_args:
|
||||
description: Extra command line arguments for running the service in the container.
|
||||
value: ''
|
||||
config_settings:
|
||||
description: Extra hieradata needed to log to files in the host.
|
||||
value: null
|
||||
volumes:
|
||||
description: The volumes needed to log to files in the host.
|
||||
value:
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to files in the host.
|
||||
value:
|
||||
step_2:
|
||||
map_replace:
|
||||
- CONTAINERNAME:
|
||||
image: {get_param: DockerNovaImage}
|
||||
privileged: false
|
||||
user: root
|
||||
volumes:
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
- keys:
|
||||
CONTAINERNAME: {get_attr: [InitLogContainerName, value]}
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to files in the host.
|
||||
value:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
39
docker/services/logging/files/nova-placement.yaml
Normal file
39
docker/services/logging/files/nova-placement.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
heat_template_version: pike
|
||||
|
||||
description: >
|
||||
Template for nova-placement's logging to files
|
||||
|
||||
parameters:
|
||||
DockerNovaPlacementImage:
|
||||
description: image
|
||||
type: string
|
||||
|
||||
outputs:
|
||||
config_settings:
|
||||
description: Extra hieradata needed to log to files in the host.
|
||||
value: null
|
||||
volumes:
|
||||
description: The volumes needed to log to files in the host.
|
||||
value: &nova_placement_volumes
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-placement:/var/log/httpd
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to files in the host.
|
||||
value:
|
||||
step_2:
|
||||
nova_placement_init_log:
|
||||
start_order: 1
|
||||
image: {get_param: DockerNovaPlacementImage}
|
||||
user: root
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
volumes: *nova_placement_volumes
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to files in the host.
|
||||
value:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- /var/log/containers/nova
|
||||
- /var/log/containers/httpd/nova-placement
|
60
docker/services/logging/stdout/nova-api.yaml
Normal file
60
docker/services/logging/stdout/nova-api.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
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
|
30
docker/services/logging/stdout/nova-common.yaml
Normal file
30
docker/services/logging/stdout/nova-common.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
heat_template_version: pike
|
||||
|
||||
description: >
|
||||
Template for nova's logging to stdout
|
||||
|
||||
parameters:
|
||||
DockerNovaImage:
|
||||
description: image
|
||||
type: string
|
||||
NovaServiceName:
|
||||
description: service name
|
||||
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: null
|
||||
volumes:
|
||||
description: The volumes needed to log to stdout.
|
||||
value: null
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to stdout.
|
||||
value:
|
||||
step_2: {}
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to stdout.
|
||||
value: null
|
60
docker/services/logging/stdout/nova-placement.yaml
Normal file
60
docker/services/logging/stdout/nova-placement.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
heat_template_version: pike
|
||||
|
||||
description: >
|
||||
Template for nova-placement's logging to stdout
|
||||
|
||||
parameters:
|
||||
DockerNovaPlacementImage:
|
||||
description: image
|
||||
type: string
|
||||
|
||||
outputs:
|
||||
config_settings:
|
||||
description: Extra hieradata needed to log to stdout.
|
||||
value:
|
||||
nova::wsgi::apache_placement::access_log_file: /var/log/httpd/access.log
|
||||
nova::wsgi::apache_placement::error_log_file: /var/log/httpd/error_log
|
||||
volumes:
|
||||
description: The volumes needed to log to stdout or a sidecar container.
|
||||
value:
|
||||
- NovaPlacementLogs:/var/log/
|
||||
docker_config:
|
||||
description: Extra containers needed for logging to stdout or a sidecar container.
|
||||
value:
|
||||
step_2:
|
||||
nova_placement_apache_error_logs:
|
||||
start_order: 1
|
||||
image: {get_param: DockerNovaPlacementImage}
|
||||
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:
|
||||
- NovaPlacementLogs:/var/log/
|
||||
nova_placement_apache_access_logs:
|
||||
start_order: 1
|
||||
image: {get_param: DockerNovaPlacementImage}
|
||||
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:
|
||||
- NovaPlacementLogs:/var/log/
|
||||
nova_placement_logs:
|
||||
start_order: 2
|
||||
image: {get_param: DockerNovaPlacementImage}
|
||||
user: nova
|
||||
privileged: false
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: '[ -p /var/log/nova/nova-placement-api.log ]'
|
||||
command: ['/bin/bash', '-c', 'mkdir -p /var/log/nova && rm -f /var/log/nova/nova-placement-api.log && mkfifo /var/log/nova/nova-placement-api.log && while true; do cat /var/log/nova/nova-placement-api.log; done']
|
||||
volumes:
|
||||
- NovaPlacementLogs:/var/log/
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to files in the host.
|
||||
value: null
|
@ -66,6 +66,9 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaApiLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaApi
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova API role.
|
||||
@ -74,6 +77,7 @@ outputs:
|
||||
config_settings:
|
||||
map_merge:
|
||||
- get_attr: [NovaApiBase, role_data, config_settings]
|
||||
- get_attr: [NovaApiLogging, config_settings]
|
||||
- apache::default_vhost: false
|
||||
logging_source: {get_attr: [NovaApiBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaApiBase, role_data, logging_groups]}
|
||||
@ -114,31 +118,22 @@ outputs:
|
||||
owner: nova:nova
|
||||
recurse: true
|
||||
docker_config:
|
||||
# db sync runs before permissions set by kolla_config
|
||||
step_2:
|
||||
nova_init_logs:
|
||||
image: &nova_api_image {get_param: DockerNovaApiImage}
|
||||
privileged: false
|
||||
user: root
|
||||
volumes:
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-api:/var/log/httpd
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
get_attr: [NovaApiLogging, docker_config, step_2]
|
||||
step_3:
|
||||
nova_api_db_sync:
|
||||
start_order: 0
|
||||
image: *nova_api_image
|
||||
image: &nova_api_image {get_param: DockerNovaApiImage}
|
||||
net: host
|
||||
detach: false
|
||||
user: root
|
||||
volumes: &nova_api_bootstrap_volumes
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaApiLogging, volumes]}
|
||||
-
|
||||
- /var/lib/config-data/nova/etc/my.cnf.d/tripleo.cnf:/etc/my.cnf.d/tripleo.cnf:ro
|
||||
- /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-api:/var/log/httpd
|
||||
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage api_db sync'"
|
||||
# FIXME: we probably want to wait on the 'cell_v2 update' in order for this
|
||||
# to be capable of upgrading a baremetal setup. This is to ensure the name
|
||||
@ -182,11 +177,10 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaApiLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-api:/var/log/httpd
|
||||
-
|
||||
if:
|
||||
- internal_tls_enabled
|
||||
@ -210,11 +204,10 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaApiLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_api_cron.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-api:/var/log/httpd
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
step_5:
|
||||
@ -228,14 +221,7 @@ outputs:
|
||||
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts --verbose'"
|
||||
metadata_settings:
|
||||
get_attr: [NovaApiBase, role_data, metadata_settings]
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- /var/log/containers/nova
|
||||
- /var/log/containers/httpd/nova-api
|
||||
host_prep_tasks: {get_attr: [NovaApiLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_api service
|
||||
tags: step2
|
||||
|
@ -64,12 +64,21 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaCommon
|
||||
properties:
|
||||
DockerNovaImage: {get_param: DockerNovaConductorImage}
|
||||
NovaServiceName: 'conductor'
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Conductor service.
|
||||
value:
|
||||
service_name: {get_attr: [NovaConductorBase, role_data, service_name]}
|
||||
config_settings: {get_attr: [NovaConductorBase, role_data, config_settings]}
|
||||
config_settings:
|
||||
map_merge:
|
||||
- {get_attr: [NovaConductorBase, role_data, config_settings]}
|
||||
- {get_attr: [NovaLogging, config_settings]}
|
||||
logging_source: {get_attr: [NovaConductorBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaConductorBase, role_data, logging_groups]}
|
||||
step_config: &step_config
|
||||
@ -86,7 +95,11 @@ outputs:
|
||||
config_image: {get_param: DockerNovaConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/nova_conductor.json:
|
||||
command: /usr/bin/nova-conductor
|
||||
command:
|
||||
list_join:
|
||||
- ' '
|
||||
- - /usr/bin/nova-conductor
|
||||
- get_attr: [NovaLogging, cmd_extra_args]
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
@ -106,17 +119,13 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_conductor.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Set compute upgrade level to auto
|
||||
tags: step1
|
||||
|
@ -59,12 +59,21 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaCommon
|
||||
properties:
|
||||
DockerNovaImage: {get_param: DockerNovaConsoleauthImage}
|
||||
NovaServiceName: 'consoleauth'
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Consoleauth service.
|
||||
value:
|
||||
service_name: {get_attr: [NovaConsoleauthPuppetBase, role_data, service_name]}
|
||||
config_settings: {get_attr: [NovaConsoleauthPuppetBase, role_data, config_settings]}
|
||||
config_settings:
|
||||
map_merge:
|
||||
- {get_attr: [NovaConsoleauthPuppetBase, role_data, config_settings]}
|
||||
- {get_attr: [NovaLogging, config_settings]}
|
||||
logging_source: {get_attr: [NovaConsoleauthPuppetBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaConsoleauthPuppetBase, role_data, logging_groups]}
|
||||
step_config: &step_config
|
||||
@ -81,7 +90,11 @@ outputs:
|
||||
config_image: {get_param: DockerNovaConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/nova_consoleauth.json:
|
||||
command: /usr/bin/nova-consoleauth
|
||||
command:
|
||||
list_join:
|
||||
- ' '
|
||||
- - /usr/bin/nova-consoleauth
|
||||
- get_attr: [NovaLogging, cmd_extra_args]
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
@ -101,17 +114,13 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_consoleauth.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_consoleauth service
|
||||
tags: step2
|
||||
|
@ -52,6 +52,12 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaCommon
|
||||
properties:
|
||||
DockerNovaImage: {get_param: DockerNovaMetadataImage}
|
||||
NovaServiceName: 'metadata'
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Metadata service.
|
||||
@ -60,6 +66,7 @@ outputs:
|
||||
config_settings:
|
||||
map_merge:
|
||||
- get_attr: [NovaMetadataBase, role_data, config_settings]
|
||||
- {get_attr: [NovaLogging, config_settings]}
|
||||
logging_source: {get_attr: [NovaMetadataBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaMetadataBase, role_data, logging_groups]}
|
||||
step_config: &step_config
|
||||
@ -73,7 +80,11 @@ outputs:
|
||||
config_image: {get_param: DockerNovaConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/nova_metadata.json:
|
||||
command: /usr/bin/nova-api-metadata
|
||||
command:
|
||||
list_join:
|
||||
- ' '
|
||||
- - /usr/bin/nova-api-metadata
|
||||
- get_attr: [NovaLogging, cmd_extra_args]
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
@ -85,17 +96,11 @@ outputs:
|
||||
recurse: true
|
||||
docker_config:
|
||||
step_2:
|
||||
nova_init_logs:
|
||||
image: &nova_metadata_image {get_param: DockerNovaMetadataImage}
|
||||
privileged: false
|
||||
user: root
|
||||
volumes:
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
get_attr: [NovaLogging, docker_config, step_2]
|
||||
step_4:
|
||||
nova_metadata:
|
||||
start_order: 2
|
||||
image: *nova_metadata_image
|
||||
image: &nova_metadata_image {get_param: DockerNovaMetadataImage}
|
||||
net: host
|
||||
user: nova
|
||||
privileged: true
|
||||
@ -103,19 +108,15 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_metadata.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
metadata_settings:
|
||||
get_attr: [NovaMetadataBase, role_data, metadata_settings]
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_api service
|
||||
tags: step2
|
||||
|
@ -66,6 +66,9 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaPlacementLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaPlacement
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Placement API role.
|
||||
@ -74,6 +77,7 @@ outputs:
|
||||
config_settings:
|
||||
map_merge:
|
||||
- get_attr: [NovaPlacementBase, role_data, config_settings]
|
||||
- get_attr: [NovaPlacementLogging, config_settings]
|
||||
- apache::default_vhost: false
|
||||
logging_source: {get_attr: [NovaPlacementBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaPlacementBase, role_data, logging_groups]}
|
||||
@ -102,6 +106,8 @@ outputs:
|
||||
owner: nova:nova
|
||||
recurse: true
|
||||
docker_config:
|
||||
step_2:
|
||||
get_attr: [NovaPlacementLogging, docker_config, step_2]
|
||||
# start this early so it is up before computes start reporting
|
||||
step_3:
|
||||
nova_placement:
|
||||
@ -113,11 +119,10 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- get_attr: [NovaPlacementLogging, volumes]
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_placement.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova_placement/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
- /var/log/containers/httpd/nova-placement:/var/log/httpd
|
||||
-
|
||||
if:
|
||||
- internal_tls_enabled
|
||||
@ -132,14 +137,7 @@ outputs:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
metadata_settings:
|
||||
get_attr: [NovaPlacementBase, role_data, metadata_settings]
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- /var/log/containers/nova
|
||||
- /var/log/containers/httpd/nova-placement
|
||||
host_prep_tasks: {get_attr: [NovaPlacementLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_placement service (running under httpd)
|
||||
tags: step2
|
||||
|
@ -59,12 +59,21 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaCommon
|
||||
properties:
|
||||
DockerNovaImage: {get_param: DockerNovaSchedulerImage}
|
||||
NovaServiceName: 'scheduler'
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Scheduler service.
|
||||
value:
|
||||
service_name: {get_attr: [NovaSchedulerBase, role_data, service_name]}
|
||||
config_settings: {get_attr: [NovaSchedulerBase, role_data, config_settings]}
|
||||
config_settings:
|
||||
map_merge:
|
||||
- {get_attr: [NovaSchedulerBase, role_data, config_settings]}
|
||||
- {get_attr: [NovaLogging, config_settings]}
|
||||
logging_source: {get_attr: [NovaSchedulerBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaSchedulerBase, role_data, logging_groups]}
|
||||
step_config: &step_config
|
||||
@ -81,7 +90,11 @@ outputs:
|
||||
config_image: {get_param: DockerNovaConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/nova_scheduler.json:
|
||||
command: /usr/bin/nova-scheduler
|
||||
command:
|
||||
list_join:
|
||||
- ' '
|
||||
- - /usr/bin/nova-scheduler
|
||||
- get_attr: [NovaLogging, cmd_extra_args]
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
@ -101,18 +114,14 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_scheduler.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /run:/run
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_scheduler service
|
||||
tags: step2
|
||||
|
@ -59,12 +59,21 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLogging:
|
||||
type: OS::TripleO::Services::Logging::NovaCommon
|
||||
properties:
|
||||
DockerNovaImage: {get_param: DockerNovaVncProxyImage}
|
||||
NovaServiceName: 'vncproxy'
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Nova Vncproxy service.
|
||||
value:
|
||||
service_name: {get_attr: [NovaVncProxyPuppetBase, role_data, service_name]}
|
||||
config_settings: {get_attr: [NovaVncProxyPuppetBase, role_data, config_settings]}
|
||||
config_settings:
|
||||
map_merge:
|
||||
- {get_attr: [NovaVncProxyPuppetBase, role_data, config_settings]}
|
||||
- {get_attr: [NovaLogging, config_settings]}
|
||||
logging_source: {get_attr: [NovaVncProxyPuppetBase, role_data, logging_source]}
|
||||
logging_groups: {get_attr: [NovaVncProxyPuppetBase, role_data, logging_groups]}
|
||||
step_config: &step_config
|
||||
@ -81,7 +90,11 @@ outputs:
|
||||
config_image: {get_param: DockerNovaConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/nova_vnc_proxy.json:
|
||||
command: /usr/bin/nova-novncproxy --web /usr/share/novnc/
|
||||
command:
|
||||
list_join:
|
||||
- ' '
|
||||
- - /usr/bin/nova-novncproxy --web /usr/share/novnc/
|
||||
- get_attr: [NovaLogging, cmd_extra_args]
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
@ -101,17 +114,13 @@ outputs:
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [NovaLogging, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/nova_vnc_proxy.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/nova:/var/log/nova
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: create persistent logs directory
|
||||
file:
|
||||
path: /var/log/containers/nova
|
||||
state: directory
|
||||
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Stop and disable nova_vnc_proxy service
|
||||
tags: step2
|
||||
|
@ -2,3 +2,6 @@ resource_registry:
|
||||
|
||||
OS::TripleO::Services::Logging::GlanceApi: ../docker/services/logging/stdout/glance-api.yaml
|
||||
OS::TripleO::Services::Logging::Keystone: ../docker/services/logging/stdout/keystone.yaml
|
||||
OS::TripleO::Services::Logging::NovaApi: ../docker/services/logging/stdout/nova-api.yaml
|
||||
OS::TripleO::Services::Logging::NovaCommon: ../docker/services/logging/stdout/nova-common.yaml
|
||||
OS::TripleO::Services::Logging::NovaPlacement: ../docker/services/logging/stdout/nova-placement.yaml
|
||||
|
@ -301,6 +301,9 @@ resource_registry:
|
||||
# Logging
|
||||
OS::TripleO::Services::Logging::GlanceApi: docker/services/logging/files/glance-api.yaml
|
||||
OS::TripleO::Services::Logging::Keystone: docker/services/logging/files/keystone.yaml
|
||||
OS::TripleO::Services::Logging::NovaApi: docker/services/logging/files/nova-api.yaml
|
||||
OS::TripleO::Services::Logging::NovaCommon: docker/services/logging/files/nova-common.yaml
|
||||
OS::TripleO::Services::Logging::NovaPlacement: docker/services/logging/files/nova-placement.yaml
|
||||
|
||||
parameter_defaults:
|
||||
EnablePackageInstall: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user