tripleo-heat-templates/deployment/designate/designate-worker-container-puppet.yaml
Rajesh Tailor 6861fb324b Fix typos in comments and parameter descriptions
This change fixes typos in comments, parameter descriptions
and ansible task names.

Change-Id: I82b67ca834077b66ebd71744face3bba0b43da2f
2022-08-03 17:07:11 +05:30

198 lines
6.6 KiB
YAML

heat_template_version: wallaby
description: >
OpenStack containerized Designate Worker service
parameters:
ContainerDesignateWorkerImage:
description: image
type: string
tags:
- role_specific
ContainerDesignateConfigImage:
description: The container image to use for the designate config_volume
type: string
tags:
- role_specific
DesignateWorkerLoggingSource:
type: json
default:
tag: openstack.designate.worker
file: /var/log/containers/designate/worker.log
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
MonitoringSubscriptionDesignateWorker:
default: 'overcloud-designate-worker'
type: string
DesignateWorkers:
default: 0
description: Number of workers for Designate services.
type: number
DesignateRndcKey:
description: The rndc key secret for communication with BIND.
type: string
hidden: true
DesignateExternalBindServers:
description: >
Used to configure designate with bind servers managed
externally to the overcloud. Example format:
[ {
# entry with minimal required values
"host": "10.4.22.99",
"rndc_key": "FJOdVqZr5gVXbU9kIagY0IJVDq7CV/mDVb/M7mlLMgY="
},
{
"host": "10.5.22.99",
"port": "53",
"rndc_host": "10.5.22.98",
"rndc_port": "953",
"rndc_key": "FJOdVqZr5gVXbU9kIagY0IJVDq7CV/mDVb/M7mlLMgY="
}
]
type: json
default: []
hidden: true
conditions:
designate_workers_zero: {equals : [{get_param: DesignateWorkers}, 0]}
resources:
ContainersCommon:
type: ../containers-common.yaml
DesignateBase:
type: ./designate-base.yaml
properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- ContainerDesignateWorkerImage: ContainerDesignateWorkerImage
ContainerDesignateConfigImage: ContainerDesignateConfigImage
- values: {get_param: [RoleParameters]}
- values:
ContainerDesignateWorkerImage: {get_param: ContainerDesignateWorkerImage}
ContainerDesignateConfigImage: {get_param: ContainerDesignateConfigImage}
outputs:
role_data:
description: Role data for the Designate Worker role.
value:
service_name: designate_worker
firewall_rules:
'140 designate_worker udp':
proto: 'udp'
dport:
- 53
- 953
'141 designate_worker tcp':
proto: 'tcp'
dport:
- 53
- 953
monitoring_subscription: {get_param: MonitoringSubscriptionDesignateWorker}
config_settings:
map_merge:
- get_attr: [DesignateBase, role_data, config_settings]
-
if:
- designate_workers_zero
- {}
- designate::worker::workers: {get_param: DesignateWorkers}
service_config_settings:
rsyslog:
tripleo_logging_sources_designate_worker:
- {get_param: DesignateWorkerLoggingSource}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: designate
puppet_tags: designate_config
step_config:
list_join:
- "\n"
- - {get_attr: [DesignateBase, role_data, step_config]}
- "include tripleo::profile::base::designate::worker"
- "include tripleo::profile::base::designate::backend"
config_image: {get_attr: [RoleParametersValue, value, ContainerDesignateConfigImage]}
kolla_config:
/var/lib/kolla/config_files/designate_worker.json:
command: /usr/bin/designate-worker --config-file=/etc/designate/designate.conf --log-file=/var/log/designate/worker.log
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
permissions:
- path: /var/log/designate
owner: designate:designate
recurse: true
deploy_steps_tasks:
- name: generate rndc key configuration files
when: step|int == 4
import_role:
name: designate_rndc_config
vars:
designate_rndc_key: {get_param: DesignateRndcKey}
tripleo_external_bind_servers: {get_param: DesignateExternalBindServers}
designate_worker_network: {get_param: [ServiceNetMap, DesignateWorkerNetwork]}
docker_config:
step_4:
designate_worker:
image: &designate_worker_image {get_attr: [RoleParametersValue, value, ContainerDesignateWorkerImage]}
net: host
privileged: false
stop_grace_period: 300
restart: always
healthcheck:
test: /openstack/healthcheck
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /run:/run
- /var/lib/kolla/config_files/designate_worker.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/designate:/var/lib/kolla/config_files/src:ro
- /var/log/containers/designate:/var/log/designate:z
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
mode: "{{ item.mode }}"
with_items:
- { 'path': /var/log/containers/designate, 'setype': container_file_t, 'mode': '0750' }