fuel-library/deployment/puppet/l23network
2013-03-21 22:42:34 +04:00
..
lib Configure interface bonding by puppet 2013-03-21 15:12:53 +04:00
manifests more good error message 2013-03-21 22:26:41 +04:00
templates FIX: bonding opts 2013-03-21 22:42:34 +04:00
Modulefile Fix eclipse build 2013-03-01 04:39:21 +04:00
README.md create module l23network for config L2 and L3 network 2013-02-04 20:28:55 +04:00

Puppet module for configuring L2 and L3 networks. Based on open vSwitch and iproute2.

L2 network configuation

Current layout is: bridges - A "Bridge" is basically the thing you plug ports / interfaces into. ports - A Port is a interface you plug into the bridge (switch).

USAGE: Place this directory at: /l23network

Then in your manifest you can either use the things as parameterized classes:

class {"l23network": }

l23network::l2::bridge{"br-mgmt": } l23network::l2::port{"eth0": bridge => "br-mgmt"} l23network::l2::port{"mmm0": bridge => "br-mgmt"} l23network::l2::port{"mmm1": bridge => "br-mgmt"}

l23network::l2::bridge{"br-ex": } l23network::l2::port{"eth0": bridge => "br-ex"} l23network::l2::port{"eth1": bridge => "br-ex", ifname_order_prefix='ovs'} l23network::l2::port{"eee0": bridge => "br-ex", skip_existing => true} l23network::l2::port{"eee1": bridge => "br-ex", type=>'internal'}

You can define type for the port. Port type can be 'system', 'internal', 'tap', 'gre', 'ipsec_gre', 'capwap', 'patch', 'null'. If you not define type for port (or define '') -- ovs-vsctl will have default behavior (see http://openvswitch.org/cgi-bin/ovsman.cgi?page=utilities%2Fovs-vsctl.8).

You can use skip_existing option if you not want interrupt configuration during adding existing port or bridge.

L3 network configuation

l23network::l3::ifconfig {"some_name0": interface=>'eth0', ipaddr=>'192.168.0.1', netmask=>'255.255.255.0'} l23network::l3::ifconfig {"some_name1": interface=>'br-ex', ipaddr=>'192.168.10.1', netmask=>'255.255.255.0', ifname_order_prefix='ovs'} l23network::l3::ifconfig {"some_name2": interface=>'aaa0', ipaddr=>'192.168.10.1', netmask=>'255.255.255.0', ifname_order_prefix='zzz'}

Option 'ipaddr' can contains IP address, 'dhcp', or 'none' for up empty unaddressed interface.

Centos and Ubuntu at startup started and configure network interfaces in alphabetical order interface configuration file names. In example above we change configuration process order by ifname_order_prefix keyword. We will have this order: ifcfg-eth0 ifcfg-ovs-br-ex ifcfg-zzz-aaa0 And OS will configure interfaces br-ex and aaa0 after eth0


this module based on https://github.com/ekarlso/puppet-vswitch