Giter Club home page Giter Club logo

onos-for-osx's Introduction

onos-for-osx

Setup instructions for developing / running ONOS on OSX

Prereqs

Java 8, Maven, Git, Bash and Karaf

   $ mkdir ~/Applications
   $ export KARAF_VERSION=3.0.3; wget http://download.nextag.com/apache/karaf/$KARAF_VERSION/apache-karaf-$KARAF_VERSION.tar.gz -O ~/Downloads/apache-karaf-$KARAF_VERSION.tar.gz; tar -zxvf ~/Downloads/apache-karaf-$KARAF_VERSION.tar.gz -C ~/Applications/
   $ export MAVEN_VERSION=3.3.1; wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -O ~/Downloads/apache-maven-$MAVEN_VERSION-bin.tar.gz; tar -zxvf ~/Downloads/apache-maven-$MAVEN_VERSION-bin.tar.gz -C ~/Applications/

Make sure you have the latest version of Java 8 installed, this can be verfied by running

   $ /usr/libexec/java_home

Dev env setup

The latest code can be checked out from git

   $ cd; git clone https://gerrit.onosproject.org/onos

Ensure the following is setup in your bash profile

   $ export ONOS_ROOT=~/onos; source $ONOS_ROOT/tools/dev/bash_profile

Note the following errors are written to the console, but the env setup seems to work regardless.

   cell:unset:7: not enough arguments
   /Users/damianoneill/onos/tools/test/bin/ogroup-opts:12: command not found: complete
   /Users/damianoneill/onos/tools/test/bin/ogroup-opts:23: command not found: complete
   /Users/damianoneill/onos/tools/test/bin/ogroup-opts:34: command not found: complete
   /Users/damianoneill/onos/tools/test/bin/ogroup-opts:45: command not found: complete

At this point a set of aliases are defind, they can be viewed with

  $ alias 

And a quick build can be kicked off with the following

  $ cd ~/onos; mcis 

At this point a release can be built by running an onos script

  $ op 

This will write the release to the tmp directory for e.g.

  โžœ  onos git:(master) op
  -rw-r--r--  1 damianoneill  wheel    81M 18 Jun 09:43 /tmp/onos-1.3.0.damianoneill.tar.gz
  -rw-r--r--  1 damianoneill  wheel    81M 18 Jun 09:43 /tmp/onos-1.3.0.damianoneill.zip

Running ONOS on dev machine

We'll use the onos-karaf and corresponding ok alias to run locally

   $ export ONOS_IP=172.27.2.182; export ONOS_APPS=drivers,openflow,proxyarp,mobility,fwd; ok clean

Loading a NETCONF (BTI 7800) Device into ONOS

Currently the learning of a new NETCONF Device by the platform is done via a configuration file.

   cat ~/Applications/apache-karaf-3.0.3/etc/org.onosproject.provider.netconf.device.impl.NetconfDeviceProvider.cfg
   #
   # Instance-specific configurations, in this case, the number of
   # devices per node.
   #
   devConfigs = admin:[email protected]:2022:active,cisco:[email protected]:2022:inactive,sdn:[email protected]:22:inactive
    
   #
   # Number of ports per device. This is global to all devices
   # on all instances.
   #
   # numPorts = 8

I've added an entry for 172.27.7.125, once the configuration is completed we need to start ONOS and load the netconf feature bundle.

   onos> feature:install onos-netconf
   onos> list
   START LEVEL 100 , List Threshold: 50
   ID | State  | Lvl | Version          | Name
   ------------------------------------------------------------------------------
   40 | Active |  80 | 2.6              | Commons Lang
   41 | Active |  80 | 3.3.2            | Apache Commons Lang
   42 | Active |  80 | 1.10.0           | Apache Commons Configuration
   43 | Active |  80 | 18.0.0           | Guava: Google Core Libraries for Java
   ...
   174 | Active |  80 | 1.3.0.SNAPSHOT   | onos-netconf-provider-device

As you can see from the list command the last feature loaded was the netconf provider

You can confirm that the Device loaded correctly from the NETCONF configuration file with the following command

   onos> onos:devices
   id=netconf:[email protected]:2022, available=true, role=MASTER, type=OTHER, mfr=, hw=, sw=, serial=

Or by tailing the log.

See below for a screen shot of the 7800 Network Element in ONOS GUI.

Alt text

onos-for-osx's People

Contributors

alrighttheresham avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.