Adjust manifests to reflect last changes in fuel-library

Switch to ODL Beryllium RC1 version

Change-Id: Ia0e1d4bc39849030eee39083aec1c0bc77be0060
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
This commit is contained in:
Michal Skalski 2016-02-04 13:57:04 +01:00
parent 2ccd7c2a86
commit 2d2988b314
4 changed files with 26 additions and 83 deletions

View File

@ -1,14 +1,11 @@
notice('MODULAR: odl-ml2.pp')
include opendaylight
$use_neutron = hiera('use_neutron', false)
$compute = roles_include('compute')
class neutron {}
class { 'neutron' :}
$address = hiera('management_vip')
$port = $opendaylight::rest_api_port
if $use_neutron {
include ::neutron::params
@ -34,64 +31,10 @@ if $use_neutron {
$auth_region = hiera('region', 'RegionOne')
$auth_endpoint_type = 'internalURL'
$network_scheme = hiera_hash('network_scheme', {})
prepare_network_config($network_scheme)
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', { })
$l2_population = try_get_value($neutron_advanced_config, 'neutron_l2_pop', false)
$dvr = try_get_value($neutron_advanced_config, 'neutron_dvr', false)
$segmentation_type = try_get_value($neutron_config, 'L2/segmentation_type')
if $compute and ! $dvr {
$do_floating = false
} else {
$do_floating = true
}
$bridge_mappings = generate_bridge_mappings($neutron_config, $network_scheme, {
'do_floating' => $do_floating,
'do_tenant' => true,
'do_provider' => false
})
if $segmentation_type == 'vlan' {
$net_role_property = 'neutron/private'
$iface = get_network_role_property($net_role_property, 'phys_dev')
$enable_tunneling = false
$network_type = 'vlan'
$tunnel_types = []
} else {
$net_role_property = 'neutron/mesh'
$tunneling_ip = get_network_role_property($net_role_property, 'ipaddr')
$iface = get_network_role_property($net_role_property, 'phys_dev')
$physical_net_mtu = pick(get_transformation_property('mtu', $iface[0]), '1500')
$tunnel_id_ranges = [try_get_value($neutron_config, 'L2/tunnel_id_ranges')]
if $segmentation_type == 'gre' {
$mtu_offset = '42'
$network_type = 'gre'
} else {
# vxlan is the default segmentation type for non-vlan cases
$mtu_offset = '50'
$network_type = 'vxlan'
}
$tunnel_types = [$network_type]
$enable_tunneling = true
}
neutron_plugin_ml2 {
'ml2/mechanism_drivers': value => 'opendaylight';
'ml2_odl/password': value => 'admin';
'ml2_odl/username': value => 'admin';
'ml2_odl/url': value => "http://${address}:${port}/controller/nb/v2/neutron";
}
# Synchronize database after plugin was configured
if $primary_controller {
include ::neutron::db::sync
Neutron_plugin_ml2<||> ~> Exec['neutron-db-sync']
notify{"Trigger neutron-db-sync": } ~> Exec['neutron-db-sync']
}
if $node_name in keys($neutron_nodes) {
@ -132,13 +75,4 @@ if $use_neutron {
ensure => 'installed',
}
# override neutron options
$override_configuration = hiera_hash('configuration', {})
override_resources { 'neutron_plugin_ml2':
data => $override_configuration['neutron_plugin_ml2']
}
override_resources { 'neutron_agent_ovs':
data => $override_configuration['neutron_agent_ovs']
}
}

View File

@ -25,11 +25,6 @@ notify {'SDN': message => $sdn }
sysctl::value { 'net.ipv4.conf.all.arp_accept': value => '1' }
sysctl::value { 'net.ipv4.conf.default.arp_accept': value => '1' }
#Disable rp_filter
sysctl::value { 'net.ipv4.conf.all.rp_filter': value => '0' }
sysctl::value { 'net.ipv4.conf.default.rp_filter': value => '0' }
# setting kernel reserved ports
# defaults are 49000,49001,35357,41055,41056,58882
class { 'openstack::reserved_ports': }
@ -98,17 +93,21 @@ exec { 'wait-for-interfaces':
command => 'sleep 32',
}
# check that network was configured successfully
# and the default gateway is online
$default_gateway = hiera('default_gateway')
$run_ping_checker = hiera('run_ping_checker', true)
ping_host { $default_gateway :
ensure => 'up',
if $run_ping_checker {
# check that network was configured successfully
# and the default gateway is online
$default_gateway = hiera('default_gateway')
ping_host { $default_gateway :
ensure => 'up',
}
L2_port<||> -> Ping_host[$default_gateway]
L2_bond<||> -> Ping_host[$default_gateway]
L3_ifconfig<||> -> Ping_host[$default_gateway]
L3_route<||> -> Ping_host[$default_gateway]
}
L2_port<||> -> Ping_host[$default_gateway]
L2_bond<||> -> Ping_host[$default_gateway]
L3_ifconfig<||> -> Ping_host[$default_gateway]
L3_route<||> -> Ping_host[$default_gateway]
Class['l23network'] ->
Exec['wait-for-interfaces']

View File

@ -5,9 +5,18 @@ module Puppet::Parser::Functions
filename = args[0]
node_roles = args[1]
odl = function_hiera(['opendaylight'])
management_vip = function_hiera(['management_vip'])
hiera_overrides = {}
configuration = {}
ml2_plugin = {'neutron_plugin_ml2' =>
{'ml2/mechanism_drivers' => {'value' => 'opendaylight'},
'ml2_odl/password' => {'value' => 'admin'},
'ml2_odl/username' => {'value' => 'admin'},
'ml2_odl/url' => {'value' => "http://#{management_vip}:#{odl['rest_api_port']}/controller/nb/v2/neutron"}
}
}
# When L3 forward is disabled in ODL set external_network_bridge option
# to use neutron L3 agent to create qg port on selected bridge
# Without this floating IPs doesn't work.
@ -28,6 +37,7 @@ module Puppet::Parser::Functions
}
}
configuration.merge! ml2_plugin
configuration.merge! l3_agent
configuration.merge! dhcp_agent if odl['enable_l3_odl']
hiera_overrides['configuration'] = configuration

View File

@ -7,7 +7,7 @@ set -eux
# Where we can find odl karaf distribution tarball
# can be http(s) url or absolute path
ODL_TARBALL_LOCATION=${ODL_TARBALL_LOCATION:-https://nexus.opendaylight.org/content/repositories/autorelease-1044/org/opendaylight/integration/distribution-karaf/0.4.0-beryllium-daily-v201601270140/distribution-karaf-0.4.0-beryllium-daily-v201601270140.tar.gz}
ODL_TARBALL_LOCATION=${ODL_TARBALL_LOCATION:-https://nexus.opendaylight.org/content/repositories/staging/org/opendaylight/integration/distribution-karaf/0.4.0-Beryllium-RC1/distribution-karaf-0.4.0-Beryllium-RC1.tar.gz}
#Verion number used in deb/rpm package
ODL_VERSION_NUMBER=${ODL_VERSION_NUMBER:-0.4.0}