Show Table of Contents
2.2. Installing Red Hat JBoss Fuse as a Service in Fabric Mode
Abstract
In fabric mode, you can install Red Hat JBoss Fuse as a system service in either a fabric ensemble container or in a child container. To do so, you must be logged into a running Fuse Fabric. If you have not created a fabric, see chapter "Creating a New Fabric" in "Fabric Guide" for instructions.
2.2.1. Installing JBoss Fuse as a System Service in a Fabric Ensemble Container
Installing JBoss Fuse as a system service in a fabric ensemble container involves performing these tasks in fabric mode:
- Creating a profile and adding the
wrapperfeature to it - Deploying the wrapper-containing profile to an ensemble container
- Installing the wrapper
- Starting/stopping the service
Procedure
Follow this procedure if you are installing JBoss Fuse on the default ensemble container
root.
- Create a new profile (for example,
myWrapper) that will contain thewrapperfeature:JBossFuse:karaf@root> fabric:profile-create myWrapper
- Add the
wrapperfeature to the newmyWrapperprofile:JBossFuse:karaf@root> fabric:profile-edit --features wrapper/0.0.0 myWrapper
- Add the
myWrapperprofile to therootcontainer:JBossFuse:karaf@root> fabric:container-add-profile root myWrapper
- Install the wrapper:
JBossFuse:karaf@root> wrapper:install
Thewrapper:installcommand generates the following wrapper files:$JBOSS_FUSE/bin/karaf-wrapper[.exe]—executable file for the wrapper$JBOSS_FUSE/bin/karaf-service[.bat]—script for installing/uninstalling the wrapper$JBOSS_FUSE/etc/karaf-wrapper.conf—wrapper's configuration file
The command also creates the following Libraries that the service wrapper requires:$JBOSS_FUSE/lib/libwrapper.jnilib$JBOSS_FUSE/lib/karaf-wrapper.jar$JBOSS_FUSE/lib/karaf-wrapper-main.jar
- Follow the instructions provided by the
wrapper:installcommand to start or stop the service:$JBOSS_FUSE/bin/karaf-service start $JBOSS_FUSE/bin/karaf-service stop
2.2.2. Installing JBoss Fuse as a System Service in a Child Container
Installing JBoss Fuse as a system service in a child container involves performing these tasks in fabric mode:
- Creating a profile and adding the
wrapperfeature to it - Creating a child container and deploying the wrapper-containing profile to it
- Connecting to the child container and installing the wrapper
- Adding the child container's JVM options to its wrapper configuration file
- Starting/stopping the service
Procedure
- Create a new profile (for example,
myWrapper) that will contain thewrapperfeature:JBossFuse:karaf@root> fabric:profile-create myWrapper
- Add the
wrapperfeature to the newmyWrapperprofile:JBossFuse:karaf@root> fabric:profile-edit --features wrapper/0.0.0 myWrapper
- Create a new child container (for example,
child1):JBossFuse:karaf@root> fabric:container-create-child root child1
- Add the
myWrapperprofile to the new child container:JBossFuse:karaf@root> fabric:container-add-profile child1 myWrapper
- Connect to the child container:
JBossFuse:karaf@root> fabric:container-connect child1
The child container's splash screen opens, giving you administrative access to it:
Note that the console prompt has changed toJBossFuse:admin@child1>. - Install the wrapper:
JBossFuse:admin@child1> wrapper:install
Thewrapper:installcommand generates the following wrapper files:$JBOSS_FUSE/instances/<child1>/bin/karaf-wrapper[.exe]—executable file for the wrapper$JBOSS_FUSE/instances/<child1>/bin/karaf-service[.bat]—script for installing/uninstalling the wrapper$JBOSS_FUSE/instances/<child1>/etc/karaf-wrapper.conf—wrapper's configuration file
The command also creates the following Libraries that the service wrapper requires:$JBOSS_FUSE/instances/<child1>/lib/libwrapper.jnilib$JBOSS_FUSE/instances/<child1>/lib/karaf-wrapper.jar$JBOSS_FUSE/instances/<child1>/lib/karaf-wrapper-main.jar
The command also records each child container's JVM and fabric-related options and values in the$JBOSS_FUSE/instances/instance.propertiesfile, in an entryitem.#.opts, where#corresponds to a specific child instance (in this example,item.1.optsforchild1):
NoteThe JVM options listed can vary depending on the command used to create the child instance. - Compare the child container's JVM and fabric-related options listed in its
item.#.optsentry in the$JBOSS_FUSE/instances/instance.propertiesfile with the JVM and fabric-related options contained in its$JBOSS_FUSE/instances/<child1>/etc/karaf-wrapper.conffile. - Copy to the child container's
$JBOSS_FUSE/instances/<child1>/etc/karaf-wrapper.confconfiguration file, any missing JVM and fabric-related options listed in itsitem.#.optsentry in the$JBOSS_FUSE/instances/instance.propertiesfile.Make sure your entries conform to the configuration file format; for example:# JVM Parameters # note that n is the parameter number starting from 1. wrapper.java.additional.1=-Dkaraf.home=%KARAF_HOME% wrapper.java.additional.2=-Dkaraf.base=%KARAF_BASE% wrapper.java.additional.3=-Dkaraf.data=%KARAF_DATA% wrapper.java.additional.4=-Dkaraf.etc=%KARAF_ETC% wrapper.java.additional.5=-Dcom.sun.management.jmxremote wrapper.java.additional.6=-Dkaraf.startLocalConsole=false wrapper.java.additional.7=-Dkaraf.startRemoteShell=true ...
- Follow the instructions provided by the
wrapper:installcommand to start or stop the service:$JBOSS_FUSE/instances/<child1>/bin/karaf-service start $JBOSS_FUSE/instances/<child1>/bin/karaf-service stop

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.