集成hello到OpenDaylight发行版中
发行版的安装配置运行参见:
https://www.cnblogs.com/zjd1396/p/9952866.html
将hello工程拷贝到ODL发行版中:
root@odl_ubuntu:/home/distribution-karaf-0.6.4-Carbon/system/org/opendaylight# mkdir hello
root@odl_ubuntu:/home/distribution-karaf-0.6.4-Carbon/system/org/opendaylight# cp -r ~/.m2/repository/org/opendaylight/hello/* /home/distribution-karaf-0.6.4-Carbon/system/org/opendaylight/hello/
启动:
root@odl_ubuntu:/home/distribution-karaf-0.6.4-Carbon/bin# ./karaf
Apache Karaf starting up. Press Enter to open the shell now...
100% [========================================================================]
Karaf started in 104s. Bundle stats: 363 active, 363 total
________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user@root>feature:install odl-restconf odl-l2switch-switch-ui odl-openflowplugin-flow-services-ui odl-mdsal-apidocs odl-dluxapps-applications odl-faas-all
opendaylight-user@root>
查看文件:root@odl_ubuntu:/mnt/hello/hello/karaf/target/assembly/etc# vim org.apache.karaf.features.cfg
拷贝出这句:
mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features
然后回到ODL命令行,将hello仓库添加到feature list中:
opendaylight-user@root>feature:repo-add mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features
Adding feature url mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features
opendaylight-user@root>
查看hello是否安装、并安装:
opendaylight-user@root>feature:list -i | grep hello
opendaylight-user@root>feature:install odl-hello-ui
好了,访问http://10.0.0.9:8181/index.html并测试一下吧: