Re: [netvirt-dev] The correct approach to integrate NetVirt ownsub-module into ODL?

Sam Hague <shague@...>

On Tue, Aug 7, 2018 at 10:23 PM Irving <418624178@...> wrote:

According to your saying, there are few points I don't understand.

I choose to use ODL zip. So I need to achieve:

1. Execute "mvn clean install" in projects successfully.

2. As a result of 1, brunch zip files generated (e.g., openflowplugin-karaf-0.5.3.tar.gz and vpnservice-karaf-0.5.3.tar.gz).

3. "mvn clean install" is executed under different projects (which store in different folders). So when I build netvirt distribution, how to guarantee "netvirt will build a karaf distribution with all the project artefacts just built" ? 
Here is where knowing how maven works will help. When you build with maven it stores artifacts built locally in a ~/.m2 directory. Artifacts not built will be pulled from a remote m2 repository. When you do cd openflowplugin; mvn clean install - thsi will start the openflowplugin build, it will build some stuff and it will pull some stuff from the remote m2, but all of it will eventually end up in your ~/.m2/repository directory. Follow that path and you will see org/opendaylight/<project>/.... Everything will end up there.

So you just keep building the projects one by one in the right order or dependencies: controller, ovsdb, openflowplugin, genius, netvirt. I think that order is correct. netvirt has to be last since it depends on all the others. Each project build adds stuff to the local m2 repo. Then each next build uses what is there, so eventually you get to the netvirt build and it is using all the stuff already built. Then you use just the netvirt for your distribution since that will have everything you just built from all the projects. When you do the last netvirt build, use mvn -nsu clean install. The -nsu is "no snapshot update". That makes sure that netvirt build will only use what was built in your local m2 - and not pull down new artifacts from remote.

------------------ Original ------------------
From:  "Sam Hague";<shague@...>;
Send time: Wednesday, Aug 8, 2018 6:02 AM
To: "Irving"<418624178@...>;
Subject:  Re: [netvirt-dev] The correct approach to integrate NetVirt ownsub-module into ODL?

On Tue, Aug 7, 2018 at 11:51 AM Irving <418624178@...> wrote:

I build my own distribution of ODL as RPM package for deployment. The situation goes like:

1. Build my own sub-module for HWvTEP L3 support under netvirt.

2. Re-modified topology-manager under openflowplugin for DLUX displaying multi-layer topology (VM, OvS, ToR, and other layers).

3. There are other re-modified patches under Genius ITM and OVSDB. But their location are flexible, I haven't decide yet (could do it in some Genius util classes, or netvirt own sub-module).

So I try to build different RPMs for each project (controller, netvirt, Openflowplugin, ovsdb), than I am able to use RPMs for integration. However it looks like a dead-end.

Anyone has ideas about how to integrate multi re-modifications cross multi projects in ODL? Or should I try to integrate the codes as a all-in-one sub-module for deployment via RPM?
Do you need separate RPMs per module? Or can you just built a typical ODL zip and use that? If the latter, then you can just keep your branches per projects, along with patches and just build a distribution. That's all ODL is today. Build all your modules one by one with netvirt last. netvirt will build a karaf distribution with all the project artifacts just built.

netvirt-dev mailing list

Join to automatically receive all group messages.