Merge "Move Murano RabbitMQ configuration into separate task"
This commit is contained in:
commit
b1f1a04b03
|
@ -5,7 +5,6 @@ prepare_network_config(hiera('network_scheme', {}))
|
|||
$murano_hash = hiera_hash('murano_hash', {})
|
||||
$murano_settings_hash = hiera_hash('murano_settings', {})
|
||||
$rabbit_hash = hiera_hash('rabbit_hash', {})
|
||||
$heat_hash = hiera_hash('heat_hash', {})
|
||||
$neutron_config = hiera_hash('neutron_config', {})
|
||||
$node_role = hiera('node_role')
|
||||
$public_ip = hiera('public_vip')
|
||||
|
@ -93,9 +92,9 @@ if $murano_hash['enabled'] {
|
|||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
rabbit_own_host => $public_ip,
|
||||
rabbit_own_port => $amqp_port,
|
||||
rabbit_own_user => 'murano',
|
||||
rabbit_own_password => $heat_hash['rabbit_password'],
|
||||
rabbit_own_vhost => 'murano',
|
||||
rabbit_own_user => $rabbit_hash['user'],
|
||||
rabbit_own_password => $rabbit_hash['password'],
|
||||
service_host => $api_bind_host,
|
||||
service_port => $api_bind_port,
|
||||
external_network => $external_network,
|
||||
|
@ -116,18 +115,6 @@ if $murano_hash['enabled'] {
|
|||
repo_url => $repository_url,
|
||||
}
|
||||
|
||||
rabbitmq_user { 'murano':
|
||||
password => $heat_hash['rabbit_password'],
|
||||
}
|
||||
|
||||
rabbitmq_vhost { '/murano': }
|
||||
|
||||
rabbitmq_user_permissions { "murano@/murano":
|
||||
configure_permission => '.*',
|
||||
read_permission => '.*',
|
||||
write_permission => '.*',
|
||||
}
|
||||
|
||||
$haproxy_stats_url = "http://${management_ip}:10000/;csv"
|
||||
|
||||
haproxy_backend_status { 'murano-api' :
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
notice('MODULAR: murano/rabbitmq.pp')
|
||||
|
||||
$rabbit_hash = hiera_hash('rabbit_hash', {})
|
||||
|
||||
#################################################################
|
||||
|
||||
rabbitmq_vhost { '/murano': }
|
||||
|
||||
rabbitmq_user_permissions { "${rabbit_hash['user']}@/murano":
|
||||
configure_permission => '.*',
|
||||
read_permission => '.*',
|
||||
write_permission => '.*',
|
||||
}
|
|
@ -34,3 +34,14 @@
|
|||
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/murano/keystone.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 1800
|
||||
|
||||
- id: murano-rabbitmq
|
||||
type: puppet
|
||||
groups: [primary-controller]
|
||||
condition: "settings:additional_components.murano.value == true"
|
||||
required_for: [murano]
|
||||
requires: [rabbitmq]
|
||||
parameters:
|
||||
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/murano/rabbitmq.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 1800
|
||||
|
|
|
@ -10,7 +10,6 @@ describe manifest do
|
|||
let(:tenant) { Noop.hiera_structure('murano/tenant', 'services') }
|
||||
let(:rabbit_os_user) { Noop.hiera_structure('rabbit/user', 'nova') }
|
||||
let(:rabbit_os_password) { Noop.hiera_structure('rabbit/password') }
|
||||
let(:rabbit_own_password) { Noop.hiera_structure('heat/rabbit_password') }
|
||||
|
||||
let(:network_scheme) do
|
||||
Noop.hiera_hash 'network_scheme'
|
||||
|
@ -99,12 +98,12 @@ describe manifest do
|
|||
'rabbit_ha_queues' => rabbit_ha_queues,
|
||||
'rabbit_own_host' => public_ip,
|
||||
'rabbit_own_port' => amqp_port,
|
||||
'rabbit_own_user' => 'murano',
|
||||
'rabbit_own_password' => rabbit_own_password,
|
||||
'rabbit_own_user' => rabbit_os_user,
|
||||
'rabbit_own_password' => rabbit_os_password,
|
||||
'rabbit_own_vhost' => 'murano',
|
||||
'service_host' => bind_address,
|
||||
'service_port' => api_bind_port,
|
||||
'external_network' => external_network,
|
||||
'rabbit_own_vhost' => 'murano',
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -130,24 +129,6 @@ describe manifest do
|
|||
)
|
||||
end
|
||||
|
||||
it 'should declare rabbitmq_user' do
|
||||
should contain_rabbitmq_user('murano').with({
|
||||
:password => rabbit_own_password,
|
||||
})
|
||||
end
|
||||
|
||||
it 'should declare rabbitmq_vhost' do
|
||||
should contain_rabbitmq_vhost('/murano')
|
||||
end
|
||||
|
||||
it 'should declare rabbitmq_user_permission' do
|
||||
should contain_rabbitmq_user_permissions('murano@/murano').with({
|
||||
:configure_permission => '.*',
|
||||
:read_permission => '.*',
|
||||
:write_permission => '.*',
|
||||
})
|
||||
end
|
||||
|
||||
enable = (Noop.hiera_structure('murano/enabled') and Noop.hiera('node_role') == 'primary-controller')
|
||||
context 'on primary controller', :if => enable do
|
||||
it 'should declare murano::application resource correctly' do
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
require 'spec_helper'
|
||||
require 'shared-examples'
|
||||
manifest = 'murano/rabbitmq.pp'
|
||||
|
||||
describe manifest do
|
||||
shared_examples 'rabbitmq' do
|
||||
|
||||
let(:rabbit_user) { Noop.hiera_structure('rabbit/user', 'murano') }
|
||||
|
||||
it 'should declare rabbitmq_vhost' do
|
||||
should contain_rabbitmq_vhost('/murano')
|
||||
end
|
||||
|
||||
it 'should declare rabbitmq_user_permission' do
|
||||
should contain_rabbitmq_user_permissions("#{rabbit_user}@/murano").with({
|
||||
:configure_permission => '.*',
|
||||
:read_permission => '.*',
|
||||
:write_permission => '.*',
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
Loading…
Reference in New Issue