I disagree here. We can have different perspective.

We have some users that use Karaf on Docker for infra, and use Cellar
with Kubernetes for node discovery. That's an approach.

Another option is to use the Karaf static profile (we have an example
now in the distribution) or a custom distribution (thanks for the
assembly/docker scripts we now have in the distribution).

As reminder, this is a Karaf related mailing list.

Regards
JB

On 18/08/2018 19:24, Christian Schneider wrote:
> For cloud deployments you normally want to implement the immutable server
> pattern:
> https://martinfowler.com/bliki/ImmutableServer.html
> 
> This means that your whole deployment including config should be defined
> from e.g. a github repository.
> You do not want to have upgrades of bundles or config during the lifetime
> of a pod. Of course your still want to have this for development.
> So you need some assembly process but it completely happens at build time
> of the docker image.
> You then want to feed some instance specific config using env variables.
> 
> So translated to karaf the ideal deployment is to resolve the features at
> build time and only deploy a list of bundles.
> This can already be done using the static profile of karaf.
> Overriding the config using env variables is possible using the new felix
> configurator. It is not yet added to karaf but should be no bigger issue.
> So basically you create a custom distro with static profile, your features
> and the configurator. Then you create a docker image from it.
> The result should then behave quite nicely in kubernetes.
> 
> I would not use the karaf clustering features (cellar). As you deploy
> static docker images the cellar features do not help much.
> So in summary karaf can be nicely tailored for kubernetes. I think though
> that you can go even smaller without karaf if you want to go for kubernetes.
> 
> I am currently epxerimenting with the new OSGi R7 features that allow to do
> an assembly based on annotations. So for example the new http whiteboard
> annotations
> have a dual purpose. They tell the http service to install a service as a
> servlet but they also add a requirement for a whiteboard extender.
> These annotations allow to do a deployment without specifiying features. If
> you use them well you can simply tell the resolver to deploy your bundle,
> give it a repository of
> bundles and it automatically selects a good set of bundles.
> I am currently doing this with a bndrun file using the bnd maven plugins.
> The result of the build is then a runnable jar that looks like what spring
> boot produces.
> It is quite easy to create a docker image from this and run it in
> kubernetes.
> See this example https://github.com/cschneider/osgi-example-systemready.
> 
> I am pretty sure we can use the new R7 annotations to also make karaf
> deployments simpler.
> 
> I will do a talk about systemready and kubernetes at adaptto 2018.
> For javaland 2019 I proposed a talk about Cloud native OSGi. The idea is to
> check how well OSGi already fits into the cloud and what we need to make it
> fully cloud native.
> 
> Christian
> 
> .Am Sa., 18. Aug. 2018 um 18:08 Uhr schrieb Matt Sicker <boa...@gmail.com>:
> 
>>
>> I'm not sure how much you've used Kubernetes, but I wonder how well Karaf
>> Boot could work in that sphere. I still believe strongly in modularity and
>> the ecosystem around it, and if Karaf makes it easier to "migrate to the
>> cloud" so to say (and not just in a superficial matter; modularity should
>> help enforce boundaries that are explicitly needed in distributed systems),
>> then that could be a killer feature. The existing work with clustering
>> looks extremely relevant to this, though I'm not familiar with how that
>> interacts with k8s.
>>
>> On Fri, 17 Aug 2018 at 23:09, Jean-Baptiste Onofré <j...@nanthrax.net>
>> wrote:
>>
>>> Hi,
>>>
>>> by the way, what do you mean about remote admin ? Is it something like
>>> the Deployer feature we have in Cave ?
>>>
>>> By the way, I will take some days off next week, but after I will send a
>>> proposal on the mailing list with:
>>>
>>> 1. Release agenda
>>> 2. Karaf Container roadmap
>>> 3. Karaf Vineyard
>>>
>>> Stay tuned !
>>>
>>> Regards
>>> JB
>>>
>>> On 17/08/2018 22:12, Castor wrote:
>>>> Ohh yeah, at the beginning the mechanism was quite confusing, it still
>>> give
>>>> me some headaches sometimes, like a feature with no dependencies with a
>>>> bundle importing only a servlet triggering a refresh of the whole
>>> platform.
>>>>
>>>> "For the update, I don't know which karaf version you are using, but
>>>> Karaf 4.2.x has some improvements with feature:update."
>>>>
>>>> We are using karaf 4.1.5 right now, we will wait for Karaf 4.2.1 to
>> start
>>>> some testing.
>>>>
>>>>
>>>> "Feel free to create Jira corresponding
>>>> to your ideas, and feel free to contribute. Any help is welcome !"
>>>>
>>>> Will do, i plan to release an open-source version of our remote admin
>> for
>>>> karaf which i am working on my free time, should take a couple months.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>>> jbonofre wrote
>>>>> Hi,
>>>>>
>>>>> Thanks for sharing your experience.
>>>>>
>>>>> I don't say that it's your case, but most of the time, when people
>>>>> complains about refresh, it's because they don't know/understand the
>>>>> underlying mechanisms.
>>>>> Basically, I had the case with a customer that used a bunch of
>> optional
>>>>> import and complain of the refresh: the issue was basically a design
>>>>> error and an mistake in the bundles.
>>>>>
>>>>> For the update, I don't know which karaf version you are using, but
>>>>> Karaf 4.2.x has some improvements with feature:update.
>>>>>
>>>>> About spring-boot like, it's part of the karaf-boot scope.
>>>>>
>>>>> Anyway guys, I think you have very good ideas and it's really great
>> you
>>>>> share your experience/use cases. Feel free to create Jira
>> corresponding
>>>>> to your ideas, and feel free to contribute. Any help is welcome !
>>>>>
>>>>> Thanks
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 17/08/2018 21:34, Castor wrote:
>>>>>> I can tell a little about my experience with karaf.
>>>>>>
>>>>>> Here we have an ERP writen in delphi (that was written in natural
>>> before
>>>>>> that) which we need to "upgrade" to a cloud capable software, using
>> the
>>>>>> same
>>>>>> database and mantaining the old software while we rewrite negotial
>>> rules
>>>>>> in
>>>>>> java. Great part of our clients are small-medium with on-premises, so
>>> we
>>>>>> had
>>>>>> to maintain a architecture easy enough for on-premises and able to
>> use
>>> a
>>>>>> cloud structure with clusters and so on.
>>>>>>
>>>>>> So, we are using karaf for that, OSGi services lets us to build
>>>>>> "microservices" and have a easier reuse of Negotial Rules, with
>> common
>>>>>> transactions and so on (icks for XA .
>>>>>>
>>>>>> Well, it works, but we have some headaches, we had to build or own
>>>>>> dependency mechanism, because every single feature refreshed the hell
>>> of
>>>>>> karaf, we also built an remote admin to update services on-the-fly in
>>>>>> every
>>>>>> single customer, it's working quite nicely, we still have some
>> trouble
>>>>>> with
>>>>>> failed bundles, but nothing irremediable.
>>>>>>
>>>>>> Two things that would help us a lot, a spring-boot like app and an
>>> easier
>>>>>> way to update karaf version, for the updates we had to create a
>> updater
>>>>>> which saves a list of negotial bundles, reinstall karaf and restores
>>> the
>>>>>> bundles, it works but it's quite meh.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>>>>>>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>
>>>>> jbonofre@
>>>>
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>> --
>> Matt Sicker <boa...@gmail.com>
>>
> 
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to