EPA and SDN assist: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
Line 105: Line 105:


=Adding a port mapping=
=Adding a port mapping=
TBC
A sample of sdn port mapping can be found in sdn/sdn_port_mapping.yaml
root@RO:~# tail -n 24 RO/sdn/sdn_port_mapping.yaml
---
#The mapping is composed of a list of compute nodes. Each compute nodes has two elements:
#"compute_node": name to identify the compute node within the datacenter
#"ports": list of ports mapped to a switch for that compute node.
#The information to identify the SDN controller and the dataplane switch is obtained from the datacenter information
- compute_node:    "compute node 1"
  ports:
    #Each mapped port contains the following information:
    #"pci": pci address of the port in the compute node. This is a mandatory parameter
    #"switch_mac": MAC address of the corresponding port in the dataplane switch.
    #"switch_port": Openflow name of the port in the dataplane switch.
    #"switch_mac" or "switch_port" must be specified. Both of them could be specified
    - pci:        "0000:81:00.0"
      switch_port: "port-2/1"
    - pci:        "0000:81:00.1"
      switch_mac:  "52:54:00:94:21:22"
- compute_node:    "compute node 2"
  ports:
    - pci:        "0000:81:00.0"
      switch_port: "port-2/3"
      switch_mac:  "52:54:00:94:22:21"
    - pci:        "0000:81:00.1"
 
