Merge "Include rabbitmq credentials for ceilometer for swift proxy"
This commit is contained in:
commit
204e88b65e
@ -129,7 +129,7 @@ mod 'glance',
|
||||
# Pull in puppet-swift
|
||||
mod 'swift',
|
||||
:git => 'https://review.fuel-infra.org/p/puppet-modules/puppet-swift.git',
|
||||
:ref => '7.0.0-mos-rc3'
|
||||
:ref => '7.0.0-rc5'
|
||||
|
||||
# Pull in puppet-ceilometer
|
||||
mod 'ceilometer',
|
||||
|
@ -53,6 +53,9 @@ class openstack::swift::proxy (
|
||||
$auth_host = '10.0.0.1',
|
||||
$auth_protocol = 'http',
|
||||
$swift_operator_roles = ['admin', 'SwiftOperator'],
|
||||
$rabbit_user = 'guest',
|
||||
$rabbit_password = 'password',
|
||||
$rabbit_hosts = '127.0.0.1:5672',
|
||||
) {
|
||||
if !defined(Class['swift']) {
|
||||
class { 'swift':
|
||||
@ -88,7 +91,11 @@ class openstack::swift::proxy (
|
||||
"<%=
|
||||
@proxy_pipeline.insert(-2, 'ceilometer').join(',')
|
||||
%>"), ',')
|
||||
class { '::swift::proxy::ceilometer': }
|
||||
class { '::swift::proxy::ceilometer':
|
||||
rabbit_user => $rabbit_user,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
}
|
||||
}
|
||||
else {
|
||||
$new_proxy_pipeline = $proxy_pipeline
|
||||
|
@ -37,6 +37,8 @@ $region = hiera('region', 'RegionOne')
|
||||
$service_workers = pick($swift_hash['workers'],
|
||||
min(max($::processorcount, 2), 16))
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$rabbit_hash = hiera_hash('rabbit_hash')
|
||||
$rabbit_hosts = hiera('amqp_hosts')
|
||||
|
||||
$keystone_internal_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
$keystone_endpoint = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [hiera('service_endpoint', ''), $management_vip])
|
||||
@ -117,6 +119,9 @@ if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$stora
|
||||
admin_password => $keystone_password,
|
||||
auth_host => $service_endpoint,
|
||||
auth_protocol => $keystone_protocol,
|
||||
rabbit_user => $rabbit_hash['user'],
|
||||
rabbit_password => $rabbit_hash['password'],
|
||||
rabbit_hosts => split($rabbit_hosts, ', '),
|
||||
} ->
|
||||
class { 'openstack::swift::status':
|
||||
endpoint => "${swift_internal_protocol}://${swift_internal_endpoint}:${proxy_port}",
|
||||
|
@ -16,6 +16,10 @@ describe manifest do
|
||||
ring_part_power = swift_hash.fetch('ring_part_power', 10)
|
||||
ring_min_part_hours = Noop.hiera 'swift_ring_min_part_hours', 1
|
||||
memcached_servers = controller_nodes.map{ |n| n = n + ':11211' }
|
||||
deploy_swift_proxy = Noop.hiera('deploy_swift_proxy')
|
||||
rabbit_hosts = Noop.hiera('amqp_hosts')
|
||||
rabbit_user = Noop.hiera_structure('rabbit/user', 'nova')
|
||||
rabbit_password = Noop.hiera_structure('rabbit/password')
|
||||
let (:sto_nets){
|
||||
network_scheme = Noop.hiera 'network_scheme'
|
||||
sto_nets = Noop.puppet_function 'get_routable_networks_for_network_role', network_scheme, 'swift/replication', ' '
|
||||
@ -131,6 +135,15 @@ describe manifest do
|
||||
)
|
||||
end
|
||||
end
|
||||
if deploy_swift_proxy
|
||||
it 'should contain rabbit params' do
|
||||
should contain_class('openstack::swift::proxy').with(
|
||||
:rabbit_user => rabbit_user,
|
||||
:rabbit_password => rabbit_password,
|
||||
:rabbit_hosts => rabbit_hosts.split(', '),
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user