Adds support for RabbitMQ Clustering
Previsouly, the openstack module only supported a single RabbitMQ Broker. This change adds the rabbit_hosts and cluster_disk_nodes parameters used by the core modules to manage rabbit clustering. Defaults to false to disable rabbit clustering and for backwards compatibility. Change-Id: Iaae1ce3ec8864f43365bcf600ae3fa5c374d9b17
This commit is contained in:
@@ -12,7 +12,7 @@ class openstack::cinder::controller(
|
|||||||
$keystone_service_port = '5000',
|
$keystone_service_port = '5000',
|
||||||
$rabbit_userid = 'guest',
|
$rabbit_userid = 'guest',
|
||||||
$rabbit_host = '127.0.0.1',
|
$rabbit_host = '127.0.0.1',
|
||||||
$rabbit_hosts = undef,
|
$rabbit_hosts = false,
|
||||||
$rabbit_port = '5672',
|
$rabbit_port = '5672',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
# Database. Currently mysql is the only option.
|
# Database. Currently mysql is the only option.
|
||||||
|
@@ -3,7 +3,7 @@ class openstack::cinder::storage(
|
|||||||
$rabbit_password,
|
$rabbit_password,
|
||||||
$rabbit_userid = 'guest',
|
$rabbit_userid = 'guest',
|
||||||
$rabbit_host = '127.0.0.1',
|
$rabbit_host = '127.0.0.1',
|
||||||
$rabbit_hosts = undef,
|
$rabbit_hosts = false,
|
||||||
$rabbit_port = '5672',
|
$rabbit_port = '5672',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
@@ -11,6 +11,9 @@
|
|||||||
# Driver used to implement Quantum firewalling.
|
# Driver used to implement Quantum firewalling.
|
||||||
# (optional) Defaults to false.
|
# (optional) Defaults to false.
|
||||||
#
|
#
|
||||||
|
# [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster.
|
||||||
|
# Optional. Defaults to false.
|
||||||
|
#
|
||||||
# === Examples
|
# === Examples
|
||||||
#
|
#
|
||||||
# class { 'openstack::nova::compute':
|
# class { 'openstack::nova::compute':
|
||||||
@@ -60,6 +63,7 @@ class openstack::compute (
|
|||||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver',
|
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver',
|
||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_host = '127.0.0.1',
|
$rabbit_host = '127.0.0.1',
|
||||||
|
$rabbit_hosts = false,
|
||||||
$rabbit_user = 'openstack',
|
$rabbit_user = 'openstack',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
# Glance
|
# Glance
|
||||||
@@ -123,6 +127,7 @@ class openstack::compute (
|
|||||||
glance_api_servers => $glance_api_servers,
|
glance_api_servers => $glance_api_servers,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
rabbit_host => $rabbit_host,
|
rabbit_host => $rabbit_host,
|
||||||
|
rabbit_hosts => $rabbit_hosts,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,6 +31,11 @@
|
|||||||
#
|
#
|
||||||
# [rabbit_password] Rabbit password.
|
# [rabbit_password] Rabbit password.
|
||||||
# [rabbit_user] Rabbit User. Optional. Defaults to openstack.
|
# [rabbit_user] Rabbit User. Optional. Defaults to openstack.
|
||||||
|
# [rabbit_host] IP address to connect to the RabbitMQ Broker. Optional. Defaults to '127.0.0.1'.
|
||||||
|
# [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster.
|
||||||
|
# Optional. Defaults to false.
|
||||||
|
# [rabbit_cluster_nodes] An array of Rabbit Broker IP addresses within the Cluster.
|
||||||
|
# Optional. Defaults to false.
|
||||||
# [rabbit_virtual_host] Rabbit virtual host path for Nova. Defaults to '/'.
|
# [rabbit_virtual_host] Rabbit virtual host path for Nova. Defaults to '/'.
|
||||||
# [network_manager] Nova network manager to use.
|
# [network_manager] Nova network manager to use.
|
||||||
# [fixed_range] Range of ipv4 network for vms.
|
# [fixed_range] Range of ipv4 network for vms.
|
||||||
@@ -166,6 +171,8 @@ class openstack::controller (
|
|||||||
$network_config = {},
|
$network_config = {},
|
||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_host = '127.0.0.1',
|
$rabbit_host = '127.0.0.1',
|
||||||
|
$rabbit_hosts = false,
|
||||||
|
$rabbit_cluster_nodes = false,
|
||||||
$rabbit_user = 'openstack',
|
$rabbit_user = 'openstack',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
# Horizon
|
# Horizon
|
||||||
@@ -362,6 +369,8 @@ class openstack::controller (
|
|||||||
# Rabbit
|
# Rabbit
|
||||||
rabbit_user => $rabbit_user,
|
rabbit_user => $rabbit_user,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
|
rabbit_hosts => $rabbit_hosts,
|
||||||
|
rabbit_cluster_nodes => $rabbit_cluster_nodes,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
# Glance
|
# Glance
|
||||||
glance_api_servers => $glance_api_servers,
|
glance_api_servers => $glance_api_servers,
|
||||||
@@ -397,6 +406,7 @@ class openstack::controller (
|
|||||||
rabbit_host => $rabbit_host,
|
rabbit_host => $rabbit_host,
|
||||||
rabbit_user => $rabbit_user,
|
rabbit_user => $rabbit_user,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
|
rabbit_hosts => $rabbit_hosts,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
# Quantum OVS
|
# Quantum OVS
|
||||||
ovs_local_ip => $ovs_local_ip_real,
|
ovs_local_ip => $ovs_local_ip_real,
|
||||||
@@ -444,6 +454,7 @@ class openstack::controller (
|
|||||||
rabbit_userid => $rabbit_user,
|
rabbit_userid => $rabbit_user,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
rabbit_host => $rabbit_host,
|
rabbit_host => $rabbit_host,
|
||||||
|
rabbit_hosts => $rabbit_hosts,
|
||||||
db_password => $cinder_db_password,
|
db_password => $cinder_db_password,
|
||||||
db_dbname => $cinder_db_dbname,
|
db_dbname => $cinder_db_dbname,
|
||||||
db_user => $cinder_db_user,
|
db_user => $cinder_db_user,
|
||||||
|
@@ -15,6 +15,12 @@
|
|||||||
# IP address to use for binding Nova API's.
|
# IP address to use for binding Nova API's.
|
||||||
# (optional) Defaults to '0.0.0.0'.
|
# (optional) Defaults to '0.0.0.0'.
|
||||||
#
|
#
|
||||||
|
# [rabbit_hosts] An array of IP addresses or Virttual IP address for connecting to a RabbitMQ Cluster.
|
||||||
|
# Optional. Defaults to false.
|
||||||
|
#
|
||||||
|
# [rabbit_cluster_nodes] An array of Rabbit Broker IP addresses within the Cluster.
|
||||||
|
# Optional. Defaults to false.
|
||||||
|
#
|
||||||
# [quantum]
|
# [quantum]
|
||||||
# Specifies if nova should be configured to use quantum.
|
# Specifies if nova should be configured to use quantum.
|
||||||
# (optional) Defaults to false (indicating nova-networks should be used)
|
# (optional) Defaults to false (indicating nova-networks should be used)
|
||||||
@@ -79,6 +85,8 @@ class openstack::nova::controller (
|
|||||||
# Rabbit
|
# Rabbit
|
||||||
$rabbit_user = 'openstack',
|
$rabbit_user = 'openstack',
|
||||||
$rabbit_virtual_host = '/',
|
$rabbit_virtual_host = '/',
|
||||||
|
$rabbit_hosts = false,
|
||||||
|
$rabbit_cluster_nodes = false,
|
||||||
# Database
|
# Database
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
$sql_idle_timeout = '3600',
|
$sql_idle_timeout = '3600',
|
||||||
@@ -124,6 +132,7 @@ class openstack::nova::controller (
|
|||||||
userid => $rabbit_user,
|
userid => $rabbit_user,
|
||||||
password => $rabbit_password,
|
password => $rabbit_password,
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
|
cluster_disk_nodes => $rabbit_cluster_nodes,
|
||||||
virtual_host => $rabbit_virtual_host,
|
virtual_host => $rabbit_virtual_host,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +149,7 @@ class openstack::nova::controller (
|
|||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
rabbit_host => $rabbit_connection,
|
rabbit_host => $rabbit_connection,
|
||||||
|
rabbit_hosts => $rabbit_hosts,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure nova-api
|
# Configure nova-api
|
||||||
|
@@ -9,6 +9,7 @@ describe 'openstack::compute' do
|
|||||||
:nova_user_password => 'nova_pass',
|
:nova_user_password => 'nova_pass',
|
||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
:rabbit_host => '127.0.0.1',
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
:nova_admin_tenant_name => 'services',
|
:nova_admin_tenant_name => 'services',
|
||||||
:nova_admin_user => 'nova',
|
:nova_admin_user => 'nova',
|
||||||
@@ -32,6 +33,7 @@ describe 'openstack::compute' do
|
|||||||
should contain_class('nova').with(
|
should contain_class('nova').with(
|
||||||
:sql_connection => 'mysql://nova:pass@127.0.0.1/nova',
|
:sql_connection => 'mysql://nova:pass@127.0.0.1/nova',
|
||||||
:rabbit_host => '127.0.0.1',
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_userid => 'openstack',
|
:rabbit_userid => 'openstack',
|
||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
@@ -71,6 +73,7 @@ describe 'openstack::compute' do
|
|||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
:rabbit_userid => 'openstack',
|
:rabbit_userid => 'openstack',
|
||||||
:rabbit_host => '127.0.0.1',
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
:volume_group => 'cinder-volumes',
|
:volume_group => 'cinder-volumes',
|
||||||
:iscsi_ip_address => '127.0.0.1',
|
:iscsi_ip_address => '127.0.0.1',
|
||||||
@@ -92,6 +95,7 @@ describe 'openstack::compute' do
|
|||||||
:nova_db_user => 'nova_user',
|
:nova_db_user => 'nova_user',
|
||||||
:nova_db_name => 'novadb',
|
:nova_db_name => 'novadb',
|
||||||
:rabbit_host => 'my_host',
|
:rabbit_host => 'my_host',
|
||||||
|
:rabbit_hosts => ['rabbit:5673', 'rabbit2:5674'],
|
||||||
:rabbit_password => 'my_rabbit_pw',
|
:rabbit_password => 'my_rabbit_pw',
|
||||||
:rabbit_user => 'my_rabbit_user',
|
:rabbit_user => 'my_rabbit_user',
|
||||||
:rabbit_virtual_host => '/foo',
|
:rabbit_virtual_host => '/foo',
|
||||||
@@ -106,6 +110,7 @@ describe 'openstack::compute' do
|
|||||||
should contain_class('nova').with(
|
should contain_class('nova').with(
|
||||||
:sql_connection => 'mysql://nova_user:pass@127.0.0.1/novadb',
|
:sql_connection => 'mysql://nova_user:pass@127.0.0.1/novadb',
|
||||||
:rabbit_host => 'my_host',
|
:rabbit_host => 'my_host',
|
||||||
|
:rabbit_hosts => ['rabbit:5673', 'rabbit2:5674'],
|
||||||
:rabbit_userid => 'my_rabbit_user',
|
:rabbit_userid => 'my_rabbit_user',
|
||||||
:rabbit_password => 'my_rabbit_pw',
|
:rabbit_password => 'my_rabbit_pw',
|
||||||
:rabbit_virtual_host => '/foo',
|
:rabbit_virtual_host => '/foo',
|
||||||
@@ -283,6 +288,7 @@ describe 'openstack::compute' do
|
|||||||
:db_host => '127.0.0.1',
|
:db_host => '127.0.0.1',
|
||||||
:ovs_local_ip => params[:internal_address],
|
:ovs_local_ip => params[:internal_address],
|
||||||
:rabbit_host => params[:rabbit_host],
|
:rabbit_host => params[:rabbit_host],
|
||||||
|
:rabbit_hosts => params[:rabbit_hosts],
|
||||||
:rabbit_user => 'openstack',
|
:rabbit_user => 'openstack',
|
||||||
:rabbit_password => params[:rabbit_password],
|
:rabbit_password => params[:rabbit_password],
|
||||||
:enable_ovs_agent => true,
|
:enable_ovs_agent => true,
|
||||||
|
@@ -12,6 +12,7 @@ describe 'openstack::controller' do
|
|||||||
:admin_email => 'some_user@some_fake_email_address.foo',
|
:admin_email => 'some_user@some_fake_email_address.foo',
|
||||||
:admin_password => 'ChangeMe',
|
:admin_password => 'ChangeMe',
|
||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
|
:rabbit_cluster_nodes => false,
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
:keystone_db_password => 'keystone_pass',
|
:keystone_db_password => 'keystone_pass',
|
||||||
:keystone_admin_token => 'keystone_admin_token',
|
:keystone_admin_token => 'keystone_admin_token',
|
||||||
@@ -376,12 +377,14 @@ describe 'openstack::controller' do
|
|||||||
should contain_class('nova::rabbitmq').with(
|
should contain_class('nova::rabbitmq').with(
|
||||||
:userid => 'openstack',
|
:userid => 'openstack',
|
||||||
:password => 'rabbit_pw',
|
:password => 'rabbit_pw',
|
||||||
|
:cluster_disk_nodes => false,
|
||||||
:virtual_host => '/',
|
:virtual_host => '/',
|
||||||
:enabled => true
|
:enabled => true
|
||||||
)
|
)
|
||||||
should contain_class('nova').with(
|
should contain_class('nova').with(
|
||||||
:sql_connection => 'mysql://nova:nova_pass@127.0.0.1/nova',
|
:sql_connection => 'mysql://nova:nova_pass@127.0.0.1/nova',
|
||||||
:rabbit_host => '127.0.0.1',
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_userid => 'openstack',
|
:rabbit_userid => 'openstack',
|
||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
@@ -498,6 +501,8 @@ describe 'openstack::controller' do
|
|||||||
default_params.merge(
|
default_params.merge(
|
||||||
:debug => true,
|
:debug => true,
|
||||||
:verbose => true,
|
:verbose => true,
|
||||||
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_user => 'rabbituser',
|
:rabbit_user => 'rabbituser',
|
||||||
:rabbit_password => 'rabbit_pw2',
|
:rabbit_password => 'rabbit_pw2',
|
||||||
:cinder_user_password => 'foo',
|
:cinder_user_password => 'foo',
|
||||||
@@ -550,6 +555,7 @@ describe 'openstack::controller' do
|
|||||||
:db_host => '127.0.0.1',
|
:db_host => '127.0.0.1',
|
||||||
:sql_idle_timeout => '30',
|
:sql_idle_timeout => '30',
|
||||||
:rabbit_host => '127.0.0.1',
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_user => 'openstack',
|
:rabbit_user => 'openstack',
|
||||||
:rabbit_password => 'rabbit_pw',
|
:rabbit_password => 'rabbit_pw',
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
|
@@ -35,6 +35,7 @@ describe 'openstack::nova::controller' do
|
|||||||
:userid => 'openstack',
|
:userid => 'openstack',
|
||||||
:password => 'rabbit_pass',
|
:password => 'rabbit_pass',
|
||||||
:enabled => true,
|
:enabled => true,
|
||||||
|
:cluster_disk_nodes => false,
|
||||||
:virtual_host => '/'
|
:virtual_host => '/'
|
||||||
)
|
)
|
||||||
should contain_class('nova').with(
|
should contain_class('nova').with(
|
||||||
@@ -46,6 +47,7 @@ describe 'openstack::nova::controller' do
|
|||||||
:glance_api_servers => '127.0.0.1:9292',
|
:glance_api_servers => '127.0.0.1:9292',
|
||||||
:debug => false,
|
:debug => false,
|
||||||
:verbose => false,
|
:verbose => false,
|
||||||
|
:rabbit_hosts => false,
|
||||||
:rabbit_host => '127.0.0.1'
|
:rabbit_host => '127.0.0.1'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user