Merge "Fix ceilometer using public address with ssl"
This commit is contained in:
commit
64320b8895
@ -1,8 +1,12 @@
|
|||||||
notice('MODULAR: ceilometer/keystone.pp')
|
notice('MODULAR: ceilometer/keystone.pp')
|
||||||
|
|
||||||
$ceilometer_hash = hiera_hash('ceilometer', {})
|
$ceilometer_hash = hiera_hash('ceilometer', {})
|
||||||
$public_address = hiera('public_vip')
|
$public_vip = hiera('public_vip')
|
||||||
$public_ssl_hash = hiera('public_ssl')
|
$public_ssl_hash = hiera('public_ssl')
|
||||||
|
$public_address = $public_ssl_hash['services'] ? {
|
||||||
|
true => $public_ssl_hash['hostname'],
|
||||||
|
default => $public_vip,
|
||||||
|
}
|
||||||
$public_protocol = $public_ssl_hash['services'] ? {
|
$public_protocol = $public_ssl_hash['services'] ? {
|
||||||
true => 'https',
|
true => 'https',
|
||||||
default => 'http',
|
default => 'http',
|
||||||
@ -20,6 +24,9 @@ $tenant = pick($ceilometer_hash['tenant'], 'services')
|
|||||||
validate_string($public_address)
|
validate_string($public_address)
|
||||||
validate_string($password)
|
validate_string($password)
|
||||||
|
|
||||||
|
$public_url = "${public_protocol}://${public_address}:8777"
|
||||||
|
$admin_url = "http://${admin_address}:8777"
|
||||||
|
|
||||||
class { '::ceilometer::keystone::auth':
|
class { '::ceilometer::keystone::auth':
|
||||||
password => $password,
|
password => $password,
|
||||||
auth_name => $auth_name,
|
auth_name => $auth_name,
|
||||||
@ -27,9 +34,8 @@ class { '::ceilometer::keystone::auth':
|
|||||||
configure_user => $configure_user,
|
configure_user => $configure_user,
|
||||||
configure_user_role => $configure_user_role,
|
configure_user_role => $configure_user_role,
|
||||||
service_name => $service_name,
|
service_name => $service_name,
|
||||||
public_address => $public_address,
|
public_url => $public_url,
|
||||||
public_protocol => $public_protocol,
|
internal_url => $admin_url,
|
||||||
admin_address => $admin_address,
|
admin_url => $admin_url,
|
||||||
internal_address => $admin_address,
|
|
||||||
region => $region,
|
region => $region,
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,43 @@ describe manifest do
|
|||||||
it 'should set empty trusts_delegated_roles for ceilometer auth' do
|
it 'should set empty trusts_delegated_roles for ceilometer auth' do
|
||||||
contain_class('ceilometer::keystone::auth')
|
contain_class('ceilometer::keystone::auth')
|
||||||
end
|
end
|
||||||
|
it 'should use either public_vip or management_vip' do
|
||||||
|
public_vip = Noop.hiera('public_vip')
|
||||||
|
public_ssl = Noop.hiera_structure('public_ssl/services')
|
||||||
|
|
||||||
|
if public_ssl
|
||||||
|
public_address = Noop.hiera_structure('public_ssl/hostname')
|
||||||
|
public_protocol = 'https'
|
||||||
|
else
|
||||||
|
public_address = public_vip
|
||||||
|
public_protocol = 'http'
|
||||||
|
end
|
||||||
|
admin_address = Noop.hiera 'management_vip'
|
||||||
|
|
||||||
|
password = Noop.hiera_structure 'ceilometer/user_password'
|
||||||
|
auth_name = Noop.hiera_structure 'ceilometer/auth_name', 'ceilometer'
|
||||||
|
configure_endpoint = Noop.hiera_structure 'ceilometer/configure_endpoint', true
|
||||||
|
configure_user = Noop.hiera_structure 'ceilometer/configure_user', true
|
||||||
|
configure_user_role = Noop.hiera_structure 'ceilometer/configure_user_role', true
|
||||||
|
service_name = Noop.hiera_structure 'ceilometer/service_name', 'ceilometer'
|
||||||
|
region = Noop.hiera_structure 'ceilometer/region', 'RegionOne'
|
||||||
|
|
||||||
|
public_url = "#{public_protocol}://#{public_address}:8777"
|
||||||
|
admin_url = "http://#{admin_address}:8777"
|
||||||
|
|
||||||
|
contain_class('ceilometer::keystone::auth').with(
|
||||||
|
'password' => password,
|
||||||
|
'auth_name' => auth_name,
|
||||||
|
'configure_endpoint' => configure_endpoint,
|
||||||
|
'configure_user' => configure_user,
|
||||||
|
'configure_user_role' => configure_user_role,
|
||||||
|
'service_name' => service_name,
|
||||||
|
'public_url' => public_url,
|
||||||
|
'internal_url' => admin_url,
|
||||||
|
'admin_url' => admin_url,
|
||||||
|
'region' => region
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
test_ubuntu_and_centos manifest
|
test_ubuntu_and_centos manifest
|
||||||
|
Loading…
Reference in New Issue
Block a user