OSGi and karaf in the cloud. Looking for some experiences and stories

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OSGi and karaf in the cloud. Looking for some experiences and stories

cschneider
I am currently looking into optimized ways to run OSGi applications in the cloud. 
I would like to describe how cloud native OSGi could look like.

Apart from my own experiments I would like to hear from other karaf users. Do you run OSGi and especially karaf applications in the cloud?

How do you build your application? How do you do releases and deployments? What do you do different compared to a non cloud setup.

Regards
Christian

--
--
Christian Schneider

http://www.liquid-reality.de

Computer Scientist

Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

jbonofre
Hi,

We are working on a platform "ground to cloud" named SoYouZ
(http://openobject.fr/soyouz/). NB: website is a preview. It's fully
powered by Apache Karaf and jclouds, supporting different cloud providers.

Basically, customers have two options:

1. we create small karaf "up runner" using static profile with customer
applications that we provision
2. we create a full karaf custom distribution that we provision

The first approach is more the "docker/immutable approach" and mostly
used for cloud only, the second approach is the "karaf classy approach"
and used both for on prem or cloud deployment.

The "assembly" is done directly on SoYouZ using a "market place".

Regards
JB

On 18/08/2018 23:00, Christian Schneider wrote:

> I am currently looking into optimized ways to run OSGi applications in
> the cloud. 
> I would like to describe how cloud native OSGi could look like.
>
> Apart from my own experiments I would like to hear from other karaf
> users. Do you run OSGi and especially karaf applications in the cloud?
>
> How do you build your application? How do you do releases and
> deployments? What do you do different compared to a non cloud setup.
>
> Regards
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

lechlukasz
In reply to this post by cschneider
I'm running Karaf in docker image in OpenShift. No cloud yet but
cloud-compliant.

I've got to trick like hell in order to build docker image. I've created a
bundle that installs features using FeatureService (based on config file)
and then stops bundle 0, so that all bundles are installed during docker
build. It's not an elegant solution, but working one.

At the beginning I was trying to run client.sh with necessary commands, but
I've not managed to get it into work.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

luke
In reply to this post by cschneider
We do run Karaf inside docker (using static assemblies).

The best thing I see in it is possibility to SSH into karaf and see
what's going on. This is especially useful when logs are not dumped to
stdout nor file but sent via network somewhere else. Log tail then shows
all events before they are serialized.

A nice side effect of SSH console is possibility to execute commands via
exec. ;-)) By this way you can browse basic file system contents and
verify files delivered via container/cloud orchestration tools.

Having said that we run static assemblies, I would like to note that we
do not rely on "dynamic" updates of configurations just yet. We
experiment with kube as new way to run things but we didn't reach yet
place where we deliver configurations from etcd. This is place which
will get really interesting. Most likely it will require us to go back
to traditional, non static, assembly in order to pick up updates pushed
via kube api.

We do have separate pipeline (with simple makefiles) for building docker
images which is detached from main build where we produce custom distro.
Its used to add cloud specific configurations.
In two projects where we didn't use a common configurations we had extra
profile in maven build for that.
Developer can run static assembly locally with minor inconvenience
caused by static configs. For local builds we also used docker-compose
which allowed to setup all required dependencies (such database).

Cheers,
Lukasz



On 8/18/18 11:00 PM, Christian Schneider wrote:

> I am currently looking into optimized ways to run OSGi applications in
> the cloud. 
> I would like to describe how cloud native OSGi could look like.
>
> Apart from my own experiments I would like to hear from other karaf
> users. Do you run OSGi and especially karaf applications in the cloud?
>
> How do you build your application? How do you do releases and
> deployments? What do you do different compared to a non cloud setup.
>
> Regards
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

jbonofre
Hi,

thanks for sharing your use case.

By the way, we added Karaf Docker feature in Karaf 4.2.1 and we are
using Decanter on Docker Karaf "farm" to retrieve metric and log.

That's very convenient.

Regards
JB

On 12/09/2018 11:05, Łukasz Dywicki wrote:

> We do run Karaf inside docker (using static assemblies).
>
> The best thing I see in it is possibility to SSH into karaf and see
> what's going on. This is especially useful when logs are not dumped to
> stdout nor file but sent via network somewhere else. Log tail then shows
> all events before they are serialized.
>
> A nice side effect of SSH console is possibility to execute commands via
> exec. ;-)) By this way you can browse basic file system contents and
> verify files delivered via container/cloud orchestration tools.
>
> Having said that we run static assemblies, I would like to note that we
> do not rely on "dynamic" updates of configurations just yet. We
> experiment with kube as new way to run things but we didn't reach yet
> place where we deliver configurations from etcd. This is place which
> will get really interesting. Most likely it will require us to go back
> to traditional, non static, assembly in order to pick up updates pushed
> via kube api.
>
> We do have separate pipeline (with simple makefiles) for building docker
> images which is detached from main build where we produce custom distro.
> Its used to add cloud specific configurations.
> In two projects where we didn't use a common configurations we had extra
> profile in maven build for that.
> Developer can run static assembly locally with minor inconvenience
> caused by static configs. For local builds we also used docker-compose
> which allowed to setup all required dependencies (such database).
>
> Cheers,
> Lukasz
>
>
>
> On 8/18/18 11:00 PM, Christian Schneider wrote:
>> I am currently looking into optimized ways to run OSGi applications in
>> the cloud.
>> I would like to describe how cloud native OSGi could look like.
>>
>> Apart from my own experiments I would like to hear from other karaf
>> users. Do you run OSGi and especially karaf applications in the cloud?
>>
>> How do you build your application? How do you do releases and
>> deployments? What do you do different compared to a non cloud setup.
>>
>> Regards
>> Christian
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Computer Scientist
>> http://www.adobe.com
>>
Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

lechlukasz
In reply to this post by luke
How are you doing that? Are you using Maven plugin to build karaf
distribution? I was exploring that option at the beginning, but I've never
got runable Karaf distribution that way...

Now I'm modifying karaf config files to add my features to boot, but the big
issue with that is, it requires to start karaf in build time and stop it
after all bundles are installed, and finding out how to stop karaf in
'right' moment required doing tricks, which stopped working after karaf
version update...



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: OSGi and karaf in the cloud. Looking for some experiences and stories

jbonofre
Hi,

We are using both:

1. Maven plugin to create custom distro
2. Docker provision to create Docker container with a custom instance

I don't see any blocker to create custom distribution, at least for us.

I would be more than happy to help you (private).

Regards
JB

On 12/09/2018 11:56, lechlukasz wrote:

> How are you doing that? Are you using Maven plugin to build karaf
> distribution? I was exploring that option at the beginning, but I've never
> got runable Karaf distribution that way...
>
> Now I'm modifying karaf config files to add my features to boot, but the big
> issue with that is, it requires to start karaf in build time and stop it
> after all bundles are installed, and finding out how to stop karaf in
> 'right' moment required doing tricks, which stopped working after karaf
> version update...
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com