Merge "[Ref Arch] OVS endpoints configuration using FUEL CLI"

This commit is contained in:
Jenkins 2015-09-25 08:22:41 +00:00 committed by Gerrit Code Review
commit 4f4e5dcbc2
6 changed files with 205 additions and 165 deletions

View File

@ -0,0 +1,59 @@
network_scheme:
provider: ovs
version: 1.0
interfaces:
eth0: {}
eth1: {}
eth2: {}
eth3: {}
endpoints:
br-ex:
IP: [172.16.0.2/24]
gateway: 172.16.0.1
br-mgmt:
IP: [192.168.0.2/24]
br-prv: {IP: none}
br-storage:
IP: [192.168.1.2/24]
eth0:
IP: [10.20.0.4/24]
roles:
ex: br-ex
fw-admin: eth0
management: br-mgmt
private: br-prv
storage: br-storage
transformations:
- action: add-br
name: br-ex
- action: add-br
name: br-mgmt
- action: add-br
name: br-storage
- action: add-br
name: br-prv
- action: add-br
name: br-bondnew
- action: add-br
name: br-eth1
- action: add-bond
bridge: br-bondnew
interfaces: [eth2, eth3]
provider: lnx
properties:
mode: 1
name: bondnew
- action: add-port
bridge: br-eth1
name: eth1
- action: add-patch
bridges: [br-bondnew, br-storage]
tags: [103, 0]
- action: add-patch
bridges: [br-eth1, br-ex]
tags: [101, 0]
- action: add-patch
bridges: [br-eth1, br-mgmt]
tags: [102, 0]
- action: add-patch
bridges: [br-bondnew, br-prv]

View File

@ -0,0 +1,66 @@
network_scheme:
provider: ovs
version: 1.1
interfaces:
eth0: {}
eth1: {}
eth2: {}
eth3: {}
endpoints:
br-ex:
IP: [172.16.0.2/24]
gateway: 172.16.0.1
br-mgmt:
IP: [192.168.0.2/24]
br-prv: {IP: none}
br-storage:
IP: [192.168.1.2/24]
eth0:
IP: [10.20.0.4/24]
roles:
ex: br-ex
fw-admin: eth0
management: br-mgmt
private: br-prv
storage: br-storage
transformations:
- action: add-br
name: br-ex
provider: ovs
- action: add-br
name: br-mgmt
provider: ovs
- action: add-br
name: br-storage
provider: ovs
- action: add-br
name: br-prv
provider: ovs
- action: add-br
name: br-bondnew
provider: ovs
- action: add-br
name: br-eth1
provider: ovs
- action: add-bond
bridge: br-bondnew
interfaces: [eth2, eth3]
properties: {lacp:active}
name: bondnew
provider: ovs
- action: add-port
bridge: br-eth1
name: eth1
provider: ovs
- action: add-patch
bridges: [br-bondnew, br-storage]
tags: [103, 0]
- action: add-patch
bridges: [br-eth1, br-ex]
tags: [101, 0]
- action: add-patch
bridges: [br-eth1, br-mgmt]
tags: [102, 0]
- action: add-patch
bridges: [br-bondnew, br-prv]

View File

@ -0,0 +1,68 @@
network_scheme:
endpoints:
br-ex:
IP:
- 172.16.0.7/24
gateway: 172.16.0.1
br-fw-admin:
IP:
- 10.20.0.7/24
br-mgmt:
IP:
- 192.168.0.7/24
br-prv:
IP: none
br-storage:
IP:
- 192.168.1.6/24
interfaces:
eth0:
mtu: 1234
eth1:
mtu: 4321
provider: ovs
roles:
ex: br-ex
fw-admin: eth0
management: br-mgmt
private: br-prv
storage: br-storage
transformations:
- action: add-br
name: br-ex
provider: ovs
- action: add-br
name: br-mgmt
provider: ovs
- action: add-br
name: br-storage
provider: ovs
- action: add-br
name: br-prv
provider: ovs
- action: add-br
name: br-bondnew
provider: ovs
- action: add-br
name: br-eth1
provider: ovs
- action: add-bond
bridge: br-bondnew
interfaces: [eth2, eth3]
properties: [lacp=active]
name: bondnew
- action: add-port
bridge: br-eth1
name: eth1
provider: ovs
- action: add-patch
bridges: [br-bondnew, br-storage]
vlan_ids: [103, 0]
- action: add-patch
bridges: [br-eth1, br-ex]
vlan_ids: [101, 0]
- action: add-patch
bridges: [br-eth1, br-mgmt]
vlan_ids: [102, 0]
- action: add-patch
bridges: [br-bondnew, br-prv]

View File

