Update README.md
Update explanation to use ./onos.sh.
Change-Id: I843b8ed92f5948d7f3725e65dfc990e5661516f7
diff --git a/README.md b/README.md
index 8062116..e57a000 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
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.
+and demonstrated at ONS'13, '14.
License
=======
@@ -11,77 +11,118 @@
Steps to download and setup a development Virtual Machine
-==========================================
+---------------------------------------------------------
-http://wiki.onlab.us/display/Eng/ONOS+Development+VM
+https://wiki.onlab.us:8443/display/onosdocs/Getting+Started+with+ONOS
Building ONOS
-------------
1. Cleanly build ONOS
+ $ cd ${ONOS_HOME}/
$ mvn clean
$ mvn compile
- NOTE: installing maven for the first time may switch java version
- from 1.7 to 1.6. This might prevent Cassandra to run.
-
External Dependencies
---------------------
-1. Zookeeper
+1. Required packages
+
+ $ sudo apt-get install maven python-flask
+
+2. 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`.
-2. RAMCloud
+3. RAMCloud
- Run setup-ramcloud.sh to install RAMCloud git repository
+ 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
Configuration
-------------
-To configure the processes (ONOS, RAMCLoud and Zookeper) refers to the files in (ONOS-INSTALL-DIR)/conf.
-A detailed explanation is given in the ONOS WiKi:
- - "ONOS Documentation/Getting Started with ONOS/Running the RAMCloud branch of ONOS"
-
+`./onos.sh setup` script is used to generate ONOS related configuration files.
+This script read configuration from "${ONOS_CONF_DIR}/onos_node.\`hostname\`.conf".
-Running ONOS with RAMCloud as a separate process
--------------------------------------------------
+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
+
+
+Running ONOS and required components
+------------------------------------
+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.
+
+Running ONOS and required components one by one
+-----------------------------------------------
+You can manually start/stop individual ONOS components as follows:
1. Start Zookeeper
- $ cd (ONOS-INSTALL-DIR)/
- $ ./start-zk.sh start
+ $ cd ${ONOS_HOME}/
+ $ ./onos.sh zk start
## Confirm Zookeeper is running:
- $ ./start.zk.sh status
+ $ ./onos.sh zk status
-2. Start RAMCloud Coordinator (only one for cluster)
+2. Start RAMCloud Coordinator (only on one of the node in cluster)
- $ cd (ONOS-INSTALL-DIR)/
- $ ./start-ramcloud-coordinator.sh start
+ $ cd ${ONOS_HOME}/
+ $ ./onos.sh rc-coord start
## Confirm RAMCloud Coordinator is running:
- $ ./start-ramcloud-coordinator.sh status
-
+ $ ./onos.sh rc-coord status
+
3. Start RAMCloud Server
- $ cd (ONOS-INSTALL-DIR)/
- $ ./start-ramcloud-server.sh start
+ $ cd ${ONOS_HOME}/
+ $ ./onos.sh rc-server start
## Confirm RAMCloud Server is running:
- $ ./start-ramcloud-server.sh status
+ $ ./onos.sh rc-server status
4. Start ONOS
- $ cd (ONOS-INSTALL-DIR)/
- $ ./start-onos.sh start
+ $ cd ${ONOS_HOME}/
+ $ ./onos.sh core start
## Confirm ONOS is running:
- $ ./start-onos.sh status
+ $ ./onos.sh core status
5. Start ONOS REST API server
- $ cd (ONOS-INSTALL-DIR)/
+ $ cd ${ONOS_HOME}/
$ ./start-rest.sh start
## Confirm the REST API server is running:
@@ -100,16 +141,3 @@
downloaded to your local environment.
$ ./prep-for-offline.sh
-
-
-Running in offline mode (Optional)
-----------------------------------
-
-Maven is used to build and run ONOS. By default, maven tries to reach
-the repositories. The '-o' option can be given to the 'mvn' command to
-suppress this behavior. The `MVN` environmental variable can be used to
-set additional options to the 'mvn' command used in ONOS.
-
-* Example: Running in offline mode
-
- $ env MVN="mvn -o" ./start-onos.sh start