tripleo-heat-templates/deployment/unbound/unbound-container-ansible.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

215 lines
7.7 KiB
YAML

heat_template_version: wallaby
description: >
OpenStack containerized Unbound DNS resolver
parameters:
ContainerUnboundImage:
description: image
type: string
tags:
- role_specific
ContainerUnboundConfigImage:
description: The container image to use for the unbound config_volume
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
MonitoringSubscriptionUnbound:
default: 'overcloud-unbound'
type: string
OVNDnsServers:
default: []
description: List of servers to use as as dns forwarders
type: comma_delimited_list
NeutronDhcpAgentDnsmasqDnsServers:
default: []
description: List of servers to use as dnsmasq forwarders
type: comma_delimited_list
# Unbound specific parameters
UnboundAllowedCIDRs:
default: []
description: A list of CIDRs allowed to make queries through Unbound.
Example, ['192.0.2.0/24', '198.51.100.0/24']
type: comma_delimited_list
UnboundLogQueries:
default: false
description: If true, Unbound will log the query requests.
type: boolean
UnboundSecurityHarden:
default: true
description: When true, Unbound will block certain queries that could
have security implications to the Unbound service.
type: boolean
UnboundDesignateIntegration:
default: true
description: When true, Unbound will be configured to listen on an
unique IP so it can co-exist with bind on same host. Set
to false to run unbound independently of designate
type: boolean
UnboundForwardResolvers:
default: []
description: A list of DNS resolver IP addresses, with optional port,
that Unbound will forward resolution requests to if Unbound
does not have the answer.
Example, ['192.0.2.10', '192.0.2.20@53']
type: comma_delimited_list
UnboundForwardFallback:
default: true
description: When true, if the forwarded query receives a SERVFAIL,
Unbound will process the request as a standard recursive
resolution.
type: boolean
UnboundAllowRecursion:
default: true
description: When false, Unbound will not attempt to recursively resolve
the request. It will only answer for queries using local
information.
type: boolean
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
resources:
ContainersCommon:
type: ../containers-common.yaml
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- ContainerUnboundImage: ContainerUnboundImage
ContainerUnboundConfigImage: ContainerUnboundConfigImage
- values: {get_param: [RoleParameters]}
- values:
ContainerUnboundImage: {get_param: ContainerUnboundImage}
ContainerUnboundConfigImage: {get_param: ContainerUnboundConfigImage}
outputs:
role_data:
description: Role data for the Unbound instance.
value:
service_name: unbound
firewall_rules:
'140 unbound udp':
proto: 'udp'
dport:
- 53
'141 unbound tcp':
proto: 'tcp'
dport:
- 53
- 853
monitoring_subscription: {get_param: MonitoringSubscriptionUnbound}
config_settings: {}
service_config_settings:
neutron_dhcp:
tripleo::profile::base::neutron::dhcp::neutron_dns_integration: {get_param: UnboundDesignateIntegration}
neutron_plugin_ml2_ovn:
tripleo::profile::base::neutron::plugins::ml2::ovn::neutron_dns_integration: {get_param: UnboundDesignateIntegration}
kolla_config:
/var/lib/kolla/config_files/unbound.json:
command: /usr/sbin/unbound -d -d -p
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/etc/unbound/conf.d/"
merge: true
owner: unbound:unbound
perm: '0640'
permissions:
- path: /var/log/unbound
owner: unbound:unbound
recurse: true
docker_config:
step_3:
unbound:
start_order: 1
image: {get_attr: [RoleParametersValue, value, ContainerUnboundImage]}
net: host
privileged: false
restart: always
healthcheck:
test: /usr/sbin/unbound-streamtcp -u . SOA IN
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
- - /run:/run
- /var/lib/kolla/config_files/unbound.json:/var/lib/kolla/config_files/config.json:ro
- /var/log/containers/unbound:/var/log/unbound:z
- /var/lib/config-data/ansible-generated/unbound:/var/lib/kolla/config_files/src:ro
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/unbound, 'setype': container_file_t, 'mode': '0750' }
- { 'path': /var/lib/config-data/ansible-generated/unbound, 'setype': container_file_t, 'mode': '0750' }
deploy_steps_tasks:
- name: Configure Unbound
when: step|int == 1
import_role:
name: tripleo_unbound
vars:
tripleo_unbound_config_basedir: /var/lib/config-data/ansible-generated/unbound
tripleo_unbound_network_name: {get_param: [ServiceNetMap, UnboundNetwork]}
tripleo_unbound_external_network_name: {get_param: [ServiceNetMap, PublicNetwork]}
tripleo_unbound_internal_network_name: {get_param: [ServiceNetMap, NeutronApiNetwork]}
tripleo_unbound_allowed_cidrs: {get_param: UnboundAllowedCIDRs}
tripleo_unbound_log_queries: {get_param: UnboundLogQueries}
tripleo_unbound_security_harden: {get_param: UnboundSecurityHarden}
tripleo_unbound_forward_resolvers: {get_param: UnboundForwardResolvers}
tripleo_unbound_forward_fallback: {get_param: UnboundForwardFallback}
tripleo_unbound_allow_recursion: {get_param: UnboundAllowRecursion}
tripleo_external_bind_servers: {get_param: DesignateExternalBindServers}