Now that we've tweaked our Karaf configuration into a position to run for an extended period, let's discuss how we can help ensure continued service in the event of a fault.
The first step towards a high availability / failover topology is to install Karaf as a service on your host operating system.
Let's review the service setup process.
Install the wrapper feature:
karaf@root> features:install wrapper
Instruct the wrapper to install Karaf as a service, using the following command:
karaf@root> wrapper:install –s AUTO_START –n KARAF –d Karaf –D "Karaf Service"
The first flag option (
-s) tells the service to automatically start, the second (
-n) sets the service name, the third (
-d) the display ...