Fix rabbitmq README and examples
Change-Id: Ic8d6fd0c75384ef272fe54af009a329df67e9d45
This commit is contained in:
parent
c0c8164c92
commit
4e11e3fe4e
|
@ -46,10 +46,8 @@ To utilize the ironic module's functionality you will need to declare multiple r
|
||||||
```puppet
|
```puppet
|
||||||
# enable Ironic resources
|
# enable Ironic resources
|
||||||
class { '::ironic':
|
class { '::ironic':
|
||||||
rabbit_userid => 'ironic',
|
default_transport_url => 'rabbit://ironic:an_even_bigger_secret@127.0.0.1:5672/ironic',
|
||||||
rabbit_password => 'an_even_bigger_secret',
|
database_connection => 'mysql://ironic:a_big_secret@127.0.0.1/ironic?charset=utf8',
|
||||||
rabbit_host => '127.0.0.1',
|
|
||||||
database_connection => 'mysql://ironic:a_big_secret@127.0.0.1/ironic?charset=utf8',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::ironic::db::mysql':
|
class { '::ironic::db::mysql':
|
||||||
|
|
|
@ -81,17 +81,19 @@ node 'db' {
|
||||||
node 'controller' {
|
node 'controller' {
|
||||||
|
|
||||||
class { '::ironic':
|
class { '::ironic':
|
||||||
db_password => $db_password,
|
db_password => $db_password,
|
||||||
db_name => $db_name,
|
db_name => $db_name,
|
||||||
db_user => $db_username,
|
db_user => $db_username,
|
||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
|
default_transport_url => os_transport_url({
|
||||||
rabbit_password => $rabbit_password,
|
'transport' => 'rabbit',
|
||||||
rabbit_userid => $rabbit_user,
|
'hosts' => $rabbit_hosts,
|
||||||
rabbit_virtual_host => $rabbit_vhost,
|
'port' => $rabbit_port,
|
||||||
rabbit_hosts => $rabbit_hosts,
|
'username' => $rabbit_user,
|
||||||
|
'password' => $rabbit_password,
|
||||||
glance_api_servers => $glance_api_servers,
|
'virtual_host' => $rabbit_vhost,
|
||||||
|
}),
|
||||||
|
glance_api_servers => $glance_api_servers,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::ironic::api': }
|
class { '::ironic::api': }
|
||||||
|
|
|
@ -36,27 +36,19 @@ describe 'ironic' do
|
||||||
|
|
||||||
shared_examples_for 'ironic' do
|
shared_examples_for 'ironic' do
|
||||||
|
|
||||||
context 'and if rabbit_host parameter is provided' do
|
context 'ironic setup' do
|
||||||
it_configures 'a ironic base installation'
|
it_configures 'a ironic base installation'
|
||||||
it_configures 'with SSL disabled'
|
it_configures 'with SSL disabled'
|
||||||
it_configures 'with SSL enabled without kombu'
|
it_configures 'with SSL enabled without kombu'
|
||||||
it_configures 'with SSL enabled with kombu'
|
it_configures 'with SSL enabled with kombu'
|
||||||
it_configures 'with amqp_durable_queues disabled'
|
it_configures 'with amqp_durable_queues disabled'
|
||||||
it_configures 'with amqp_durable_queues enabled'
|
it_configures 'with amqp_durable_queues enabled'
|
||||||
|
it_configures 'without rabbit HA'
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'and if rabbit_hosts parameter is provided' do
|
context 'ironic setup with rabbit HA' do
|
||||||
|
before { params.merge!( :rabbit_ha_queues => true ) }
|
||||||
context 'with one server' do
|
it_configures 'with rabbit HA'
|
||||||
it_configures 'a ironic base installation'
|
|
||||||
it_configures 'rabbit HA with a single virtual host'
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with multiple servers' do
|
|
||||||
before { params.merge!( :rabbit_ha_queues => true ) }
|
|
||||||
it_configures 'a ironic base installation'
|
|
||||||
it_configures 'rabbit HA with multiple hosts'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with amqp messaging' do
|
context 'with amqp messaging' do
|
||||||
|
@ -121,13 +113,13 @@ describe 'ironic' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'rabbit HA with a single virtual host' do
|
shared_examples_for 'without rabbit HA' do
|
||||||
it 'in ironic.conf' do
|
it 'in ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'rabbit HA with multiple hosts' do
|
shared_examples_for 'with rabbit HA' do
|
||||||
it 'in ironic.conf' do
|
it 'in ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
is_expected.to contain_ironic_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue