From 857807247d8f1a7270fdade30f570bf2f17789ce Mon Sep 17 00:00:00 2001 From: Brent Eagles Date: Mon, 7 Jun 2021 20:36:06 +0000 Subject: [PATCH] Add support for designate standalone jobs This patch adds the UnboundListenIPs that allows the deployer to specify an IP to be used in the event that neutron isn't being used to manage the overcloud networks - as is the case for standalone deployments. Change-Id: Id17dec07c2aa0a3b080eb05f71c637d6a422ec41 --- ci/environments/scenario003-standalone.yaml | 2 ++ .../unbound/unbound-container-ansible.yaml | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/ci/environments/scenario003-standalone.yaml b/ci/environments/scenario003-standalone.yaml index 237b2cfb19..5b37a2099c 100644 --- a/ci/environments/scenario003-standalone.yaml +++ b/ci/environments/scenario003-standalone.yaml @@ -19,6 +19,7 @@ resource_registry: OS::TripleO::Services::DesignateMDNS: ../../deployment/experimental/designate/designate-mdns-container-puppet.yaml OS::TripleO::Services::DesignateBind: ../../deployment/experimental/designate/designate-bind-container.yaml OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml + OS::TripleO::Services::Unbound: ../../deployment/unbound/unbound-container-ansible.yaml parameter_defaults: Debug: true @@ -31,6 +32,7 @@ parameter_defaults: RpcPort: 31459 NotifyPort: 5672 ContainerCli: podman + UnboundListenIPs: ["192.168.24.20"] ExtraFirewallRules: '301 allow arbitrary tcp rule': dport: 12345 diff --git a/deployment/unbound/unbound-container-ansible.yaml b/deployment/unbound/unbound-container-ansible.yaml index f28c84b1f1..79cd815515 100644 --- a/deployment/unbound/unbound-container-ansible.yaml +++ b/deployment/unbound/unbound-container-ansible.yaml @@ -57,6 +57,15 @@ parameters: unique IP so it can co-exist with bind on same host. Set to false to run unbound independently of designate type: boolean + UnboundListenIPs: + default: [] + description: A list of IPs to add to the externally accessible interface + (e.g. interface on the external network or the VIP interface + in standalone). If provided, the number of IPs must match the + number of deployed Unbound instances. If left empty, + the deployment will create additonal IPs using the external + network. + type: comma_delimited_list conditions: @@ -132,9 +141,29 @@ outputs: - { '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' } external_deploy_tasks: + - name: Get list of provided listen ips + when: + - step|int == 1 + set_fact: + unbound_listen_ips: { get_param: UnboundListenIPs } + - name: Distribute configured unbound listen IPs across nodes + when: + - step|int == 1 + - unbound_listen_ips|length > 0 + block: + - name: Set the unbound host ip fact + set_fact: + tripleo_unbound_listen_interfaces: "[ '{{ item.0 }}' ]" + delegate_to: "{{ item.1 }}" + delegate_facts: true + with_together: + - "{{ unbound_listen_ips }}" + - "{{ groups.unbound }}" + - name: Handle a bind and unbound collocated on the same host when: - step|int == 1 + - unbound_listen_ips|length == 0 block: - name: Create a neutron port for a new address os_port: