2035b88f5b
Fix the glance-api endpoint used by cinder and nova services at DCN sites. When internal TLS is enabled, the URI must use a FQDN and not an IP address. Closes-Bug: #1893453 Change-Id: I386a035f9688c54d617e714888c9c0fa14f34a1e
144 lines
5.3 KiB
YAML
144 lines
5.3 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: >
|
|
OpenStack containerized HAproxy service for DCN/Edge deployments
|
|
|
|
parameters:
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
EnableGlanceApiProxy:
|
|
default: true
|
|
description: Configure haproxy to forward glance-api requests to glance-api
|
|
services running at the edge site.
|
|
type: boolean
|
|
EnableInternalTLS:
|
|
type: boolean
|
|
default: false
|
|
|
|
conditions:
|
|
|
|
glance_api_proxy_enabled: {equals: [{get_param: EnableGlanceApiProxy}, true]}
|
|
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
|
|
|
resources:
|
|
|
|
HAProxyBase:
|
|
type: ./haproxy-container-puppet.yaml
|
|
properties:
|
|
ServiceData: {get_param: ServiceData}
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
|
EndpointMap: {get_param: EndpointMap}
|
|
RoleName: {get_param: RoleName}
|
|
RoleParameters: {get_param: RoleParameters}
|
|
|
|
outputs:
|
|
|
|
glance_api_edge_uri:
|
|
description: URI of the glance-api service runing at the edge site.
|
|
value: &glance_api_edge_uri
|
|
if:
|
|
- internal_tls_enabled
|
|
- str_replace:
|
|
template:
|
|
"https://%{hiera('fqdn_NETWORK')}:9292"
|
|
params:
|
|
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
|
|
- str_replace:
|
|
template:
|
|
"http://%{hiera('NETWORK_uri')}:9292"
|
|
params:
|
|
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
|
|
|
|
role_data:
|
|
description: Role data for the HAproxy role for DCN/Edge.
|
|
value:
|
|
map_merge:
|
|
- get_attr: [HAProxyBase, role_data]
|
|
- service_name: haproxy_edge
|
|
config_settings:
|
|
map_merge:
|
|
- get_attr: [HAProxyBase, role_data, config_settings]
|
|
- tripleo::haproxy::public_virtual_ip: null
|
|
tripleo::haproxy::aodh: false
|
|
tripleo::haproxy::barbican: false
|
|
tripleo::haproxy::ceph_grafana: false
|
|
tripleo::haproxy::ceph_rgw: false
|
|
tripleo::haproxy::cinder: false
|
|
tripleo::haproxy::designate: false
|
|
tripleo::haproxy::docker_registry: false
|
|
tripleo::haproxy::ec2_api: false
|
|
tripleo::haproxy::ec2_api_metadata: false
|
|
tripleo::haproxy::etcd: false
|
|
- if:
|
|
- glance_api_proxy_enabled
|
|
- tripleo::haproxy::glance_api: true
|
|
glance_api_vip:
|
|
str_replace:
|
|
template:
|
|
"%{hiera('NETWORK')}"
|
|
params:
|
|
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
|
|
glance_api_node_ips: "%{alias('glance_api_edge_node_ips')}"
|
|
glance_api_node_names: "%{alias('glance_api_edge_node_names')}"
|
|
- tripleo::haproxy::glance_api: false
|
|
- tripleo::haproxy::gnocchi: false
|
|
tripleo::haproxy::heat_api: false
|
|
tripleo::haproxy::heat_cfn: false
|
|
tripleo::haproxy::horizon: false
|
|
tripleo::haproxy::ironic: false
|
|
tripleo::haproxy::ironic_inspector: false
|
|
tripleo::haproxy::keystone_admin: false
|
|
tripleo::haproxy::keystone_public: false
|
|
tripleo::haproxy::manila: false
|
|
tripleo::haproxy::mistral: false
|
|
tripleo::haproxy::mysql: false
|
|
tripleo::haproxy::neutron: false
|
|
tripleo::haproxy::nova_osapi: false
|
|
tripleo::haproxy::nova_metadata: false
|
|
tripleo::haproxy::nova_novncproxy: false
|
|
tripleo::haproxy::octavia: false
|
|
tripleo::haproxy::ovn_dbs: false
|
|
tripleo::haproxy::panko: false
|
|
tripleo::haproxy::placement: false
|
|
tripleo::haproxy::rabbitmq: false
|
|
tripleo::haproxy::redis: false
|
|
tripleo::haproxy::sahara: false
|
|
tripleo::haproxy::swift_proxy_server: false
|
|
tripleo::haproxy::zaqar_api: false
|
|
tripleo::haproxy::zaqar_ws: false
|
|
service_config_settings:
|
|
map_merge:
|
|
- get_attr: [HAProxyBase, role_data, service_config_settings]
|
|
- if:
|
|
- glance_api_proxy_enabled
|
|
- cinder_volume:
|
|
cinder::glance::glance_api_servers: *glance_api_edge_uri
|
|
nova_compute:
|
|
nova::glance_endpoint_override: *glance_api_edge_uri
|
|
- {}
|