Merge pull request #456 from enovance/add_horizon_https_stanza

Create HAProxy stanza for https horizon traffic load-balancing
This commit is contained in:
Emilien Macchi 2014-05-13 14:24:28 -04:00
commit 546da8b652
3 changed files with 16 additions and 2 deletions

View File

@ -78,6 +78,7 @@ class cloud::dashboard(
$ks_keystone_internal_host = '127.0.0.1',
$secret_key = 'secrete',
$horizon_port = 80,
$horizon_ssl_port = 443,
$servername = $::fqdn,
$api_eth = '127.0.0.1',
$listen_ssl = false,
@ -141,5 +142,16 @@ class cloud::dashboard(
options => "check inter 2000 rise 2 fall 5 cookie ${::hostname}"
}
if $listen_ssl {
@@haproxy::balancermember{"${::fqdn}-horizon-ssl":
listening_service => 'horizon_ssl_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $horizon_ssl_port,
options => "check inter 2000 rise 2 fall 5 cookie ${::hostname}"
}
}
}

View File

@ -196,6 +196,7 @@ class cloud::loadbalancer(
$ks_nova_public_port = 8774,
$ks_swift_public_port = 8080,
$horizon_port = 80,
$horizon_ssl_port = 443,
$spice_port = 6082,
$vip_public_ip = ['127.0.0.1'],
$vip_internal_ip = false,
@ -347,8 +348,8 @@ class cloud::loadbalancer(
if $horizon {
if $horizon_ssl {
cloud::loadbalancer::listen_https{ 'horizon_cluster':
ports => $horizon_port,
cloud::loadbalancer::listen_https{ 'horizon_ssl_cluster':
ports => $horizon_ssl_port,
listen_ip => $vip_public_ip;
}
} else {

View File

@ -45,6 +45,7 @@ describe 'cloud::loadbalancer' do
:keepalived_public_interface => 'eth0',
:keepalived_public_ipvs => ['10.0.0.1', '10.0.0.2'],
:horizon_port => '80',
:horizon_ssl_port => '443',
:spice_port => '6082',
:vip_public_ip => '10.0.0.1',
:galera_ip => '10.0.0.2',