Allow designate services to use independent hostnames

This allows designate service endpoints to use custom hostnames, and adds
the
following variables:

* designate_internal_fqdn
* designate_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds a designate_api_listen_port option, which defaults to
designate_api_port for backward compatibility.

This option allow the user to differentiate between the port the
service listens on, and the port the service is reachable on. This is
useful for external load balancers which live on the same host as the
service itself.

Change-Id: I654bb3d1109b96cbaff6f450655cd65f349a94e6
Implements: blueprint service-hostnames
This commit is contained in:
Jim Rollenhagen 2018-12-27 14:05:41 -05:00
parent 45bde4b9b3
commit 76b6d41e51
5 changed files with 12 additions and 7 deletions

View File

@ -201,7 +201,10 @@ cloudkitty_api_port: "8889"
collectd_udp_port: "25826"
designate_internal_fqdn: "{{ kolla_internal_fqdn }}"
designate_external_fqdn: "{{ kolla_external_fqdn }}"
designate_api_port: "9001"
designate_api_listen_port: "{{ designate_api_port }}"
designate_bind_port: "53"
designate_mdns_port: "{{ '53' if designate_backend == 'infoblox' else '5354' }}"
designate_rndc_port: "953"

View File

@ -19,11 +19,13 @@ designate_services:
mode: "http"
external: false
port: "{{ designate_api_port }}"
listen_port: "{{ designate_api_listen_port }}"
designate_api_external:
enabled: "{{ enable_designate }}"
mode: "http"
external: true
port: "{{ designate_api_port }}"
listen_port: "{{ designate_api_listen_port }}"
designate-backend-bind9:
container_name: designate_backend_bind9
group: designate-backend-bind9
@ -149,9 +151,9 @@ designate_sink_dimensions: "{{ default_container_dimensions }}"
####################
# OpenStack
####################
designate_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ designate_api_port }}"
designate_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ designate_api_port }}"
designate_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ designate_api_port }}"
designate_admin_endpoint: "{{ admin_protocol }}://{{ designate_internal_fqdn }}:{{ designate_api_port }}"
designate_internal_endpoint: "{{ internal_protocol }}://{{ designate_internal_fqdn }}:{{ designate_api_port }}"
designate_public_endpoint: "{{ public_protocol }}://{{ designate_external_fqdn }}:{{ designate_api_port }}"
designate_logging_debug: "{{ openstack_logging_debug }}"

View File

@ -10,7 +10,7 @@
- name: Checking free port for designate API
wait_for:
host: "{{ api_interface_address }}"
port: "{{ designate_api_port }}"
port: "{{ designate_api_listen_port }}"
connect_timeout: 1
timeout: 1
state: stopped

View File

@ -11,8 +11,8 @@ default_pool_id = {{ designate_pool_id }}
workers = {{ openstack_service_workers }}
[service:api]
listen = {{ api_interface_address }}:{{ designate_api_port }}
api_base_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ designate_api_port }}
listen = {{ api_interface_address }}:{{ designate_api_listen_port }}
api_base_uri = {{ internal_protocol }}://{{ designate_internal_fqdn }}:{{ designate_api_port }}
enabled_extensions_v2 = 'quotas, reports'
workers = {{ openstack_service_workers }}
enable_host_header = True

View File

@ -138,7 +138,7 @@ base_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ octavia_api_po
{% if enable_designate | bool %}
[designate]
url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ designate_api_port }}/v2
url = {{ internal_protocol }}://{{ designate_internal_fqdn }}:{{ designate_api_port }}/v2
auth_uri = {{ keystone_internal_url }}
auth_url = {{ keystone_admin_url }}
auth_type = password