Add OVS provider network params to all.pp
All.pp currently doesn't support provider networks with OVS due to lacking a few of the necessary parameters. This patch adds them to enable all-in-one deployments that support provider networks. Change-Id: I5ff349a47a40a98a3c768e571f1ef9346265109f Implements: blueprint all-add-ovs-provider-params
This commit is contained in:
@@ -45,6 +45,10 @@
|
|||||||
# [cache_server_port] local memcached instance port
|
# [cache_server_port] local memcached instance port
|
||||||
# [horizon] (bool) is horizon installed. Defaults to: true
|
# [horizon] (bool) is horizon installed. Defaults to: true
|
||||||
# [neutron] (bool) is neutron installed
|
# [neutron] (bool) is neutron installed
|
||||||
|
# [network_vlan_ranges] array of vlan_start:vlan_stop groups
|
||||||
|
# [bridge_mappings] array of physical_newtork:l2_start:l2end groups
|
||||||
|
# [bridge_uplinks] array of bridge_name:bridge_interface groups
|
||||||
|
# [tenant_network_type] vlan, gre, etc.
|
||||||
# The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps.
|
# The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps.
|
||||||
# There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose.
|
# There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose.
|
||||||
# Each app is defined in two parts, the display name, and the URI
|
# Each app is defined in two parts, the display name, and the URI
|
||||||
@@ -204,6 +208,10 @@ class openstack::all (
|
|||||||
$neutron_auth_url = 'http://127.0.0.1:35357/v2.0',
|
$neutron_auth_url = 'http://127.0.0.1:35357/v2.0',
|
||||||
$enable_neutron_server = true,
|
$enable_neutron_server = true,
|
||||||
$ovs_local_ip = false,
|
$ovs_local_ip = false,
|
||||||
|
$network_vlan_ranges = undef,
|
||||||
|
$bridge_mappings = undef,
|
||||||
|
$bridge_uplinks = undef,
|
||||||
|
$tenant_network_type = 'gre',
|
||||||
# General
|
# General
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$enabled = true
|
$enabled = true
|
||||||
@@ -408,6 +416,18 @@ class openstack::all (
|
|||||||
fail('bridge_interface must be set when configuring neutron')
|
fail('bridge_interface must be set when configuring neutron')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ! $bridge_mappings {
|
||||||
|
$bridge_mappings_real = ["default:${external_bridge_name}"]
|
||||||
|
} else {
|
||||||
|
$bridge_mappings_real = $bridge_mappings
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! $bridge_uplinks {
|
||||||
|
$bridge_uplinks_real = ["${external_bridge_name}:${bridge_interface}"]
|
||||||
|
} else {
|
||||||
|
$bridge_uplinks_real = $bridge_uplinks
|
||||||
|
}
|
||||||
|
|
||||||
class { 'openstack::neutron':
|
class { 'openstack::neutron':
|
||||||
# Database
|
# Database
|
||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
@@ -418,10 +438,12 @@ class openstack::all (
|
|||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
# Neutron OVS
|
# Neutron OVS
|
||||||
ovs_local_ip => $ovs_local_ip_real,
|
ovs_local_ip => $ovs_local_ip_real,
|
||||||
bridge_uplinks => ["${external_bridge_name}:${bridge_interface}"],
|
bridge_uplinks => $bridge_uplinks_real,
|
||||||
bridge_mappings => ["default:${external_bridge_name}"],
|
bridge_mappings => $bridge_mappings_real,
|
||||||
enable_ovs_agent => $enable_ovs_agent,
|
enable_ovs_agent => $enable_ovs_agent,
|
||||||
firewall_driver => $firewall_driver,
|
firewall_driver => $firewall_driver,
|
||||||
|
tenant_network_type => $tenant_network_type,
|
||||||
|
network_vlan_ranges => $network_vlan_ranges,
|
||||||
# Database
|
# Database
|
||||||
db_name => $neutron_db_name,
|
db_name => $neutron_db_name,
|
||||||
db_user => $neutron_db_user,
|
db_user => $neutron_db_user,
|
||||||
|
@@ -125,6 +125,51 @@ describe 'openstack::all' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with neutron_user_password, neutron_db_password, bridge_interface, ovs_local_ip, bridge_mappings, bridge_uplinks, and shared_secret set' do
|
||||||
|
before do
|
||||||
|
params.merge!(
|
||||||
|
:neutron_user_password => 'neutron_user_password',
|
||||||
|
:neutron_db_password => 'neutron_db_password',
|
||||||
|
:bridge_interface => 'eth0',
|
||||||
|
:ovs_local_ip => '10.0.1.1',
|
||||||
|
:network_vlan_ranges => '1:1000',
|
||||||
|
:bridge_mappings => ['intranet:br-intra','extranet:br-extra'],
|
||||||
|
:bridge_uplinks => ['intranet:eth1','extranet:eth2'],
|
||||||
|
:tenant_network_type => 'vlan',
|
||||||
|
:metadata_shared_secret => 'shared_md_secret'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
it 'contains an openstack::neutron class' do
|
||||||
|
should contain_class('openstack::neutron').with(
|
||||||
|
:db_host => '127.0.0.1',
|
||||||
|
:rabbit_host => '127.0.0.1',
|
||||||
|
:rabbit_user => 'openstack',
|
||||||
|
:rabbit_password => 'rabbit_pw',
|
||||||
|
:rabbit_virtual_host => '/',
|
||||||
|
:ovs_local_ip => '10.0.1.1',
|
||||||
|
:network_vlan_ranges => '1:1000',
|
||||||
|
:bridge_uplinks => ['intranet:eth1','extranet:eth2'],
|
||||||
|
:bridge_mappings => ['intranet:br-intra','extranet:br-extra'],
|
||||||
|
:tenant_network_type => 'vlan',
|
||||||
|
:enable_ovs_agent => true,
|
||||||
|
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
|
||||||
|
:db_name => 'neutron',
|
||||||
|
:db_user => 'neutron',
|
||||||
|
:db_password => 'neutron_db_password',
|
||||||
|
:enable_dhcp_agent => true,
|
||||||
|
:enable_l3_agent => true,
|
||||||
|
:enable_metadata_agent => true,
|
||||||
|
:auth_url => 'http://127.0.0.1:35357/v2.0',
|
||||||
|
:user_password => 'neutron_user_password',
|
||||||
|
:shared_secret => 'shared_md_secret',
|
||||||
|
:keystone_host => '127.0.0.1',
|
||||||
|
:enabled => true,
|
||||||
|
:enable_server => true,
|
||||||
|
:verbose => false
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'cinder enabled (which is the default)' do
|
context 'cinder enabled (which is the default)' do
|
||||||
|
Reference in New Issue
Block a user