You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by imranrazakhan <im...@gmail.com> on 2018/06/19 13:49:33 UTC

Failover with Apache Karaf + Cellar + Docker

Hi,

I have two karaf instances with Active-Passive configurations. Following is
deployment details

1- One become master and all bundles are with start status.
2-  Second instance is also up but all my developed bundles are with install
status but not running.
3- Both instance communicate on socket and as soon as first goes down second
instance just change the status of bundles from install to status, due to
which uptime in failover is very minimum.
4- these bundles dont expose http services so i cant use load balancer.

I was evaluating Apache Cellar and found i can achieve same behavior with it
by setting karaf.lock.level=50 property in etc/startup.properties.

But i want to deploy both instances with docker images and locking is only
done through filesystem or DB.

How Cellar support locking in cloud environment? Please point some blog or
documentations to achieve this behavior in .






--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Failover with Apache Karaf + Cellar + Docker

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yeah, it should work with the docker host filesystem.

Regards
JB

On 19/06/2018 16:40, imranrazakhan wrote:
> Ok i will look into it.
> 
> As of now i dont have NFS, so will try to use HOST file system for locking.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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

Re: Failover with Apache Karaf + Cellar + Docker

Posted by imranrazakhan <im...@gmail.com>.
Ok i will look into it.

As of now i dont have NFS, so will try to use HOST file system for locking.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Failover with Apache Karaf + Cellar + Docker

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, a possible new feature would be to implement a locking
mechanism based on Cellar, leveraging jClouds, Hazelcast, Ignite,
Zookeeper, whatever.

I already started something with jClouds.

Regards
JB

On 19/06/2018 16:09, Jean-Baptiste Onofré wrote:
> Hi,
> 
> you can't do that with Cellar (again, Cellar is active/active).
> 
> For "pure" failover, you have to use the lock mechanism. Your two docker
> processes should:
> 
> 1. use a shared filesystem (like NFS) to store the lock
> 2. a database lock
> 
> Kubernetes POD could be used with Cellar to discover the cluster nodes,
> but not for failover.
> 
> Regards
> JB
> 
> On 19/06/2018 16:06, imranrazakhan wrote:
>> Ok, thanks for updates.
>>
>> Please provide details how we can achieve failover behavior(A 'hot' standby
>> instance) like mentioned in 
>>
>>    
>> https://svn.apache.org/repos/asf/karaf/site/production/manual/latest-3.0.x/failover.html 
>>
>> in Docker environment?
>>
>> How karaf support to communicate between two images/pods. 
>>
>> As we can use kubernetes for orchestration of instances but i am not clear
>> how to achieve "A 'hot' standby instance" with it. Kubernetes will start and
>> stop bundles regardless of statuses of bundles of karaf pods
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
> 

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

Re: Failover with Apache Karaf + Cellar + Docker

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

you can't do that with Cellar (again, Cellar is active/active).

For "pure" failover, you have to use the lock mechanism. Your two docker
processes should:

1. use a shared filesystem (like NFS) to store the lock
2. a database lock

Kubernetes POD could be used with Cellar to discover the cluster nodes,
but not for failover.

Regards
JB

On 19/06/2018 16:06, imranrazakhan wrote:
> Ok, thanks for updates.
> 
> Please provide details how we can achieve failover behavior(A 'hot' standby
> instance) like mentioned in 
> 
>    
> https://svn.apache.org/repos/asf/karaf/site/production/manual/latest-3.0.x/failover.html 
> 
> in Docker environment?
> 
> How karaf support to communicate between two images/pods. 
> 
> As we can use kubernetes for orchestration of instances but i am not clear
> how to achieve "A 'hot' standby instance" with it. Kubernetes will start and
> stop bundles regardless of statuses of bundles of karaf pods
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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

Re: Failover with Apache Karaf + Cellar + Docker

Posted by imranrazakhan <im...@gmail.com>.
Ok, thanks for updates.

Please provide details how we can achieve failover behavior(A 'hot' standby
instance) like mentioned in 

   
https://svn.apache.org/repos/asf/karaf/site/production/manual/latest-3.0.x/failover.html 

in Docker environment?

How karaf support to communicate between two images/pods. 

As we can use kubernetes for orchestration of instances but i am not clear
how to achieve "A 'hot' standby instance" with it. Kubernetes will start and
stop bundles regardless of statuses of bundles of karaf pods



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Failover with Apache Karaf + Cellar + Docker

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi

Cellar is not an active-passive solution, it's cluster deployment solution.

It means that all instances are active, all instances can be part of the
same cluster group, and then, you can install features/bundles/configs
on this cluster group.

For instance, you do:

cluster:feature-install clusterGroup1 my-feature

my-feature will be installed on all instances members of clusterGroup1.

Regards
JB

On 19/06/2018 15:49, imranrazakhan wrote:
> Hi,
> 
> I have two karaf instances with Active-Passive configurations. Following is
> deployment details
> 
> 1- One become master and all bundles are with start status.
> 2-  Second instance is also up but all my developed bundles are with install
> status but not running.
> 3- Both instance communicate on socket and as soon as first goes down second
> instance just change the status of bundles from install to status, due to
> which uptime in failover is very minimum.
> 4- these bundles dont expose http services so i cant use load balancer.
> 
> I was evaluating Apache Cellar and found i can achieve same behavior with it
> by setting karaf.lock.level=50 property in etc/startup.properties.
> 
> But i want to deploy both instances with docker images and locking is only
> done through filesystem or DB.
> 
> How Cellar support locking in cloud environment? Please point some blog or
> documentations to achieve this behavior in .
> 
> 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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