tripleo-heat-templates/deployment/nova/nova-manager-container-puppet.yaml
Alex Schultz ebab335f38 Role specific container support
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
2022-01-21 14:18:02 -07:00

114 lines
3.6 KiB
YAML

heat_template_version: wallaby
description: >
OpenStack containerized nova-manage runner service
parameters:
ContainerNovaConductorImage:
description: image
type: string
tags:
- role_specific
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. Use
parameter_merge_strategies to merge it with the defaults.
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
resources:
# Cannot control nova-manage logging so expect it to log to file
NovaLogging:
type: ../logging/files/nova-common.yaml
properties:
ContainerNovaImage: &nova_conductor_image {get_attr: [RoleParametersValue, value, ContainerNovaConductorImage]}
NovaServiceName: 'manager'
ContainersCommon:
type: ../containers-common.yaml
NovaConductorBase:
type: ./nova-conductor-container-puppet.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
NovaAdditionalCell: false # API DB access required
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- ContainerNovaConductorImage: ContainerNovaConductorImage
- values: {get_param: [RoleParameters]}
- values:
ContainerNovaConductorImage: {get_param: ContainerNovaConductorImage}
outputs:
role_data:
description: Role data for the nova-manage runner service.
value:
service_name: nova_manager
config_settings:
get_attr: [NovaConductorBase, role_data, config_settings]
service_config_settings:
mysql:
get_attr: [NovaConductorBase, role_data, service_config_settings, mysql]
# BEGIN DOCKER SETTINGS
puppet_config:
get_attr: [NovaConductorBase, role_data, puppet_config]
kolla_config:
/var/lib/kolla/config_files/nova_manager.json:
command: "/bin/sleep infinity"
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
permissions:
- path: /var/log/nova
owner: nova:nova
recurse: true
docker_config:
step_2:
get_attr: [NovaLogging, docker_config, step_2]
step_4:
nova_manager:
image: *nova_conductor_image
net: host
privileged: false
restart: always
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [NovaLogging, volumes]}
- - /var/lib/kolla/config_files/nova_manager.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/nova:/var/lib/kolla/config_files/src:ro
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
get_attr: [NovaLogging, host_prep_tasks]