Merge "scenario003: deploy Neutron with ML2 linuxbridge"
This commit is contained in:
@@ -38,7 +38,7 @@ scenario](#All-In-One).
|
|||||||
| keystone | X | X | X | X |
|
| keystone | X | X | X | X |
|
||||||
| glance | rbd | swift | file | file |
|
| glance | rbd | swift | file | file |
|
||||||
| nova | rbd | X | X | X |
|
| nova | rbd | X | X | X |
|
||||||
| neutron | X | X | X | X |
|
| neutron | ovs | ovs | linuxbridge | ovs |
|
||||||
| cinder | rbd | iscsi | | iscsi |
|
| cinder | rbd | iscsi | | iscsi |
|
||||||
| ceilometer | X | | | |
|
| ceilometer | X | | | |
|
||||||
| aodh | X | | | |
|
| aodh | X | | | |
|
||||||
|
@@ -33,7 +33,9 @@ include ::openstack_integration::rabbitmq
|
|||||||
include ::openstack_integration::mysql
|
include ::openstack_integration::mysql
|
||||||
include ::openstack_integration::keystone
|
include ::openstack_integration::keystone
|
||||||
include ::openstack_integration::glance
|
include ::openstack_integration::glance
|
||||||
include ::openstack_integration::neutron
|
class { '::openstack_integration::neutron':
|
||||||
|
driver => 'linuxbridge',
|
||||||
|
}
|
||||||
include ::openstack_integration::nova
|
include ::openstack_integration::nova
|
||||||
include ::openstack_integration::trove
|
include ::openstack_integration::trove
|
||||||
include ::openstack_integration::horizon
|
include ::openstack_integration::horizon
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
class openstack_integration::neutron {
|
# Configure the Neutron service
|
||||||
|
#
|
||||||
|
# [*driver*]
|
||||||
|
# (optional) Neutron Driver to test
|
||||||
|
# Can be: openvswitch or linuxbridge.
|
||||||
|
# Defaults to 'ml2_ovs'.
|
||||||
|
#
|
||||||
|
class openstack_integration::neutron (
|
||||||
|
$driver = 'openvswitch',
|
||||||
|
) {
|
||||||
|
|
||||||
include ::openstack_integration::config
|
include ::openstack_integration::config
|
||||||
|
|
||||||
@@ -16,6 +25,61 @@ class openstack_integration::neutron {
|
|||||||
require => Class['::rabbitmq'],
|
require => Class['::rabbitmq'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case $driver {
|
||||||
|
'openvswitch': {
|
||||||
|
include ::vswitch::ovs
|
||||||
|
# Functional test for Open-vSwitch:
|
||||||
|
# create dummy loopback interface to exercise adding a port to a bridge
|
||||||
|
vs_bridge { 'br-ex':
|
||||||
|
ensure => present,
|
||||||
|
notify => Exec['create_loop1_port'],
|
||||||
|
}
|
||||||
|
exec { 'create_loop1_port':
|
||||||
|
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
|
provider => shell,
|
||||||
|
command => 'ip link add name loop1 type dummy && ip addr add 127.2.0.1/24 dev loop1',
|
||||||
|
refreshonly => true,
|
||||||
|
} ->
|
||||||
|
vs_port { 'loop1':
|
||||||
|
ensure => present,
|
||||||
|
bridge => 'br-ex',
|
||||||
|
notify => Exec['create_br-ex_vif'],
|
||||||
|
}
|
||||||
|
# creates br-ex virtual interface to reach floating-ip network
|
||||||
|
exec { 'create_br-ex_vif':
|
||||||
|
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
|
provider => shell,
|
||||||
|
command => 'ip addr add 172.24.5.1/24 dev br-ex && ip link set br-ex up',
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
class { '::neutron::agents::ml2::ovs':
|
||||||
|
enable_tunneling => true,
|
||||||
|
local_ip => '127.0.0.1',
|
||||||
|
tunnel_types => ['vxlan'],
|
||||||
|
bridge_mappings => ['external:br-ex'],
|
||||||
|
manage_vswitch => false,
|
||||||
|
}
|
||||||
|
$external_network_bridge = 'br-ex'
|
||||||
|
}
|
||||||
|
'linuxbridge': {
|
||||||
|
exec { 'create_dummy_iface':
|
||||||
|
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
|
provider => shell,
|
||||||
|
unless => 'ip l show loop0',
|
||||||
|
command => 'ip link add name loop0 type dummy && ip addr add 172.24.5.1/24 dev loop0 && ip link set loop0 up',
|
||||||
|
}
|
||||||
|
class { '::neutron::agents::ml2::linuxbridge':
|
||||||
|
local_ip => $::ipaddress,
|
||||||
|
tunnel_types => ['vxlan'],
|
||||||
|
physical_interface_mappings => ['external:loop0'],
|
||||||
|
}
|
||||||
|
$external_network_bridge = ''
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("Unsupported neutron driver (${driver})")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class { '::neutron::db::mysql':
|
class { '::neutron::db::mysql':
|
||||||
password => 'neutron',
|
password => 'neutron',
|
||||||
}
|
}
|
||||||
@@ -49,14 +113,9 @@ class openstack_integration::neutron {
|
|||||||
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
auth_url => $::openstack_integration::config::keystone_admin_uri,
|
||||||
}
|
}
|
||||||
class { '::neutron::plugins::ml2':
|
class { '::neutron::plugins::ml2':
|
||||||
type_drivers => ['vxlan'],
|
type_drivers => ['vxlan', 'flat'],
|
||||||
tenant_network_types => ['vxlan'],
|
tenant_network_types => ['vxlan', 'flat'],
|
||||||
mechanism_drivers => ['openvswitch'],
|
mechanism_drivers => $driver,
|
||||||
}
|
|
||||||
class { '::neutron::agents::ml2::ovs':
|
|
||||||
enable_tunneling => true,
|
|
||||||
local_ip => '127.0.0.1',
|
|
||||||
tunnel_types => ['vxlan'],
|
|
||||||
}
|
}
|
||||||
class { '::neutron::agents::metadata':
|
class { '::neutron::agents::metadata':
|
||||||
debug => true,
|
debug => true,
|
||||||
@@ -64,15 +123,22 @@ class openstack_integration::neutron {
|
|||||||
metadata_workers => 2,
|
metadata_workers => 2,
|
||||||
}
|
}
|
||||||
class { '::neutron::agents::lbaas':
|
class { '::neutron::agents::lbaas':
|
||||||
|
interface_driver => $driver,
|
||||||
debug => true,
|
debug => true,
|
||||||
}
|
}
|
||||||
class { '::neutron::agents::l3':
|
class { '::neutron::agents::l3':
|
||||||
|
interface_driver => $driver,
|
||||||
debug => true,
|
debug => true,
|
||||||
|
# This parameter is deprecated but we need it for linuxbridge
|
||||||
|
# It will be dropped in a future release.
|
||||||
|
external_network_bridge => $external_network_bridge,
|
||||||
}
|
}
|
||||||
class { '::neutron::agents::dhcp':
|
class { '::neutron::agents::dhcp':
|
||||||
|
interface_driver => $driver,
|
||||||
debug => true,
|
debug => true,
|
||||||
}
|
}
|
||||||
class { '::neutron::agents::metering':
|
class { '::neutron::agents::metering':
|
||||||
|
interface_driver => $driver,
|
||||||
debug => true,
|
debug => true,
|
||||||
}
|
}
|
||||||
class { '::neutron::server::notifications':
|
class { '::neutron::server::notifications':
|
||||||
@@ -83,6 +149,5 @@ class openstack_integration::neutron {
|
|||||||
enabled => true,
|
enabled => true,
|
||||||
driver => 'neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver',
|
driver => 'neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver',
|
||||||
}
|
}
|
||||||
include ::vswitch::ovs
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,8 @@ class openstack_integration::provision {
|
|||||||
neutron_network { 'public':
|
neutron_network { 'public':
|
||||||
tenant_name => 'openstack',
|
tenant_name => 'openstack',
|
||||||
router_external => true,
|
router_external => true,
|
||||||
|
provider_physical_network => 'external',
|
||||||
|
provider_network_type => 'flat',
|
||||||
}
|
}
|
||||||
Keystone_user_role['admin@openstack'] -> Neutron_network<||>
|
Keystone_user_role['admin@openstack'] -> Neutron_network<||>
|
||||||
|
|
||||||
@@ -38,32 +40,6 @@ class openstack_integration::provision {
|
|||||||
tenant_name => 'openstack',
|
tenant_name => 'openstack',
|
||||||
}
|
}
|
||||||
|
|
||||||
vs_bridge { 'br-ex':
|
|
||||||
ensure => present,
|
|
||||||
notify => Exec['create_loop1_port'],
|
|
||||||
}
|
|
||||||
|
|
||||||
# create dummy loopback interface to exercise adding a port to a bridge
|
|
||||||
exec { 'create_loop1_port':
|
|
||||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
|
||||||
provider => shell,
|
|
||||||
command => 'ip link add name loop1 type dummy; ip addr add 127.2.0.1/24 dev loop1',
|
|
||||||
refreshonly => true,
|
|
||||||
}->
|
|
||||||
vs_port { 'loop1':
|
|
||||||
ensure => present,
|
|
||||||
bridge => 'br-ex',
|
|
||||||
notify => Exec['create_br-ex_vif'],
|
|
||||||
}
|
|
||||||
|
|
||||||
# creates br-ex virtual interface to reach floating-ip network
|
|
||||||
exec { 'create_br-ex_vif':
|
|
||||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
|
||||||
provider => shell,
|
|
||||||
command => 'ip addr add 172.24.5.1/24 dev br-ex; ip link set br-ex up',
|
|
||||||
refreshonly => true,
|
|
||||||
}
|
|
||||||
|
|
||||||
glance_image { 'cirros':
|
glance_image { 'cirros':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
container_format => 'bare',
|
container_format => 'bare',
|
||||||
|
Reference in New Issue
Block a user