Allow heat services to use independent hostnames

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

* heat_internal_fqdn
* heat_external_fqdn
* heat_cfn_internal_fqdn
* heat_cfn_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds heat_api_listen_port and heat_api_cfn_listen_port
options, which default to heat_api_port and heat_api_cfn_port for
backward compatibility.

These options 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: Ifb8bb55799703883d81be6a55641be7b2474fd4e
Implements: blueprint service-hostnames
This commit is contained in:
Jim Rollenhagen 2018-12-27 15:37:49 -05:00
parent d1d1837c25
commit d0fc1ec278
4 changed files with 23 additions and 13 deletions

View File

@ -233,8 +233,14 @@ grafana_server_port: "3000"
haproxy_stats_port: "1984"
haproxy_monitor_port: "61313"
heat_internal_fqdn: "{{ kolla_internal_fqdn }}"
heat_external_fqdn: "{{ kolla_external_fqdn }}"
heat_api_port: "8004"
heat_api_listen_port: "{{ heat_api_port }}"
heat_cfn_internal_fqdn: "{{ kolla_internal_fqdn }}"
heat_cfn_external_fqdn: "{{ kolla_external_fqdn }}"
heat_api_cfn_port: "8000"
heat_api_cfn_listen_port: "{{ heat_api_cfn_port }}"
horizon_port: "80"

View File

@ -19,11 +19,13 @@ heat_services:
mode: "http"
external: false
port: "{{ heat_api_port }}"
listen_port: "{{ heat_api_listen_port }}"
heat_api_external:
enabled: "{{ enable_heat }}"
mode: "http"
external: true
port: "{{ heat_api_port }}"
listen_port: "{{ heat_api_listen_port }}"
heat-api-cfn:
container_name: heat_api_cfn
group: heat-api-cfn
@ -41,11 +43,13 @@ heat_services:
mode: "http"
external: false
port: "{{ heat_api_cfn_port }}"
listen_port: "{{ heat_api_cfn_listen_port }}"
heat_api_cfn_external:
enabled: "{{ enable_heat }}"
mode: "http"
external: true
port: "{{ heat_api_cfn_port }}"
listen_port: "{{ heat_api_cfn_listen_port }}"
heat-engine:
container_name: heat_engine
group: heat-engine
@ -92,12 +96,12 @@ heat_engine_dimensions: "{{ default_container_dimensions }}"
####################
# OpenStack
####################
heat_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_cfn_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_cfn_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_cfn_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_admin_endpoint: "{{ admin_protocol }}://{{ heat_internal_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_internal_endpoint: "{{ internal_protocol }}://{{ heat_internal_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_public_endpoint: "{{ public_protocol }}://{{ heat_external_fqdn }}:{{ heat_api_port }}/v1/%(tenant_id)s"
heat_cfn_admin_endpoint: "{{ admin_protocol }}://{{ heat_cfn_internal_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_cfn_internal_endpoint: "{{ internal_protocol }}://{{ heat_cfn_internal_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_cfn_public_endpoint: "{{ public_protocol }}://{{ heat_cfn_external_fqdn }}:{{ heat_api_cfn_port }}/v1"
heat_logging_debug: "{{ openstack_logging_debug }}"

View File

@ -9,7 +9,7 @@
- name: Checking free port for Heat API
wait_for:
host: "{{ api_interface_address }}"
port: "{{ heat_api_port }}"
port: "{{ heat_api_listen_port }}"
connect_timeout: 1
timeout: 1
state: stopped
@ -20,7 +20,7 @@
- name: Checking free port for Heat API CFN
wait_for:
host: "{{ api_interface_address }}"
port: "{{ heat_api_cfn_port }}"
port: "{{ heat_api_cfn_listen_port }}"
connect_timeout: 1
timeout: 1
state: stopped

View File

@ -3,9 +3,9 @@ debug = {{ heat_logging_debug }}
log_dir = /var/log/kolla/heat
heat_watch_server_url = {{ public_protocol }}://{{ kolla_external_fqdn }}:{{ heat_api_cfn_port }}
heat_metadata_server_url = {{ public_protocol }}://{{ kolla_external_fqdn }}:{{ heat_api_cfn_port }}
heat_waitcondition_server_url = {{ public_protocol }}://{{ kolla_external_fqdn }}:{{ heat_api_cfn_port }}/v1/waitcondition
heat_watch_server_url = {{ public_protocol }}://{{ heat_cfn_external_fqdn }}:{{ heat_api_cfn_port }}
heat_metadata_server_url = {{ public_protocol }}://{{ heat_cfn_external_fqdn }}:{{ heat_api_cfn_port }}
heat_waitcondition_server_url = {{ public_protocol }}://{{ heat_cfn_external_fqdn }}:{{ heat_api_cfn_port }}/v1/waitcondition
heat_stack_user_role = {{ heat_stack_user_role }}
@ -26,14 +26,14 @@ region_name_for_services = {{ openstack_region_name }}
{% if service_name == 'heat-api' %}
[heat_api]
bind_host = {{ api_interface_address }}
bind_port = {{ heat_api_port }}
bind_port = {{ heat_api_listen_port }}
workers = {{ openstack_service_workers }}
{% endif %}
{% if service_name == 'heat-api-cfn' %}
[heat_api_cfn]
bind_host = {{ api_interface_address }}
bind_port = {{ heat_api_cfn_port }}
bind_port = {{ heat_api_cfn_listen_port }}
workers = {{ openstack_service_workers }}
{% endif %}