Restart EnRoute Executable Jar after reboot

18 views
Skip to first unread message

Paul F Fraser

unread,
Jul 22, 2016, 7:23:10 AM7/22/16
to bndtool...@googlegroups.com
Some of the methods for auto restarting an osgi executable jar after a reboot are
  • use .bat script in windows startup dir
  • run as daemon in linux
  • use java service wrapper in win, linux and osx
  • yajsw is a bit too heavy
  • apache Procrun and jsvc are a bit of a challenge.

Is it considered necessary to run as a service/daemon?

Java service wrapper is fairly expensive if win64 required as it is not available in the community version.

The old open 32 bit jsw might be suitable but not sure it works OK in 64 bit systems.

Any reports on successful techniques used in the wild would be most appreciated.

Regards

Paul Fraser

Peter Kriens

unread,
Jul 22, 2016, 8:18:57 AM7/22/16
to bndtool...@googlegroups.com
I find Docker quite perfect for this purpose. Creating a docker image from an executable JAR is less than trivial.

For clusters I then use Kubernetes, it hides the remaining differences between deployment models. Its service model maps very well to OSGi services and is far superior to anything I’ve seen so far. Especially now the Pet Sets are working. Now I’ve got a cluster setup on Google it is trivial to experiment with all kinds of configurations and service models. I find it very impressive.

Someone is working for a Docker OSGi enRoute example application note or tutorial and I hope we can include a story for  Kubernetes as well.

Kind regards,

Peter Kriens




--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ferry Huberts

unread,
Jul 22, 2016, 8:22:26 AM7/22/16
to bndtool...@googlegroups.com
Docker is complete overkill for simple deployments.
If you run on Linux, writing a simple systemd unit file is sufficient
and does the job very well. Such a file probably is about 5-10 lines long.


On 22/07/16 14:18, Peter Kriens wrote:
> I find Docker quite perfect for this purpose. Creating a docker image
> from an executable JAR is less than trivial.
>
> For clusters I then use Kubernetes, it hides the remaining differences
> between deployment models. Its service model maps very well to OSGi
> services and is far superior to anything I’ve seen so far. Especially
> now the Pet Sets are working. Now I’ve got a cluster setup on Google it
> is trivial to experiment with all kinds of configurations and service
> models. I find it very impressive.
>
> Someone is working for a Docker OSGi enRoute example application note or
> tutorial and I hope we can include a story for Kubernetes as well.
>
> Kind regards,
>
> Peter Kriens
>
>
>
>
>> On 22 jul. 2016, at 13:23, Paul F Fraser <pa...@a2zliving.com
>> <mailto:pa...@a2zliving.com>> wrote:
>>
>> Some of the methods for auto restarting an osgi executable jar after a
>> reboot are
>>
>> * use .bat script in windows startup dir
>> * run as daemon in linux
>> * use java service wrapper in win, linux and osx
>> * yajsw is a bit too heavy
>> * apache Procrun and jsvc are a bit of a challenge.
>>
>> Is it considered necessary to run as a service/daemon?
>>
>> Java service wrapper is fairly expensive if win64 required as it is
>> not available in the community version.
>>
>> The old open 32 bit jsw might be suitable but not sure it works OK in
>> 64 bit systems.
>>
>> Any reports on successful techniques used in the wild would be most
>> appreciated.
>>
>> Regards
>>
>> Paul Fraser
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "bndtools-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to bndtools-user...@googlegroups.com
>> <mailto:bndtools-user...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "bndtools-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bndtools-user...@googlegroups.com
> <mailto:bndtools-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Ferry Huberts

Peter Kriens

unread,
Jul 22, 2016, 8:26:14 AM7/22/16
to bndtool...@googlegroups.com
True if you have a simple problem and ignore all the myriad of other simplifications & isolation Docker gives you at remarkably little cost … :-)

And I find the Kubernetes route for clusters, which is based on containers, remarkably powerful for OSGi apps.

Kind regards,

Peter Kriens

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

Bryan Hunt

unread,
Jul 22, 2016, 8:34:47 AM7/22/16
to bndtool...@googlegroups.com
Peter, 

Did how did you choose Kubernetes?  I’m looking at Docker Swarm for our deployment.  I also considered Kubernetes, but Swarm appears to be easier to set up especially now that it’s just part of Docker.

Bryan

Neil Bartlett

unread,
Jul 22, 2016, 8:39:34 AM7/22/16
to bndtool...@googlegroups.com
I believe this thread is off-topic for the Bndtools mailing list.

If we want to talk about tools for exporting to Docker images, fine.

Regards,
Neil

Peter Kriens

unread,
Jul 22, 2016, 11:30:50 AM7/22/16
to bndtool...@googlegroups.com
Let’s continue discussing this on osgi-dev … Can you raise the question there again?

Kind regards,

Peter Kriens
Reply all
Reply to author
Forward
0 new messages