Allow barbican services to use independent hostnames

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

* barbican_internal_fqdn
* barbican_external_fqdn

These default to the old values of kolla_internal_fqdn or
kolla_external_fqdn.

This also adds a barbican_api_listen_port option, which defaults to
barbican_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: I1807a9c8b64d737d0e278bb3e925fecb4fadfb08
Implements: blueprint service-hostnames
This commit is contained in:
Jim Rollenhagen 2018-12-27 14:10:26 -05:00
parent 76b6d41e51
commit 857871df00
5 changed files with 12 additions and 7 deletions

View File

@ -186,7 +186,10 @@ neutron_ipam_driver: "internal"
# The list should be in alphabetical order
aodh_api_port: "8042"
barbican_internal_fqdn: "{{ kolla_internal_fqdn }}"
barbican_external_fqdn: "{{ kolla_external_fqdn }}"
barbican_api_port: "9311"
barbican_api_listen_port: "{{ barbican_api_port }}"
blazar_api_port: "1234"

View File

@ -20,11 +20,13 @@ barbican_services:
mode: "http"
external: false
port: "{{ barbican_api_port }}"
listen_port: "{{ barbican_api_listen_port }}"
barbican_api_external:
enabled: "{{ enable_barbican }}"
mode: "http"
external: true
port: "{{ barbican_api_port }}"
listen_port: "{{ barbican_api_listen_port }}"
barbican-keystone-listener:
container_name: barbican_keystone_listener
group: barbican-keystone-listener
@ -82,9 +84,9 @@ barbican_worker_dimensions: "{{ default_container_dimensions }}"
####################
# OpenStack
####################
barbican_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ barbican_api_port }}"
barbican_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ barbican_api_port }}"
barbican_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ barbican_api_port }}"
barbican_admin_endpoint: "{{ admin_protocol }}://{{ barbican_internal_fqdn }}:{{ barbican_api_port }}"
barbican_internal_endpoint: "{{ internal_protocol }}://{{ barbican_internal_fqdn }}:{{ barbican_api_port }}"
barbican_public_endpoint: "{{ public_protocol }}://{{ barbican_external_fqdn }}:{{ barbican_api_port }}"
barbican_logging_debug: "{{ openstack_logging_debug }}"

View File

@ -8,7 +8,7 @@
- name: Checking free port for Barbican API
wait_for:
host: "{{ api_interface_address }}"
port: "{{ barbican_api_port }}"
port: "{{ barbican_api_listen_port }}"
connect_timeout: 1
timeout: 1
state: stopped

View File

@ -1,5 +1,5 @@
[uwsgi]
socket = {{ api_interface_address }}:{{ barbican_api_port }}
socket = {{ api_interface_address }}:{{ barbican_api_listen_port }}
protocol = http
processes = {{ openstack_service_workers }}
lazy = true

View File

@ -2,9 +2,9 @@
debug = {{ barbican_logging_debug }}
log_dir = /var/log/kolla/barbican
bind_port = {{ barbican_api_port }}
bind_port = {{ barbican_api_listen_port }}
bind_host = {{ api_interface_address }}
host_href = {{ public_protocol }}://{{ kolla_external_fqdn }}:{{ barbican_api_port }}
host_href = {{ public_protocol }}://{{ barbican_external_fqdn }}:{{ barbican_api_port }}
backlog = 4096
max_allowed_secret_in_bytes = 10000
max_allowed_request_size_in_bytes = 1000000