Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Preparing ONOS Devel. Environment

1b0af2793f33bc86768fe97a9443c176?s=47 stwn
November 07, 2020

Preparing ONOS Devel. Environment

A lightning talk on SDN, ONOS and how to set the development environment up at OICNDI 2020

1b0af2793f33bc86768fe97a9443c176?s=128

stwn

November 07, 2020
Tweet

Transcript

  1. Preparing ONOS Devel. Environment Iwan Setiawan <stwn at unsoed.ac.id>

  2. ONOS development environment A lightning talk: Many slides crammed in

    15 mins some parts would be skipped
  3. Starting point for developing ONOS (apps, core, drivers, models, protocols,

    providers, or else) playing more with
  4. Outline • Software-defined networking (SDN) • Open Network Operating System

    (ONOS) • ONOS development environment setup Disclaimer: I’m not an ONOS Ambassador
  5. Banyumas Taipei EE Unsoed

  6. Iwan stwn • CSIE student at NTUST – Cloud Computing

    and Networking Lab – Graduate student member: ACM SIGCOMM, IEEE Communications Society, IEEE Computer Society • Learning computing and networking – SDN: Topology discovery schemes, network hypervisors – Cloud-edge computing: Architecture, offloading, federation Computer Science and Information Engineering
  7. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Networking Data Plane Application ISA ABI/API Computing Hardware Operating System ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface ISA
  8. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Data Plane Operating System Application ISA ABI/API Computing Hardware Networking ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface
  9. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API Data Plane Operating System Application ISA ABI/API Computing Hardware SDN ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound
  10. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound
  11. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound
  12. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up forwarding control and device config. • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound
  13. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound
  14. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, distributed, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound
  15. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound
  16. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound
  17. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow, proliferation of white box switches – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound Global and local controllers
  18. SDN • Abstraction for networking – Architecture: control plane and

    data plane – Network management • Controller acts as “an outsider” – OpenFlow (w)as the de facto standard – Opens up control plane for programmability • Current: Different needs, different architectures – Kinds of control plane: centralized, centralized-clustered, hybrid – Limitations of OpenFlow, proliferation of white box switches – Needs to accommodate protocols/mechanisms/approaches/etc. Control Plane Application Plane SB API NB API SDN Data Plane Operating System Application ISA ABI/API Computing Hardware ISA = Instruction set architecture ABI = Application binary interface API = Application programming interface Southbound Northbound Global and local controllers The other side: programmable data plane
  19. Kreutz et al., 2015

  20. Kreutz et al., 2015

  21. Kreutz et al., 2015

  22. https://opennetworking.org/onos/

  23. ONOS • An SDN controller, particularly for service provider networks

    – Platform with extensible and modular applications +distributed – Considered as “carrier-grade” with many uses in major providers • Based on Java – LTS release: 2.2 with JDK 11 and Karaf 4 – Southbound: OpenFlow/P4Runtime/gN*, Northbound: REST/gRPC – Future version: µONOS based on with cloud-native in mind • NG-SDN: “µONOS, Stratum, P4” * https://github.com/opennetworkinglab/ngsdn-tutorial open at least in trial or r&d phase
  24. ONOS Architecture ONF, 2020

  25. https://opennetworking.org/cord/

  26. https://opennetworking.org/xos/

  27. ONOS Devel. Environment • Build system: Bazel via Bazelisk •

    Codebase: ONOS 2.2 (LTS)* • Tools – IDE: IntelliJ IDEA 2019.3 (Community Edition) – Emulator: Mininet with Open vSwitch 2.5+ * Current version: 2.2.6
  28. Bazel: A build system • A tool for building and

    testing software • ONOS 1.14+ use Bazel. Prev: Maven, Buck • Bazelisk, “a user-friendly launcher for Bazel” – A wrapper for Bazel – Picks a good version of Bazel for your system * https://github.com/bazelbuild/bazelisk
  29. Bazel: Installing wget -c https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64 chmod +x bazelisk-linux-amd64 sudo mv

    bazelisk-linux-amd64 /usr/local/bin/bazel bazel version
  30. https://youtu.be/-0YC3c52qsM

  31. Cloning ONOS Repository • Clone ONOS 2.2 branch codebase >

    git clone -b onos-2.2 https://github.com/opennetworkinglab/onos • Export ONOS development environment > vim ~/.bashrc export ONOS_ROOT=~/path/to/onos_source source ${ONOS_ROOT}/tools/dev/bash_profile > source ~/.bashrc • Change directory to $ONOS_ROOT > cd $ONOS_ROOT git checkout 2.2.6
  32. https://youtu.be/xAfTJ7mhgHk

  33. Building and Running ONOS • Build ONOS with Bazel >

    bazel build onos • Run ONOS locally > bazel run onos-local -- clean debug Wait for ~3 min* Wait for ~8 min* * Processor i7, RAM 16GB ONOS_APPS variable: ONOS_APPS=${ONOS_APPS:-drivers,openflow,gui2,fwd} Notes: - GNU/Linux or Mac OS x86_64 bit - ONOS Application aRchive (OAR) (first time run)
  34. https://youtu.be/p4IG-uOsWSM

  35. https://youtu.be/J4cJJ_tX6cI

  36. Testing ONOS with Mininet • Mininet, a network emulator •

    Available as distro package or VM image • Use VirtualBox managed with Vagrant > vagrant up mn > vagrant ssh mn mininet.org config.vm.define “mn” do |mn| mn.vm.box = “ubuntu/bionic64” mn.vm.network “private_network”, ip: “192.168.x.y”, virtualbox_intnet: true end sudo mn --controller remote,ip=[controller] --switch=ovsk,protocols=OpenFlow13 --topo tree,3,3
  37. https://youtu.be/4msCHMuV234

  38. https://youtu.be/--nzOj6IlMM

  39. Importing ONOS code to IDEA • Use IntelliJ IDEA 2019.3

    (Community Edition) • Instal Bazel plugin: Configure-Plugins. Restart IDEA • Generate ONOS Bazel Project file • Import Bazel Project, select Workspace, choose $ONOS_ROOT • Next, select “Copy external,” choose Bazel Project file Next, Finish, *wait for a while*, press “Sync Project with BUILD files” button $ONOS_ROOT/tools/dev/bin/onos-gen-bazel-project > ./onos.bazelproject
  40. None
  41. None
  42. None
  43. https://youtu.be/Uz0q0N47A0w

  44. https://youtu.be/Bs4K7eGN96I

  45. https://youtu.be/W-zM1NkJ-K4

  46. ONOS 2.2.6 Codebase ONOS 2.2.6 Built Mininet with OVS 2.5+

    IntelliJ IDEA 2019.3 CE Host OF 1.3 VM HT HT* ONOS Devel. Environment HP TD TD* HP* JDK11 Bazel An example for building hostprobing provider: > bazel build //providers/hostprobing:onos-providers-hostprobing-oar
  47. ONOS 2.2.6 Codebase ONOS 2.2.6 Built Mininet with OVS 2.5+

    IntelliJ IDEA 2019.3 CE Host OF 1.3 VM HT HT* ONOS Devel. Environment HP TD TD* HP* JDK11 Bazel An example for building hostprobing provider: > bazel build //providers/hostprobing:onos-providers-hostprobing-oar
  48. Terima kasih @stwn All logos included on the slides are

    trademarks of their respective owners
  49. Systems Approach Book Series • Computer Networks https://book.systemsapproach.org/ • Software-Defined

    Networks https://sdn.systemsapproach.org/ • 5G Mobile Networks https://5g.systemsapproach.org/ Translation into Indonesian?
  50. Reading List • Developer Quick Start, https://wiki.onosproject.org/- display/ONOS/Developer+Quick+Start • Getting

    started developing with ONOS, https://wiki.- onosproject.org/display/ONOS/Getting+started+devel oping+with+ONOS • Using an IDE with ONOS 1.14 or higher (Bazel build), https://wiki.onosproject.org/pages/viewpage.action? pageId=28836246