scenario002: deploy RabbitMQ with IPv6 binding

* Configure RabbitMQ to bind on IPv6 (scenario002 only).
* Configure OpenStack service to connect with an IPv6 on
  RabbitMQ (scenario002 only).

Change-Id: I0e4ab4b03d7b1c7bb47c55a751bc04f29292a621
This commit is contained in:
Emilien Macchi 2016-03-01 14:24:51 -05:00
parent 4a81d1da98
commit a0c3df6eae
9 changed files with 36 additions and 16 deletions

View File

@ -34,6 +34,7 @@ scenario](#All-In-One).
| - | scenario001 | scenario002 | scenario003 | scenario-aio |
|:----------:|:-----------:|:-----------:|:-----------:|:-------------:
| ssl | no | yes | no | no |
| ipv6 | no | yes | no | no |
| keystone | X | X | X | X |
| glance | rbd | swift | file | file |
| nova | rbd | X | X | X |

View File

@ -17,6 +17,7 @@
include ::openstack_integration
class { '::openstack_integration::config':
ssl => true,
ipv6 => true,
}
include ::openstack_integration::cacert
include ::openstack_integration::rabbitmq

View File

@ -33,7 +33,7 @@ class openstack_integration::cinder (
}
class { '::cinder':
database_connection => 'mysql+pymysql://cinder:cinder@127.0.0.1/cinder?charset=utf8',
rabbit_host => '127.0.0.1',
rabbit_host => $::openstack_integration::config::rabbit_host,
rabbit_port => $::openstack_integration::config::rabbit_port,
rabbit_userid => 'cinder',
rabbit_password => 'an_even_bigger_secret',

View File

@ -4,8 +4,13 @@
# (optional) Boolean to enable or not SSL.
# Defaults to false.
#
# [*ipv6*]
# (optional) Boolean to enable or not IPv6.
# Defaults to false.
#
class openstack_integration::config (
$ssl = false,
$ipv6 = false,
) {
if $ssl {
@ -14,4 +19,15 @@ class openstack_integration::config (
$rabbit_port = '5672'
}
if $ipv6 {
$rabbit_host = '[::1]'
$rabbit_env = {
'RABBITMQ_NODE_IP_ADDRESS' => '::1',
'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"',
}
} else {
$rabbit_host = '127.0.0.1'
$rabbit_env = {}
}
}

View File

@ -80,7 +80,7 @@ class openstack_integration::glance (
class { '::glance::notify::rabbitmq':
rabbit_userid => 'glance',
rabbit_password => 'an_even_bigger_secret',
rabbit_host => '127.0.0.1',
rabbit_host => $::openstack_integration::config::rabbit_host,
rabbit_port => $::openstack_integration::config::rabbit_port,
notification_driver => 'messagingv2',
rabbit_use_ssl => $::openstack_integration::config::ssl,

View File

@ -19,7 +19,7 @@ class openstack_integration::ironic {
class { '::ironic':
rabbit_userid => 'ironic',
rabbit_password => 'an_even_bigger_secret',
rabbit_host => '127.0.0.1',
rabbit_host => $::openstack_integration::config::rabbit_host,
rabbit_port => $::openstack_integration::config::rabbit_port,
rabbit_use_ssl => $::openstack_integration::config::ssl,
database_connection => 'mysql+pymysql://ironic:ironic@127.0.0.1/ironic?charset=utf8',

View File

@ -25,7 +25,7 @@ class openstack_integration::neutron {
class { '::neutron':
rabbit_user => 'neutron',
rabbit_password => 'an_even_bigger_secret',
rabbit_host => '127.0.0.1',
rabbit_host => $::openstack_integration::config::rabbit_host,
rabbit_port => $::openstack_integration::config::rabbit_port,
rabbit_use_ssl => $::openstack_integration::config::ssl,
allow_overlapping_ips => true,

View File

@ -37,7 +37,7 @@ class openstack_integration::nova (
class { '::nova':
database_connection => 'mysql+pymysql://nova:nova@127.0.0.1/nova?charset=utf8',
api_database_connection => 'mysql+pymysql://nova_api:nova@127.0.0.1/nova_api?charset=utf8',
rabbit_host => '127.0.0.1',
rabbit_host => $::openstack_integration::config::rabbit_host,
rabbit_port => $::openstack_integration::config::rabbit_port,
rabbit_userid => 'nova',
rabbit_password => 'an_even_bigger_secret',

View File

@ -36,11 +36,13 @@ class openstack_integration::rabbitmq {
ssl_cacert => $::openstack_integration::params::cacert_path,
ssl_cert => $::openstack_integration::params::cert_path,
ssl_key => "/etc/rabbitmq/ssl/private/${::fqdn}.pem",
environment_variables => $::openstack_integration::config::rabbit_env,
}
} else {
class { '::rabbitmq':
delete_guest_user => true,
package_provider => $package_provider,
environment_variables => $::openstack_integration::config::rabbit_env,
}
}
rabbitmq_vhost { '/':