In order to populate the port-mapping:
root@RO:~# openmano datacenter-sdn-port-mapping-set testRO/sdn/sdn_port_mapping.yaml
sdn_port_mapping:
- {compute_node: compute node 1, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.0',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: null, switch_port: port-2/1, uuid: 977b50f8-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 1, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.1',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:21:22', switch_port: null, uuid: 977b50f9-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 2, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.0',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:22:21', switch_port: port-2/3, uuid: 977b50fa-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 2, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.1',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:22:22', switch_port: port-2/4, uuid: 977b50fb-51b9-11e7-8f07-00163e1229e4}
 
To overwrite the port mapping the same instruction can be used.
 
To clear the port mapping:
root@RO:~# openmano datacenter-sdn-port-mapping-clear test
Clean SDN port mapping for datacenter dfcd6ca2-4768-11e7-8f07-00163e1229e4 (y/N)? y
{result: 4 deleted from of_port_mapping}


=Managing dataplane networks with external conectivity=
=Managing dataplane networks with external conectivity=

Revision as of 11:09, 15 June 2017


(THIS IS A DRAFT)

Introduction

OSM can manage the dataplane underlay conectivity with openflow through an external SDN network controller.

By default, when a VIM is added to OSM, it is assumed that the VIM will be in charge of this type of networks. However, when this is not the case, you can instruct OSM to take control of the underlay dataplane connectivity on behalf of the VIM, with the SDN assist capability.

OSM-RO uses a library offered by openvim for this task. Currently there are plugins for FlodLight, ONOS and OpenDayLight OpenVIM installation (Release TWO)#Openflow_controller

The required external components are:

  • An external SDN controller
  • A dataplane swith openflow able, that will connect the physical interfaces of the VIM compute nodes.
  • The mapping between the switch ports (identified by name) and the compute node interfaces (identified by host-id and PCI address)
  • Some VIMs as openstack requires admin credentials in order to be able to get the physical place of the SRIOV/passthrough VM interfaces

Adding a SDN controller to OSM

This is done through the RO CLI.

Enter in the RO container (lxc exec RO bash) and type

export OPENMANO_TENANT=osm   # Indicate the RO tenant to use
root@RO:~# openmano sdn-controller-create mySDN --ip=192.168.15.2 --port=8080 --dpid=56:55:12:12:12:12:12:12 --user sdnuser --passwd sdnpasswd --type 
onos
98113d4a-51b7-11e7-8f07-00163e1229e4   mySDN                ACTIV
root@RO:~# openmano sdn-controller-list
{
   "sdn_controllers": [
       {
           "status": "ACTIVE", 
           "password": "sdnpasswd", 
           "uuid": "98113d4a-51b7-11e7-8f07-00163e1229e4", 
           "last_error": null, 
           "dpid": "56:55:12:12:12:12:12:12", 
           "version": null, 
           "user": "sdnuser", 
           "ip": "192.168.15.2", 
           "nets_with_same_vlan": "false", 
           "type": "onos", 
           "port": 8080, 
           "name": "mySDN"
       }
   ]
}

You can manage SDN controllers with sdn-controller-create/list/edit/delete Note that at SDN creation it is not checked the connectivity and credentials

Asociate a SDN with the VIM

If we check the information of the datacenter we can see no informatio about the sdn in the config section:

root@RO:~# openmano datacenter-list test -vvv
datacenter:
   config: null
   created_at: '2017-06-02T07:55:41'
   description: test
   name: test
   type: openstack
   uuid: dfcd6ca2-4768-11e7-8f07-00163e1229e4
   vim_tenants:
   -   config:
           dataplane_physical_net: physnet_sriov
           use_floating_ip: true
       passwd: '******'
       user: osm
       vim_tenant_id: null
       vim_tenant_name: osm
   vim_url: http://10.0.0.12:5000/v2.0
   vim_url_admin: null

In order to add the sdn controller to the datacenter:

root@RO:~# openmano datacenter-edit test --sdn-controller mySDN
 Edit datacenter test (y/N)? y
dfcd6ca2-4768-11e7-8f07-00163e1229e4   test                2017-06-02T07:55:41 

And now we can see this information in the datacenter:

root@RO:~# openmano datacenter-list test -vvv
datacenter:
   config:
       sdn-controller: 98113d4a-51b7-11e7-8f07-00163e1229e4
   config: null
   created_at: '2017-06-02T07:55:41'
   description: test
   name: test
   type: openstack
   uuid: dfcd6ca2-4768-11e7-8f07-00163e1229e4
   vim_tenants:
   -   config:
           dataplane_physical_net: physnet_sriov
           use_floating_ip: true
       passwd: '******'
       user: osm
       vim_tenant_id: null
       vim_tenant_name: osm
   vim_url: http://10.0.0.12:5000/v2.0
   vim_url_admin: null

In order to remove the sdn controller:

root@RO:~# openmano datacenter-edit test --sdn-controller null
 Edit datacenter test (y/N)? y
dfcd6ca2-4768-11e7-8f07-00163e1229e4   test                2017-06-02T07:55:41

Adding a port mapping

A sample of sdn port mapping can be found in sdn/sdn_port_mapping.yaml

root@RO:~# tail -n 24 RO/sdn/sdn_port_mapping.yaml
---
#The mapping is composed of a list of compute nodes. Each compute nodes has two elements:
#"compute_node": name to identify the compute node within the datacenter
#"ports": list of ports mapped to a switch for that compute node.
#The information to identify the SDN controller and the dataplane switch is obtained from the datacenter information
- compute_node:    "compute node 1"
  ports:
    #Each mapped port contains the following information:
    #"pci": pci address of the port in the compute node. This is a mandatory parameter
    #"switch_mac": MAC address of the corresponding port in the dataplane switch.
    #"switch_port": Openflow name of the port in the dataplane switch.
    #"switch_mac" or "switch_port" must be specified. Both of them could be specified
    - pci:         "0000:81:00.0"
      switch_port: "port-2/1"
    - pci:         "0000:81:00.1"
      switch_mac:  "52:54:00:94:21:22"
- compute_node:    "compute node 2"
  ports:
    - pci:         "0000:81:00.0"
      switch_port: "port-2/3"
      switch_mac:  "52:54:00:94:22:21"
    - pci:         "0000:81:00.1"

In order to populate the port-mapping:

root@RO:~# openmano datacenter-sdn-port-mapping-set testRO/sdn/sdn_port_mapping.yaml
sdn_port_mapping:
- {compute_node: compute node 1, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.0',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: null, switch_port: port-2/1, uuid: 977b50f8-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 1, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.1',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:21:22', switch_port: null, uuid: 977b50f9-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 2, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.0',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:22:21', switch_port: port-2/3, uuid: 977b50fa-51b9-11e7-8f07-00163e1229e4}
- {compute_node: compute node 2, ofc_id: 963b5616-4769-11e7-8f07-00163e1229e4, pci: '0000:81:00.1',
  region: dfcd6ca2-4768-11e7-8f07-00163e1229e4, switch_dpid: '00:01:64:00:6a:e6:b3:14',
  switch_mac: '52:54:00:94:22:22', switch_port: port-2/4, uuid: 977b50fb-51b9-11e7-8f07-00163e1229e4}

To overwrite the port mapping the same instruction can be used.

To clear the port mapping:

root@RO:~# openmano datacenter-sdn-port-mapping-clear test
Clean SDN port mapping for datacenter dfcd6ca2-4768-11e7-8f07-00163e1229e4 (y/N)? y
{result: 4 deleted from of_port_mapping}

Managing dataplane networks with external conectivity

TBC

Additional information

TBC Create a new SDN plugin