I want to use ODL framework for SDN development, in that internally OSGI framework is used to (karaf). Apart from that i want to use spring boot and spring cloud to achieve cloud services also. It is possible to use these all framework as a single unit. and how we can achieve this please tell.
2 Answers
This questions is somewhat overly broad and generic, but I'll try to answer it anyway making two assumptions:
If you want to use Spring Boot / Cloud "in-process", that is within ODL/ Karaf, then the answer to that would be that such an architecture would make little sense. Karaf (not ODL) has some Spring support as far as I know, but you'll probably have a hard time to marry that "nicely" with ODL...
The architecture of ODL is that you define YANG models and the RPCs you define in them "automagically" get exposed as HTTP REST APIs (via something called RESTCONF), and you can then consume those from other applications.
But if by your question you just mean if you can write a separate new Spring Boot / Cloud application and from that invoke OpenDaylight services via remote RESTCONF, then the answer is that this is certainly possible - and the recommended way to write integrations.
BTW: In this context, you may also be interested in https://lighty.io.
PS: You could have a look at https://github.com/vorburger/opendaylight-simple/ for some inspiration as well; but that is a POC which is not ready for consumption by you.

- 2,786
- 22
- 32

- 3,439
- 32
- 38
It's possible to use Spring Boot
in OSGI
container.
Please, see my answer on similar question: Can Spring Boot be used with OSGi ? If not, any plans to have an OSGi Spring Boot?
Here's a link to Spring Boot
+ Apache Karaf
demo app: https://github.com/StasKolodyuk/osgi-spring-boot-demo

- 4,256
- 2
- 32
- 41
-
1Yes. You can run spring boot app as a single bundle in OSGi ... but what do you achieve with this? It will not make spring boot a good OSGi citizen - it will just run in the same process. – Christian Schneider Nov 29 '18 at 10:40
-
@ChristianSchneider agree, in my demo example I've embedded the Spring Boot jars in the bundle itself that contradicts OSGI philosophy. However, though I haven't tried that in practice, I think it's possible to deploy Spring Boot jars as separate bundles, you'll need to convert them with bnd tool somehow – StasKolodyuk Nov 29 '18 at 12:50
-
I dont think this works. Spring and spring boot are not prepared for having per bundle classloaders. So this is very likely to fail. – Christian Schneider Nov 29 '18 at 13:54