commit | 030fc44c9deb666ed4fe85ab3e1078d14c6e7895 | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Mon Apr 21 13:38:26 2014 -0700 |
committer | Gerrit Code Review <gerrit2@gerrit.onos.onlab.us> | Tue Apr 22 11:09:48 2014 -0700 |
tree | 5c20b2c89bea1fb57d466b9614819a3710665c24 | |
parent | 3c049c477b493b8a02d43a9fd105e1db16de0b66 [diff] |
Fix a bug and cleanup the Topology REST API: * Fix a bug in the base path: /wm/onos -> /wm/onos/topology If the base path is the top-level prefix /wm/onos, it hides all other ONOS REST APIs that are added by a different module if at runtime they are added after the NetworkGraphWebRoutable Restlet. * Removed old REST APIs: "/rc/switches/json" "/rc/links/json" "/rc/ports/json" Those are same as the existing: "/ds/switches/json" "/ds/links/json" "/ds/ports/json" * Removed the "/ng" prefix for accessing the topology-related info * Removed the old Topology API Now the remaining and updated Topology REST API is: // debug API to dump datastore content /wm/onos/topology/ds/switches/json /wm/onos/topology/ds/links/json /wm/onos/topology/ds/ports/json // Topology API /wm/onos/topology/switches/json /wm/onos/topology/links/json // TODO: This one will be moved to the Intent framework REST API /wm/onos/topology/shortest-path/{src-dpid}/{dst-dpid}/json Change-Id: I367007413d9abdf28e0ce4ea0b78b2704f196dc7
ONOS (Open Networking Operating System) is an experimental distributed SDN OS. Currently, it is under active development. ONOS was announced and demonstrated at ONS'13, '14.
Apache 2.0
https://wiki.onlab.us:8443/display/onosdocs/Getting+Started+with+ONOS
Cleanly build ONOS
$ cd ${ONOS_HOME}/ $ mvn clean $ mvn compile
Required packages
$ sudo apt-get install maven python-flask
ZooKeeper
Download and install apache-zookeeper-3.4.5: http://zookeeper.apache.org/releases.html
By default ONOS expect ZooKeeper to be installed in ~/zookeeper-3.4.5
.
This can be changed by specifing the path using ZK_HOME
environment variable.
Data directory ZooKeeper uses by default is /var/lib/zookeeper
. You will need to give current user permission to write to this directory.
This directory can be changed using specifying ZK_LIB_DIR
environment variable and running ./onos.sh setup
to generate ${ONOS_HOME}/conf/zoo.cfg
.
See Configuration for details about ./onos.sh setup
.
RAMCloud
Run setup-ramcloud.sh to download and install RAMCloud to ~/ramcloud
.
Installation path can be changed by specifing RAMCLOUD_HOME
environment variable.
$ cd ${ONOS_HOME}/ $ ./setup-ramcloud.sh
./onos.sh setup
script is used to generate ONOS related configuration files. This script read configuration from "${ONOS_CONF_DIR}/onos_node.`hostname`.conf".
Copy the file "${ONOS_HOME}/conf/onos_node.conf" to match the hostname and configure the content appropriately.
e.g., To use RAMCloud as data store change host.backend
to ramcloud
Once you're done with required configuration run following to generate configuration files.
$ cd ${ONOS_HOME}/ $ ./onos.sh setup
To start ZooKeeper, RAMCloud (if enabled in configuration) and ONOS core.
$ cd ${ONOS_HOME}/ $ ./onos.sh start single-node
To stop all the above
$ cd ${ONOS_HOME}/ $ ./onos.sh stop
If you need to use the REST APIs, follow the instruction for "Start ONOS REST API server" in next section.
You can manually start/stop individual ONOS components as follows:
Start Zookeeper
$ cd ${ONOS_HOME}/ $ ./onos.sh zk start ## Confirm Zookeeper is running: $ ./onos.sh zk status
Start RAMCloud Coordinator (only on one of the node in cluster)
$ cd ${ONOS_HOME}/ $ ./onos.sh rc-coord start ## Confirm RAMCloud Coordinator is running: $ ./onos.sh rc-coord status
Start RAMCloud Server
$ cd ${ONOS_HOME}/ $ ./onos.sh rc-server start ## Confirm RAMCloud Server is running: $ ./onos.sh rc-server status
Start ONOS
$ cd ${ONOS_HOME}/ $ ./onos.sh core start ## Confirm ONOS is running: $ ./onos.sh core status
Start ONOS REST API server
$ cd ${ONOS_HOME}/ $ ./start-rest.sh start ## Confirm the REST API server is running: $ ./start-rest.sh status
Maven need the Internet connection to download required dependencies and plugins, when they're used for the first time.
If you need to develop ONOS in an Internet unreachable environment you may want to run the following helper script before you go offline, so that required dependencies and plugins for frequently used maven target will be downloaded to your local environment.
$ ./prep-for-offline.sh