Hi everyone,
With the change of the builtin sample applications and OpenFlow providers to be deployed using the *.oar file mechanism, it is now required to run onos-setup-karaf tool as a form of ‘packaging’ ONOS for running locally. This will make sure that the latest application bits have been properly pre-installed into the local ONOS karaf instance. Note that if you re making changes to an application, you do not need to stop/start the entire Karaf, you can simply build the app and then use the onos-app reinstall! command to uninstall/install/activate it all in one go.
Full build & full remote ONOS deployment:
onos-build && onos-package && onos-install -f
Full build & full local ONOS karaf deployment:
onos-build && onos-setup-karaf <local-ip> && karaf clean
Application build & remote redeployment:
cd <app-base-dir> && mvn clean install && onos-app $OCI reinstall! <app-name> target/*.oar
Application build & local redeployment:
cd <app-base-dir> && mvn clean install && onos-app localhost reinstall! <app-name> target/*.oar
Note the level of symmetry between running remotely vs on local Karaf.
While this may seem inconvenient compared to just building and starting karaf, please remember that the *.oar file deployment results in simpler and more robust treatment of applications for the distributed cluster operation, which is the primary deployment use-case. Once we drop-kick Hazelcast, we will be able to drop the local-ip parameter from the onos-setup-karaf shell script and provide onos-karaf shell utility to setup and launch karaf in one step.
I hope that this helps bring some clarify on why this change was made and on how to work in the revised context.
Cheers…
Thomas