You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Ryan Moquin <fr...@gmail.com> on 2015/07/01 14:45:59 UTC

Re: Karaf child instances

Thanks, JB.  What I want to accomplish is to have a script that I can run
from the root instance which will stop a child instance if it's running,
destroy it, create a new child, provision it with a new version...  I
created a script to basically do this from the karaf shell, but ran into a
problem.  The first is that the SSH session always terminates when trying
to use the instance command to connect to a child and run a command (I also
seem to have to delete the known_hosts entry for that port in known_hosts
to get around the host key having changed when trying to connect as well.)

After I figure that out, I just need to figure out how to properly manage
the child instance starting and stopping if the server gets rebooted.  I'm
guessing that it gets installed as a service and I'd need to remove and
ready the service for the child each time?  Or maybe can have the service
use the newly created service automatically.....

Ryan

On Tue, Jun 30, 2015, 11:22 AM Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Hi Ryan,
>
> a child instance is isolated from the root instance: so even if you stop
> the root instance, the child instance is still alive.
>
> You can control the instance using bin/instance.
>
> If you have an issue, please let me know but it should work.
>
> Regards
> JB
>
> On 06/30/2015 04:55 PM, Ryan Moquin wrote:
> > I had a question about Karaf child instances for Karaf 3.0.x.  If you
> > create and start a child instance from a root Karaf instance and the
> > machine it's running on gets rebooted, or the child instance crashes,
> > what is the recommended way to have that child instance automatically
> > start when the karaf root instance starts or if the child instance
> > crashes?  Should it be setup as an OS service separately?
> >
> > Thanks!
> > Ryan
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>