@ -8,78 +8,18 @@ Public networks use the last NIC ("eth1").
To create bonding interface using Open vSwitch, do the following:
* Create a separate OVS bridge "br-bond0" instead of "br-eth2" and "br-eth3".
* Connect "eth2" and "eth3" to "br-bond0" as a bonded port with property
* Create a separate OVS bridge "br-bondnew" instead of "br-eth2" and "br-eth3".
* Connect "eth2" and "eth3" to "br-bondnew" as a bonded port with property
"lacp=active".
* Connect "br-prv" and "br-storage" bridges to "br-bond0" by OVS patches.
* Connect "br-prv" and "br-storage" bridges to "br-bondnew" by OVS patches.
* Leave all of the other things unchanged.
Here is an example of "network_scheme" section in the node configuration:
::
'network_scheme':
'provider': 'ovs'
'version': '1.0'
'interfaces':
'eth0': {}
'eth1': {}
'eth2': {}
'eth3': {}
'endpoints':
'br-ex':
'IP': ['172.16.0.2/24']
'gateway': '172.16.0.1'
'br-mgmt':
'IP': ['192.168.0.2/24']
'br-prv': {'IP': 'none'}
'br-storage':
'IP': ['192.168.1.2/24']
'eth0':
'IP': ['10.20.0.4/24']
'roles':
'ex': 'br-ex'
'fw-admin': 'eth0'
'management': 'br-mgmt'
'private': 'br-prv'
'storage': 'br-storage'
'transformations':
- 'action': 'add-br'
'name': 'br-ex'
- 'action': 'add-br'
'name': 'br-mgmt'
- 'action': 'add-br'
'name': 'br-storage'
- 'action': 'add-br'
'name': 'br-prv'
- 'action': 'add-br'
'name': 'br-bond0'
- 'action': 'add-br'
'name': 'br-eth1'
- 'action': 'add-bond'
'bridge': 'br-bond0'
'interfaces': ['eth2', 'eth3']
'properties': ['lacp=active']
'name': 'bond0'
- 'action': 'add-port'
'bridge': 'br-eth1'
'name': 'eth1'
- 'action': 'add-patch'
'bridges': ['br-bond0', 'br-storage']
'tags': [103, 0]
- 'action': 'add-patch'
'bridges': ['br-eth1', 'br-ex']
'tags': [101, 0]
- 'action': 'add-patch'
'bridges': ['br-eth1', 'br-mgmt']
'tags': [102, 0]
- 'action': 'add-patch'
'bridges': ['br-bond0', 'br-prv']
See the example of `OVS network scheme <examples/bonding_ovs_network_scheme.yaml>`_ section in the node configuration.
If you are going to use Linux native bonding, follow these steps:
* Create a new interface "bond0" instead of "br-eth2" and "br-eth3".
* Connect "eth2" and "eth3" to "bond0" as a bonded port.
* Create a new interface "bondnew" instead of "br-eth2" and "br-eth3".
* Connect "eth2" and "eth3" to "bondnew" as a bonded port.
* Add 'provider': 'lnx' to choose Linux native mode.
* Add properties as a hash instead of an array used in ovs mode. Properties are same as options used
during the bonding kernel modules loading. You should provide which mode this bonding interface should use. Any other
@ -88,67 +28,7 @@ If you are going to use Linux native bonding, follow these steps:
'properties':
'mode': 1
* Connect "br-prv" and "br-storage" bridges to "br-bond0" by OVS patches.
* Connect "br-prv" and "br-storage" bridges to "br-bondnew" by OVS patches.
* Leave all of the other things unchanged.
::
'network_scheme':
'provider': 'ovs'
'version': '1.0'
'interfaces':
'eth0': {}
'eth1': {}
'eth2': {}
'eth3': {}
'endpoints':
'br-ex':
'IP': ['172.16.0.2/24']
'gateway': '172.16.0.1'
'br-mgmt':
'IP': ['192.168.0.2/24']
'br-prv': {'IP': 'none'}
'br-storage':
'IP': ['192.168.1.2/24']
'eth0':
'IP': ['10.20.0.4/24']
'roles':
'ex': 'br-ex'
'fw-admin': 'eth0'
'management': 'br-mgmt'
'private': 'br-prv'
'storage': 'br-storage'
'transformations':
- 'action': 'add-br'
'name': 'br-ex'
- 'action': 'add-br'
'name': 'br-mgmt'
- 'action': 'add-br'
'name': 'br-storage'
- 'action': 'add-br'
'name': 'br-prv'
- 'action': 'add-br'
'name': 'br-bond0'
- 'action': 'add-br'
'name': 'br-eth1'
- 'action': 'add-bond'
'bridge': 'br-bond0'
'interfaces': ['eth2', 'eth3']
'provider': 'lnx'
'properties':
'mode': '1'
'name': 'bond0'
- 'action': 'add-port'
'bridge': 'br-eth1'
'name': 'eth1'
- 'action': 'add-patch'
'bridges': ['br-bond0', 'br-storage']
'tags': [103, 0]
- 'action': 'add-patch'
'bridges': ['br-eth1', 'br-ex']
'tags': [101, 0]
- 'action': 'add-patch'
'bridges': ['br-eth1', 'br-mgmt']
'tags': [102, 0]
- 'action': 'add-patch'
'bridges': ['br-bond0', 'br-prv']
See the example `Linux network scheme <examples/bonding_lnx_network_scheme.yaml>`_.

View File

@ -34,39 +34,5 @@ the following keys:
internally-used roles in Puppet manifests ('management', 'storage', and so on).
* **transformations** - An ordered list of OVS network primitives.
Here is an example of a "network_scheme" section in a node's configuration, showing how
to change MTU parameters:
::
network_scheme:
endpoints:
br-ex:
IP:
- 172.16.0.7/24
gateway: 172.16.0.1
br-fw-admin:
IP:
- 10.20.0.7/24
br-mgmt:
IP:
- 192.168.0.7/24
br-prv:
IP: none
br-storage:
IP:
- 192.168.1.6/24
interfaces:
eth0:
mtu: 1234
L2:
vlan_splinters: 'off'
eth1:
mtu: 4321
L2:
vlan_splinters: 'off'
eth2:
L2:
vlan_splinters: 'off'
See the example of a ``network_scheme`` section in a node's configuration, showing how
to change MTU parameters: `MTU parameters <examples/mtu_network_scheme.yaml>`_.

View File

@ -16,7 +16,8 @@ Here are the the available options:
{
"action": "add-br", # type of primitive
"name": "xxx" # unique name of the new bridge
"name": "xxx", # unique name of the new bridge
"provider": "ovs" # type of provider `linux` or `ovs`
},
{
"action": "add-port", # type of primitive