Make HAProxy URL for Contrail Analytics API HTTPS

Change-Id: I20a87641c6c060aa082f94cb6a8d10a037e08078
This commit is contained in:
Hemachandra Reddy 2017-04-07 05:21:10 -05:00
parent 4f33303526
commit c182165a5b
2 changed files with 11 additions and 2 deletions

View File

@ -80,8 +80,15 @@ class contrail {
# Public SSL for Contrail WebUI
$public_ssl_hash = hiera_hash('public_ssl', {})
$ssl_hash = hiera_hash('use_ssl', {})
$public_ssl = get_ssl_property($ssl_hash, $public_ssl_hash, 'horizon', 'public', 'usage', false)
$public_ssl_path = get_ssl_property($ssl_hash, $public_ssl_hash, 'horizon', 'public', 'path', [''])
if $ssl_hash['contrail'] {
$service_name = 'contrail'
} else {
$service_name = 'horizon'
}
$public_ssl = get_ssl_property($ssl_hash, $public_ssl_hash, $service_name, 'public', 'usage', false)
$public_ssl_path = get_ssl_property($ssl_hash, $public_ssl_hash, $service_name, 'public', 'path', [''])
#NOTE(AKirilochkin): Modern way to get the ssl values with understandable variables names
$public_horizon_endpoint = get_ssl_property($ssl_hash, {}, 'horizon', 'public', 'hostname', [$mos_public_vip])

View File

@ -35,6 +35,8 @@ class contrail::vip {
ipaddresses => $contrail::contrail_analytics_ips,
public => true,
internal => true,
public_ssl => $contrail::public_ssl,
public_ssl_path => $contrail::public_ssl_path,
haproxy_config_options => { 'option' => ['nolinger', 'tcp-check', 'httplog'],
'balance' => 'roundrobin',
'tcp-check' => 'connect port 6379',