developing opendaylight apps with md sal
play

Developing OpenDaylight Apps with MD-SAL J. Medved, E. Warnicke, - PowerPoint PPT Presentation

Developing OpenDaylight Apps with MD-SAL J. Medved, E. Warnicke, A. Tkacik. R. Varga Cisco Sample App: M. Rehak, Cisco February 04, 2014 Controller Architecture Network Applica3ons Management D4A Protec3on


  1. Developing OpenDaylight Apps with MD-SAL J. Medved, E. Warnicke, A. Tkacik. R. Varga Cisco Sample App: M. Rehak, Cisco February 04, 2014

  2. Controller Architecture Network ¡Applica3ons ¡ Management ¡ ¡ D4A ¡Protec3on ¡ Orchestra3on ¡& ¡Services ¡ GUI/CLI ¡ OpenDaylight ¡APIs ¡(REST) ¡ ¡ Base ¡Network ¡Service ¡Func3ons Affinity ¡ LISP ¡ Service ¡ Service ¡ ¡ Host ¡ ARP ¡ Topology ¡ Stats ¡ Switch ¡ FRM ¡ Controller ¡Pla?orm ¡ Tracker Handler ¡ Mgr ¡ Mgr ¡ Mgr ¡ ¡ ¡ Service ¡Abstrac3on ¡Layer ¡(SAL) ¡ (plug-­‑in ¡mgr., ¡capability ¡abstrac3ons, ¡flow ¡programming, ¡inventory, ¡…) ¡ OpenFlow ¡ Southbound ¡Interfaces ¡ NETCONF ¡ OVSDB ¡ SNMP ¡ BGP ¡ PCEP ¡ LISP ¡ & ¡Protocol ¡Plugins ¡ 1.0 ¡ 1.3 ¡ Data ¡Plane ¡Elements ¡ Addi2onal ¡Virtual ¡& ¡Physical ¡ OpenFlow ¡Enabled ¡Devices ¡ Open ¡vSwitches ¡ (Virtual ¡Switches, ¡ Devices ¡ Physical ¡Device ¡Interfaces) ¡ Example: ¡Service ¡Provider ¡Edi2on ¡

  3. Hydrogen Implementation Management ¡ ¡ D4A ¡Protec3on ¡ GUI/CLI ¡ REST ¡ REST ¡ REST ¡ REST ¡ REST ¡ REST ¡ REST ¡ REST ¡ RESTCONF ¡ NETCONF ¡ Config ¡ Base ¡Network ¡Service ¡Func3ons ¡ Service ¡Func3ons ¡ Base ¡Network ¡Func3ons ¡ Subsystem ¡ LISP ¡ Affinity ¡ Service ¡ Service ¡ ¡ ¡ Topology ¡ Topology ¡ Topology ¡ Topology ¡ Topology ¡ Stats ¡ Switch ¡ Host ¡ ARP ¡ Stats ¡ Inventor Topology ¡ FRM ¡ NSF ¡Adapters ¡ FRM ¡ PCEP ¡ Exporter ¡ Exporter ¡ NSF ¡Adapters ¡ Exporter ¡ Exporter ¡ Mgr ¡ Mgr ¡ Mgr ¡ Tracker ¡ Handler ¡ NSF ¡Adapters ¡ Mgr ¡ y ¡ Exporter ¡ Manag er ¡ API-­‑Driven ¡SAL ¡(AD-­‑SAL) ¡ Model-­‑Driven ¡SAL ¡(MD-­‑SAL) ¡ OpenFlow ¡ OpenFlow ¡ OVSDB ¡ LISP ¡ SNMP ¡ BGP-­‑LS ¡ PCEP ¡ NETCONF ¡ 1.0 ¡ 1.0 ¡ 1.3 ¡ Addi2onal ¡Virtual ¡& ¡Physical ¡ OpenFlow ¡Enabled ¡Devices ¡ Open ¡vSwitches ¡ Devices ¡ Example: ¡Service ¡Provider ¡Edi2on ¡

  4. MD-SAL – Motivation & Requirements • Flexibility, ¡but ¡common ¡framework ¡and ¡programming ¡model ¡ • Support ¡API ¡governance ¡ • Func2onally ¡equivalent ¡APIs ¡for ¡different ¡language ¡bindings ¡ • Run-­‑2me ¡Extensibility: ¡ • Augment ¡exis2ng ¡func2onality ¡ • Load ¡new ¡models ¡(extends ¡controller’s ¡func2onality) ¡ • Avoid ¡module/sub-­‑system ¡hotspots ¡ • Performance ¡& ¡scale ¡

  5. From AD-SAL to MD-SAL SB ¡Plugin ¡Model ¡ NB ¡Service ¡Model ¡ “Is ¡generated ¡from” ¡ “Is ¡generated ¡from” ¡ Controller ¡PlaPorm ¡ Controller ¡PlaPorm ¡ RESTCONF ¡ REST ¡API ¡ REST ¡API ¡ ... ¡ Service ¡ Service ¡ Service ¡ Adapta3on ¡ Service ¡ Plugin ¡1 ¡ Plugin ¡1 ¡ Plugin ¡1 ¡ Plugin ¡ Plugin ¡1 ¡ Plugin ¡NB ¡Java ¡API ¡ Service ¡NB ¡Java ¡API ¡ Modeled ¡Service ¡NB ¡Java ¡API ¡ Request ¡ ¡ Rou2ng ¡ Adapta2on ¡ Request ¡Rou2ng ¡ SB ¡Model ¡ NB ¡Model ¡ Data ¡ Modeled ¡SB ¡Java ¡API ¡ Data ¡ Data ¡Store ¡ AD-­‑SAL ¡ MD-­‑SAL ¡ Plugin ¡SB ¡Java ¡API ¡ ... ¡ ... ¡ SB ¡Plugin ¡1 ¡ SB ¡Plugin ¡2 ¡ SB ¡Plugin ¡1 ¡ SB ¡Plugin ¡2 ¡ AD-­‑SAL ¡key ¡services: ¡ MD-­‑SAL ¡key ¡services: ¡ • Request ¡rou2ng ¡ • Request ¡(RPC) ¡and ¡no2fica2on ¡rou2ng ¡ • Service ¡Adapta2on ¡ • Data ¡Storage ¡

  6. MD-SAL – Key Tenets Summary • Modeling ¡language: ¡YANG ¡(rfc6020) ¡ • Used ¡also ¡as ¡IDL ¡ • A ¡couple ¡of ¡minor ¡extensions ¡ • Dynamic ¡late ¡binding ¡ • Run2me ¡& ¡Compile ¡2me ¡code ¡genera2on ¡

  7. Creating the View of the Network Controller ¡PlaPorm ¡ BGP-­‑LS ¡Topology ¡ OpenFlow ¡Topology ¡ Flow-­‑Capable ¡Node ¡ Sta3s3cs ¡Manager ¡ Exporter ¡ Exporter ¡ Inventory ¡Manager ¡ ... ¡ ¡ ¡ ¡ ¡ Model ¡ Model ¡ Model ¡ Model ¡ /Opera2onal ¡ /Config ¡ network-­‑topo ¡ nodes ¡ ... ¡ of:1 ¡ of:2 ¡ BGP-­‑LS ¡ OpenFlow ¡ BGPv6 ¡ Of:n ¡ nc:1 ¡ nc:2 ¡ BGPv4 ¡ Groups ¡ nodes ¡ links ¡ Tables ¡ prefixes ¡ Meters ¡ Ports ¡ p2 ¡ ... ¡ n1 ¡ l x ¡ p1 ¡ Table/1 ¡ n2 ¡ ... ¡ n x ¡ l1 ¡ l2 ¡ ... ¡ p x ¡ Table/n ¡ Table/2 ¡ Table-­‑stats ¡ ... ¡ Flow/1 ¡ Flow/n ¡ Flow/2 ¡ MD-­‑SAL ¡ Flow-­‑stats ¡ Flow-­‑stats ¡ BGP-­‑LS ¡ NETCONF ¡ Protocol ¡Plugin ¡

  8. MD-SAL: Software Architecture View Network ¡Applica3ons ¡ ... ¡ Orchestra3on ¡& ¡Services ¡ Network ¡Devices ¡ App ¡ App ¡ Data ¡Plane ¡Elements ¡ RESTCONF ¡ NETCONF ¡ Config ¡ ... ¡ Subsystem ¡ Service/App ¡ ... ¡ Service/App ¡ Protocol ¡Plugin ¡ Protocol ¡Plugin ¡ Controller ¡Pla?orm ¡ Plugin ¡ Plugin ¡ ¡ ¡ ¡ ¡ Model ¡ Model ¡ Model ¡ Model ¡ Southbound ¡Interfaces ¡ & ¡Protocol ¡Plugins ¡ Model-­‑Driven ¡SAL ¡(MD-­‑SAL) ¡ Message ¡Bus ¡ Data ¡Store ¡ Clustering ¡ Remote ¡Container ¡Instance ¡ Remote ¡Container ¡Instance ¡

  9. Building a Plugin/Application Model ¡ Model ¡ Yang ¡Model ¡ Generate ¡APIs ¡ 1 ¡ Yang ¡Tools ¡ Create ¡API ¡Bundle ¡ Deploy ¡ 2 ¡ Maven ¡ “API” ¡ ¡ 4 ¡ Java ¡API ¡Defini2on ¡ Build ¡Tools ¡ OSGI ¡Bundle ¡ Java ¡API ¡Defini2on ¡ Generated ¡API ¡ Defini2on ¡ Controller ¡ “Plugin” ¡ Maven ¡ OSGI ¡Bundle ¡ 4 ¡ Build ¡Tools ¡ 3 ¡ Deploy ¡ Create ¡Plugin ¡Bundle ¡ Module ¡ Module ¡ Implementa2ons ¡ Implementa2ons ¡ Plugin ¡source ¡code ¡

  10. The Learning Switch Application • Inspired ¡by ¡‘OpenDaylight ¡Applica2on ¡Developers’ ¡Tutorial: ¡ hdp://sdnhub.org/tutorials/opendaylight/ ¡ • ODL ¡Wiki: ¡TBD. ¡ • Func2onality: ¡ • Create ¡a ¡HashMap ¡called ¡mac_to_port ¡ • On ¡packet_in, ¡Pprse ¡packet ¡to ¡get ¡src ¡and ¡dst ¡MAC ¡address ¡ ¡ • Store ¡in ¡a ¡hashmap ¡mapping ¡between ¡src_mac ¡and ¡in_port ¡ ¡ • Lookup ¡dst_mac ¡in ¡mac_to_port ¡map ¡to ¡find ¡next ¡hop ¡ ¡ • If ¡next ¡hop ¡is ¡found, ¡create ¡flow_mod ¡and ¡send ¡ • Else, ¡flood ¡like ¡hub. ¡

  11. Under the Hood: How it Works Flow-­‑capable ¡Node ¡Model ¡ (Flow ¡programming) ¡ RESTCONF ¡ Controller ¡PlaPorm ¡ The ¡Learning ¡Switch ¡ FRM ¡ Applica3on ¡ 8 ¡ 10 ¡ 4 ¡ 9 ¡ /config ¡ No2fica2on ¡ Request ¡ ¡ Request ¡ ¡ N ¡ 3 ¡ 11 ¡ 5 ¡ Delivery ¡ Rou2ng ¡ Rou2ng ¡ MD-­‑SAL ¡ Flow ¡ NoBficaBon ¡ RPC ¡ RPC ¡ Openflow ¡Protocol ¡Model ¡ OpenFlow ¡1.0/1.3 ¡Plugin ¡ (Pkt ¡in,Pkt ¡out) ¡ 12 ¡ 6 ¡ 2 ¡ OpenFlow ¡Java ¡Library ¡ 13 ¡ 7 ¡ PktOut ¡ FlowMod ¡ PktIn ¡ 1 ¡ Switch ¡

  12. Building the Sample Application • Prerequisites: ¡ ¡ • Java ¡7, ¡Maven ¡3.0.5 ¡or ¡later, ¡Linux ¡or ¡Mac ¡ • Mininet ¡2.1 ¡with ¡OpenFlow ¡1.3 ¡virtual ¡switches ¡or ¡CPQD ¡(pointers) ¡ • OpenDaylight ¡Base ¡Edi2on ¡(download ¡& ¡installa2on ¡instruc2ons) ¡ • Download ¡the ¡applica2on ¡code ¡from ¡ODL ¡OpenFlow ¡Plugin ¡repo: ¡ > ¡git ¡clone ¡https://git.opendaylight.org/gerrit/p/openflowplugin.git ¡ • Build ¡the ¡applica2on: ¡ > ¡cd ¡ ¡openflowplugin/samples/learning-­‑switch/ ¡ > ¡mvn ¡clean ¡install ¡ • The ¡build ¡creates ¡the ¡‘learning-­‑switch-­‑0.0.3-­‑SNAPSHOT.jar’ ¡bundle ¡ ¡in ¡ ‘openflowplugin/samples/learning-­‑switch/target’ ¡ • Analyzing ¡code ¡in ¡Eclipse: ¡ • Prerequisites: ¡Install ¡maven ¡plugin ¡for ¡Eclipse ¡ • More ¡informa2on: ¡ • hdps://wiki.opendaylight.org/view/OpenDaylight_Controller:Hydrogen_Developer_Guide:MD-­‑ SAL_App_Tutorial ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend