diff --git a/config.yaml b/config.yaml index d520c7e..e76853e 100644 --- a/config.yaml +++ b/config.yaml @@ -247,3 +247,10 @@ options: description: | Default multicast port number that will be used to communicate between HA Cluster nodes. + use-internal-endpoints: + type: boolean + default: False + description: | + Openstack mostly defaults to using public endpoints for + internal communication between services. If set to True this option + will configure services to use internal endpoints where possible. diff --git a/hooks/heat_utils.py b/hooks/heat_utils.py index ebcaab1..326ea46 100644 --- a/hooks/heat_utils.py +++ b/hooks/heat_utils.py @@ -103,6 +103,7 @@ CONFIG_FILES = OrderedDict([ context.SharedDBContext(relation_prefix='heat', ssl_dir=HEAT_DIR), context.OSConfigFlagContext(), + context.InternalEndpointContext(), HeatIdentityServiceContext(service=SVC, service_user=SVC), HeatHAProxyContext(), HeatSecurityContext(), diff --git a/templates/icehouse/heat.conf b/templates/icehouse/heat.conf index 84eb105..e0b7361 100644 --- a/templates/icehouse/heat.conf +++ b/templates/icehouse/heat.conf @@ -85,3 +85,8 @@ bind_port={{ api_cfn_listen_port }} bind_port=8000 {% endif %} workers = {{ workers }} + +{% if use_internal_endpoints -%} +[clients] +endpoint_type = internalURL +{%- endif %} diff --git a/templates/kilo/heat.conf b/templates/kilo/heat.conf index 0b1a04d..7557aa4 100644 --- a/templates/kilo/heat.conf +++ b/templates/kilo/heat.conf @@ -62,3 +62,7 @@ workers = {{ workers }} {% include "section-rabbitmq-oslo" %} +{% if use_internal_endpoints -%} +[clients] +endpoint_type = internalURL +{%- endif %} diff --git a/templates/liberty/heat.conf b/templates/liberty/heat.conf index 9147b5f..78b57e4 100644 --- a/templates/liberty/heat.conf +++ b/templates/liberty/heat.conf @@ -75,3 +75,7 @@ workers = {{ workers }} {% include "section-rabbitmq-oslo" %} +{% if use_internal_endpoints -%} +[clients] +endpoint_type = internalURL +{%- endif %} diff --git a/templates/mitaka/heat.conf b/templates/mitaka/heat.conf index 5d13953..c6543d9 100644 --- a/templates/mitaka/heat.conf +++ b/templates/mitaka/heat.conf @@ -66,3 +66,7 @@ workers = {{ workers }} {% include "section-rabbitmq-oslo" %} +{% if use_internal_endpoints -%} +[clients] +endpoint_type = internalURL +{%- endif %}