Merge "scenario003: deploy Neutron with ML2 linuxbridge"
This commit is contained in:
4 changed files with 87 additions and 44 deletions
@@ -38,7 +38,7 @@ scenario](#All-In-One).
| keystone | X | X | X | X |
| glance | rbd | swift | file | file |
| nova | rbd | X | X | X |
| neutron | X | X | X | X |
| neutron | ovs | ovs | linuxbridge | ovs |
| cinder | rbd | iscsi | | iscsi |
| ceilometer | X | | | |
| aodh | X | | | |
@@ -33,7 +33,9 @@ include ::openstack_integration::rabbitmq
include::openstack_integration::mysql
include::openstack_integration::keystone
include::openstack_integration::glance
include::openstack_integration::neutron
class{ '::openstack_integration::neutron':
driver => 'linuxbridge',
}
include::openstack_integration::nova
include::openstack_integration::trove
include::openstack_integration::horizon
@@ -1,4 +1,13 @@
classopenstack_integration::neutron{
#ConfiguretheNeutronservice
#
#[*driver*]
#(optional)NeutronDrivertotest
#Canbe:openvswitchorlinuxbridge.
#Defaultsto'ml2_ovs'.
#
classopenstack_integration::neutron(
$driver='openvswitch',
){
include ::openstack_integration::config
@@ -16,6 +25,61 @@ class openstack_integration::neutron {
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'],
}
#createsbr-exvirtualinterfacetoreachfloating-ipnetwork
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':
password => 'neutron',
}
@@ -49,14 +113,9 @@ class openstack_integration::neutron {
auth_url => $::openstack_integration::config::keystone_admin_uri,
}
class{ '::neutron::plugins::ml2':
type_drivers => ['vxlan'],
tenant_network_types => ['vxlan'],
mechanism_drivers => ['openvswitch'],
}
class{ '::neutron::agents::ml2::ovs':
enable_tunneling => true,
local_ip => '127.0.0.1',
tunnel_types => ['vxlan'],
type_drivers => ['vxlan', 'flat'],
tenant_network_types => ['vxlan', 'flat'],
mechanism_drivers => $driver,
}
class{ '::neutron::agents::metadata':
debug => true,
@@ -64,16 +123,23 @@ class openstack_integration::neutron {
metadata_workers => 2,
}
class{ '::neutron::agents::lbaas':
debug => true,
interface_driver => $driver,
debug => true,
}
class{ '::neutron::agents::l3':
debug => true,
interface_driver => $driver,
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':
debug => true,
interface_driver => $driver,
debug => true,
}
class{ '::neutron::agents::metering':
debug => true,
interface_driver => $driver,
debug => true,
}
class{ '::neutron::server::notifications':
auth_url => $::openstack_integration::config::keystone_admin_uri,
@@ -83,6 +149,5 @@ class openstack_integration::neutron {
enabled => true,
driver => 'neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver',
}
include::vswitch::ovs
}
@@ -23,8 +23,10 @@ class openstack_integration::provision {
Keystone_user_role['admin@openstack']->Exec['manage_m1.micro_nova_flavor']
neutron_network{ 'public':
tenant_name => 'openstack',
router_external => true,
tenant_name => 'openstack',
router_external => true,
provider_physical_network => 'external',
provider_network_type => 'flat',
}
Keystone_user_role['admin@openstack']->Neutron_network<||>
@@ -38,32 +40,6 @@ class openstack_integration::provision {
tenant_name => 'openstack',
}
vs_bridge{ 'br-ex':
ensure => present,
notify => Exec['create_loop1_port'],
}
#createdummyloopbackinterfacetoexerciseaddingaporttoabridge
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'],
}
#createsbr-exvirtualinterfacetoreachfloating-ipnetwork
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':
ensure => present,
container_format => 'bare',
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.