本机安装教程(ubuntu)
https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start
安装bazel: https://docs.bazel.build/versions/master/install-ubuntu.html
其他依赖:
git zip curl unzip python # 2.7 required by some development scripts python3 # Required by Bazel bzip2 # Needed by legacy GUI build
安装onos
git clone https://gerrit.onosproject.org/onos cd onos bazel build onos
onos编译安装报错解决办法
https://blog.csdn.net/daihanglai7622/article/details/88642998?tdsourcetag=s_pctim_aiomsg
运行onos
bazel run onos-local -- clean debug # 'clean' to delete all previous running status # 'debug' to enable remote debugging
进入onos cli:
tools/test/bin/onos localhost
通过 ONOS CLI 激活应用程序 openflow和响应转发:
onos> app activate org.onosproject.openflow onos> app activate org.onosproject.fwd
打开onos web界面:
tools /test/bin/onos-gui localhost
或者访问 http://localhost:8181/onos/ui
onos/rocks
运行mininet,连接onos
sudo mn --controller remote,ip=<ONOS IP address> --topo torus,3,3
ONOS IP address替换成运行onos机器的ip地址,如果是在本机运行,则填
127.0.0.1
执行onos单元测试
bazel query 'tests(//...)' | xargs bazel test # or use 'ot' alias
设置bash环境变量
编辑
~/.bash_profile
,添加下面两行export ONOS_ROOT=~/onos source $ONOS_ROOT/tools/dev/bash_profile
执行
. ~/.bash_profile
虚拟机镜像安装教程
https://wiki.onosproject.org/display/ONOS15/Distributed+ONOS+Tutorial