Merge pull request #524 from enovance/use-internal-endpoints
Allow specifying the endpoint types for inter components communication
This commit is contained in:
commit
eff1c1b12d
@ -86,7 +86,8 @@ class cloud::compute(
|
||||
$neutron_password = 'neutronpassword',
|
||||
$neutron_region_name = 'RegionOne',
|
||||
$memcache_servers = ['127.0.0.1:11211'],
|
||||
$availability_zone = 'RegionOne'
|
||||
$availability_zone = 'RegionOne',
|
||||
$cinder_endpoint_type = 'publicURL'
|
||||
) {
|
||||
|
||||
if !defined(Resource['nova_config']) {
|
||||
@ -131,6 +132,7 @@ class cloud::compute(
|
||||
'DEFAULT/default_availability_zone': value => $availability_zone;
|
||||
'DEFAULT/servicegroup_driver': value => 'mc';
|
||||
'DEFAULT/glance_num_retries': value => '10';
|
||||
'DEFAULT/cinder_catalog_info': value => "volume:cinder:${cinder_endpoint_type}";
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
|
@ -94,7 +94,8 @@ class cloud::dashboard(
|
||||
$horizon_cert = undef,
|
||||
$horizon_key = undef,
|
||||
$horizon_ca = undef,
|
||||
$ssl_forward = false
|
||||
$ssl_forward = false,
|
||||
$os_endpoint_type = undef
|
||||
) {
|
||||
|
||||
# We build the param needed for horizon class
|
||||
@ -115,24 +116,25 @@ class cloud::dashboard(
|
||||
})
|
||||
|
||||
class { 'horizon':
|
||||
secret_key => $secret_key,
|
||||
can_set_mount_point => 'False',
|
||||
secret_key => $secret_key,
|
||||
can_set_mount_point => 'False',
|
||||
# fqdn can can be ambiguous since we use reverse DNS here,
|
||||
# e.g: 127.0.0.1 instead of a public IP address.
|
||||
# We force $api_eth to avoid this situation
|
||||
fqdn => $api_eth,
|
||||
servername => $servername,
|
||||
bind_address => $api_eth,
|
||||
swift => true,
|
||||
keystone_url => $keystone_url,
|
||||
cache_server_ip => false,
|
||||
django_debug => $debug,
|
||||
neutron_options => { 'enable_lb' => true },
|
||||
listen_ssl => $listen_ssl,
|
||||
horizon_cert => $horizon_cert,
|
||||
horizon_key => $horizon_key,
|
||||
horizon_ca => $horizon_ca,
|
||||
vhost_extra_params => $vhost_extra_params
|
||||
fqdn => $api_eth,
|
||||
servername => $servername,
|
||||
bind_address => $api_eth,
|
||||
swift => true,
|
||||
keystone_url => $keystone_url,
|
||||
cache_server_ip => false,
|
||||
django_debug => $debug,
|
||||
neutron_options => { 'enable_lb' => true },
|
||||
listen_ssl => $listen_ssl,
|
||||
horizon_cert => $horizon_cert,
|
||||
horizon_key => $horizon_key,
|
||||
horizon_ca => $horizon_ca,
|
||||
vhost_extra_params => $vhost_extra_params,
|
||||
openstack_endpoint_type => $os_endpoint_type,
|
||||
}
|
||||
|
||||
if ($::osfamily == 'Debian') {
|
||||
|
@ -110,7 +110,8 @@ class cloud::orchestration(
|
||||
$verbose = true,
|
||||
$debug = true,
|
||||
$use_syslog = true,
|
||||
$log_facility = 'LOG_LOCAL0'
|
||||
$log_facility = 'LOG_LOCAL0',
|
||||
$os_endpoint_type = 'publicURL'
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
@ -153,4 +154,7 @@ class cloud::orchestration(
|
||||
unless => "/usr/bin/mysql heat -h ${heat_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | /bin/grep Tables"
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'clients/endpoint_type': value => $os_endpoint_type;
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ class cloud::telemetry(
|
||||
$debug = true,
|
||||
$log_facility = 'LOG_LOCAL0',
|
||||
$use_syslog = true,
|
||||
$os_endpoint_type = 'publicURL'
|
||||
){
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
@ -103,6 +104,10 @@ class cloud::telemetry(
|
||||
log_facility => $log_facility
|
||||
}
|
||||
|
||||
ceilometer_config {
|
||||
'service_credentials/os_endpoint_type': value => $os_endpoint_type;
|
||||
}
|
||||
|
||||
class { 'ceilometer::agent::auth':
|
||||
auth_url => "${ks_keystone_internal_proto}://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0",
|
||||
auth_password => $ks_ceilometer_password,
|
||||
|
@ -67,7 +67,8 @@ class cloud::volume(
|
||||
$debug = true,
|
||||
$log_facility = 'LOG_LOCAL0',
|
||||
$storage_availability_zone = 'nova',
|
||||
$use_syslog = true
|
||||
$use_syslog = true,
|
||||
$nova_endpoint_type = 'publicURL'
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
@ -95,6 +96,10 @@ class cloud::volume(
|
||||
storage_availability_zone => $storage_availability_zone
|
||||
}
|
||||
|
||||
cinder_config {
|
||||
'DEFAULT/nova_catalog_info': value => "compute:nova:${nova_endpoint_type}";
|
||||
}
|
||||
|
||||
class { 'cinder::ceilometer': }
|
||||
|
||||
# Note(EmilienM):
|
||||
|
@ -40,7 +40,8 @@ describe 'cloud::compute::controller' do
|
||||
neutron_region_name => 'MyRegion',
|
||||
neutron_password => 'secrete',
|
||||
memcache_servers => ['10.0.0.1','10.0.0.2'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
cinder_endpoint_type => 'adminURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -73,6 +74,7 @@ describe 'cloud::compute::controller' do
|
||||
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
should contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
should contain_nova_config('DEFAULT/glance_num_retries').with_value('10')
|
||||
should contain_nova_config('DEFAULT/cinder_catalog_info').with_value('volume:cinder:adminURL')
|
||||
end
|
||||
|
||||
it 'configure neutron on compute node' do
|
||||
|
@ -33,26 +33,28 @@ describe 'cloud::dashboard' do
|
||||
:debug => true,
|
||||
:api_eth => '10.0.0.1',
|
||||
:ssl_forward => true,
|
||||
:servername => 'horizon.openstack.org' }
|
||||
:servername => 'horizon.openstack.org',
|
||||
:os_endpoint_type => 'internalURL' }
|
||||
end
|
||||
|
||||
it 'configure horizon' do
|
||||
should contain_class('horizon').with(
|
||||
:listen_ssl => false,
|
||||
:secret_key => '/etc/ssl/secret',
|
||||
:can_set_mount_point => 'False',
|
||||
:fqdn => '10.0.0.1',
|
||||
:bind_address => '10.0.0.1',
|
||||
:servername => 'horizon.openstack.org',
|
||||
:swift => true,
|
||||
:cache_server_ip => false,
|
||||
:keystone_url => 'http://keystone.openstack.org:5000/v2.0',
|
||||
:django_debug => true,
|
||||
:neutron_options => { 'enable_lb' => true },
|
||||
:vhost_extra_params => {
|
||||
:listen_ssl => false,
|
||||
:secret_key => '/etc/ssl/secret',
|
||||
:can_set_mount_point => 'False',
|
||||
:fqdn => '10.0.0.1',
|
||||
:bind_address => '10.0.0.1',
|
||||
:servername => 'horizon.openstack.org',
|
||||
:swift => true,
|
||||
:cache_server_ip => false,
|
||||
:keystone_url => 'http://keystone.openstack.org:5000/v2.0',
|
||||
:django_debug => true,
|
||||
:neutron_options => { 'enable_lb' => true },
|
||||
:vhost_extra_params => {
|
||||
'add_listen' => true ,
|
||||
'setenvif' => ['X-Forwarded-Proto https HTTPS=1']
|
||||
}
|
||||
},
|
||||
:openstack_endpoint_type => 'internalURL'
|
||||
)
|
||||
should contain_class('apache').with(:default_vhost => false)
|
||||
end
|
||||
|
@ -41,7 +41,8 @@ describe 'cloud::orchestration::engine' do
|
||||
verbose => true,
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
use_syslog => true,
|
||||
debug => true }"
|
||||
debug => true,
|
||||
os_endpoint_type => 'internalURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -71,6 +72,7 @@ describe 'cloud::orchestration::engine' do
|
||||
:sql_connection => 'mysql://heat:secrete@10.0.0.1/heat?charset=utf8',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_heat_config('clients/endpoint_type').with('value' => 'internalURL')
|
||||
end
|
||||
|
||||
it 'configure heat engine' do
|
||||
|
@ -35,7 +35,8 @@ describe 'cloud::telemetry::server' do
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
use_syslog => true,
|
||||
verbose => true,
|
||||
debug => true }"
|
||||
debug => true,
|
||||
os_endpoint_type => 'internalURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -64,6 +65,8 @@ describe 'cloud::telemetry::server' do
|
||||
:auth_url => 'http://10.0.0.1:5000/v2.0',
|
||||
:auth_region => 'MyRegion'
|
||||
)
|
||||
|
||||
should contain_ceilometer_config('service_credentials/os_endpoint_type').with('value' => 'internalURL')
|
||||
end
|
||||
|
||||
it 'configure ceilometer collector' do
|
||||
|
@ -33,7 +33,8 @@ describe 'cloud::volume::controller' do
|
||||
debug => true,
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
storage_availability_zone => 'nova',
|
||||
use_syslog => true }"
|
||||
use_syslog => true,
|
||||
nova_endpoint_type => 'internalURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -64,6 +65,7 @@ describe 'cloud::volume::controller' do
|
||||
:storage_availability_zone => 'nova'
|
||||
)
|
||||
should contain_class('cinder::ceilometer')
|
||||
should contain_cinder_config('DEFAULT/nova_catalog_info').with('value' => 'compute:nova:internalURL')
|
||||
end
|
||||
|
||||
it 'checks if Cinder DB is populated' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user