Add glance-registry to the loadbalancer and cleanup namings
The glance-registry server wasn't configured on the loadbalancers. This can be problematic at some point. Moreover the glance registry server was listening on 0.0.0.0, this should be the public eth. I also cleaned up all glance naming to reflect the difference between glance_api and glance_registry. The glance_registry option has been added to the glance template.
This commit is contained in:
parent
4a915cb17e
commit
691c6212a6
@ -43,7 +43,7 @@
|
||||
# (optional) Internal Hostname or IP to connect to Glance API
|
||||
# Default value in params
|
||||
#
|
||||
# [*glance_port*]
|
||||
# [*glance_api_port*]
|
||||
# (optional) TCP port to connect to Glance API
|
||||
# Default value in params
|
||||
#
|
||||
@ -63,7 +63,7 @@ class cloud::compute(
|
||||
$rabbit_hosts = $os_params::rabbit_hosts,
|
||||
$rabbit_password = $os_params::rabbit_password,
|
||||
$ks_glance_internal_host = $os_params::ks_glance_internal_host,
|
||||
$glance_port = $os_params::ks_glance_internal_port,
|
||||
$glance_api_port = $os_params::ks_glance_api_internal_port,
|
||||
$verbose = $os_params::verbose,
|
||||
$debug = $os_params::debug
|
||||
) {
|
||||
@ -82,7 +82,7 @@ class cloud::compute(
|
||||
rabbit_userid => 'nova',
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_password => $rabbit_password,
|
||||
glance_api_servers => "http://${ks_glance_internal_host}:${glance_port}",
|
||||
glance_api_servers => "http://${ks_glance_internal_host}:${glance_api_port}",
|
||||
verbose => $verbose,
|
||||
debug => $debug
|
||||
}
|
||||
|
@ -287,11 +287,11 @@
|
||||
# (optional) TCP port to connect to Heat API from admin network
|
||||
# Default value in params
|
||||
#
|
||||
# [*ks_glance_internal_port*]
|
||||
# [*ks_glance_api_internal_port*]
|
||||
# (optional) TCP port to connect to Glance API from internal network
|
||||
# Default value in params
|
||||
#
|
||||
# [*ks_glance_public_port*]
|
||||
# [*ks_glance_api_public_port*]
|
||||
# (optional) TCP port to connect to Glance API from public network
|
||||
# Default value in params
|
||||
#
|
||||
@ -343,7 +343,7 @@ class cloud::identity (
|
||||
$ks_glance_password = $os_params::ks_glance_password,
|
||||
$ks_glance_public_host = $os_params::ks_glance_public_host,
|
||||
$ks_glance_public_proto = $os_params::ks_glance_public_proto,
|
||||
$ks_glance_public_port = $os_params::ks_glance_public_port,
|
||||
$ks_glance_api_public_port = $os_params::ks_glance_api_public_port,
|
||||
$ks_heat_admin_host = $os_params::ks_heat_admin_host,
|
||||
$ks_heat_internal_host = $os_params::ks_heat_internal_host,
|
||||
$ks_heat_password = $os_params::ks_heat_password,
|
||||
@ -502,7 +502,7 @@ class cloud::identity (
|
||||
admin_address => $ks_glance_admin_host,
|
||||
internal_address => $ks_glance_internal_host,
|
||||
public_address => $ks_glance_public_host,
|
||||
port => $ks_glance_public_port,
|
||||
port => $ks_glance_api_public_port,
|
||||
region => $region,
|
||||
password => $ks_glance_password
|
||||
}
|
||||
|
@ -35,10 +35,14 @@
|
||||
# (optional) Internal Hostname or IP to connect to Keystone API
|
||||
# Default value in params
|
||||
#
|
||||
# [*ks_glance_internal_port*]
|
||||
# [*ks_glance_api_internal_port*]
|
||||
# (optional) TCP port to connect to Glance API from internal network
|
||||
# Default value in params
|
||||
#
|
||||
# [*ks_glance_registry_internal_port*]
|
||||
# (optional) TCP port to connect to Glance Registry from internal network
|
||||
# Default value in params
|
||||
#
|
||||
# [*ks_glance_password*]
|
||||
# (optional) Password used by Glance to connect to Keystone API
|
||||
# Default value in params
|
||||
@ -61,7 +65,8 @@ class cloud::image(
|
||||
$glance_db_user = $os_params::glance_db_user,
|
||||
$glance_db_password = $os_params::glance_db_password,
|
||||
$ks_keystone_internal_host = $os_params::ks_keystone_internal_host,
|
||||
$ks_glance_internal_port = $os_params::ks_glance_internal_port,
|
||||
$ks_glance_api_internal_port = $os_params::ks_glance_api_internal_port,
|
||||
$ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port,
|
||||
$ks_glance_password = $os_params::ks_glance_password,
|
||||
$rabbit_password = $os_params::rabbit_password,
|
||||
$rabbit_host = $os_params::rabbit_hosts[0],
|
||||
@ -75,7 +80,21 @@ class cloud::image(
|
||||
$encoded_glance_user = uriescape($glance_db_user)
|
||||
$encoded_glance_password = uriescape($glance_db_password)
|
||||
|
||||
class { ['glance::api', 'glance::registry']:
|
||||
class { 'glance::api':
|
||||
sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance",
|
||||
registry_host => $ks_glance_internal_host,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
auth_host => $ks_keystone_internal_host,
|
||||
keystone_password => $ks_glance_password,
|
||||
keystone_tenant => 'services',
|
||||
keystone_user => 'glance',
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
bind_host => $api_eth,
|
||||
use_syslog => true
|
||||
}
|
||||
|
||||
class { 'glance::registry':
|
||||
sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance",
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
@ -103,11 +122,19 @@ class cloud::image(
|
||||
class { 'glance::cache::pruner': }
|
||||
|
||||
# TODO(EmilienM) For later, I'll also add internal network support in HAproxy for all OpenStack API, to optimize North / South network traffic
|
||||
@@haproxy::balancermember{"${::fqdn}-public_api":
|
||||
@@haproxy::balancermember{"${::fqdn}-glance_api":
|
||||
listening_service => 'glance_api_cluster',
|
||||
server_names => $::hostname,
|
||||
ipaddresses => $api_eth,
|
||||
ports => $ks_glance_internal_port,
|
||||
ports => $ks_glance_api_internal_port,
|
||||
options => 'check inter 2000 rise 2 fall 5'
|
||||
}
|
||||
|
||||
@@haproxy::balancermember{"${::fqdn}-glance_registry":
|
||||
listening_service => 'glance_registry_cluster',
|
||||
server_names => $::hostname,
|
||||
ipaddresses => $api_eth,
|
||||
ports => $ks_glance_registry_internal_port,
|
||||
options => 'check inter 2000 rise 2 fall 5'
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ class cloud::loadbalancer(
|
||||
$ceilometer_api = true,
|
||||
$cinder_api = true,
|
||||
$glance_api = true,
|
||||
$glance_registry = true,
|
||||
$neutron_api = true,
|
||||
$heat_api = true,
|
||||
$heat_cfn_api = true,
|
||||
@ -40,7 +41,8 @@ class cloud::loadbalancer(
|
||||
$ks_cinder_public_port = $os_params::ks_cinder_public_port,
|
||||
$ks_ceilometer_public_port = $os_params::ks_ceilometer_public_port,
|
||||
$ks_ec2_public_port = $os_params::ks_ec2_public_port,
|
||||
$ks_glance_public_port = $os_params::ks_glance_public_port,
|
||||
$ks_glance_api_public_port = $os_params::ks_glance_api_public_port,
|
||||
$ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port,
|
||||
$ks_heat_public_port = $os_params::ks_heat_public_port,
|
||||
$ks_heat_cfn_public_port = $os_params::ks_heat_cfn_public_port,
|
||||
$ks_heat_cloudwatch_public_port = $os_params::ks_heat_cloudwatch_public_port,
|
||||
@ -145,7 +147,14 @@ class cloud::loadbalancer(
|
||||
if $glance_api {
|
||||
cloud::loadbalancer::listen_http{
|
||||
'glance_api_cluster':
|
||||
ports => $ks_glance_public_port,
|
||||
ports => $ks_glance_api_public_port,
|
||||
listen_ip => $vip_public_ip;
|
||||
}
|
||||
}
|
||||
if $glance_registry {
|
||||
cloud::loadbalancer::listen_http{
|
||||
'glance_registry_cluster':
|
||||
ports => $ks_glance_registry_internal_port,
|
||||
listen_ip => $vip_public_ip;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ describe 'cloud::compute::controller' do
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
ks_glance_internal_host => '10.0.0.1',
|
||||
glance_port => '9292',
|
||||
glance_api_port => '9292',
|
||||
verbose => true,
|
||||
debug => true }"
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ describe 'cloud::compute::hypervisor' do
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
ks_glance_internal_host => '10.0.0.1',
|
||||
glance_port => '9292',
|
||||
glance_api_port => '9292',
|
||||
verbose => true,
|
||||
debug => true }"
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ describe 'cloud::image' do
|
||||
:glance_db_user => 'glance',
|
||||
:glance_db_password => 'secrete',
|
||||
:ks_keystone_internal_host => '10.0.0.1',
|
||||
:ks_glance_internal_port => '9292',
|
||||
:ks_glance_api_internal_port => '9292',
|
||||
:ks_glance_password => 'secrete',
|
||||
:rabbit_host => '10.0.0.1',
|
||||
:rabbit_password => 'secrete',
|
||||
|
@ -52,7 +52,8 @@ describe 'cloud::loadbalancer' do
|
||||
:ks_nova_public_port => '8774',
|
||||
:ks_ec2_public_port => '8773',
|
||||
:ks_metadata_public_port => '8777',
|
||||
:ks_glance_public_port => '9292',
|
||||
:ks_glance_api_public_port => '9292',
|
||||
:ks_glance_registry_internal_port => '9191',
|
||||
:ks_swift_public_port => '8080',
|
||||
:ks_keystone_public_port => '5000',
|
||||
:ks_keystone_admin_port => '35357',
|
||||
|
Loading…
x
Reference in New Issue
Block a user