Chapter 1. Install Fuse for Development on Apache Karaf


To develop Fuse applications that run on Karaf, install Fuse locally as described in the following topics:

1.1. Prerequisites for installing Fuse on Apache Karaf

Prerequisites

Before you install Fuse on Apache Karaf, ensure that your system:

  1. Meets hardware requirements.
  2. Is a supported platform.
  3. Has a supported Java runtime.
  4. Runs supported standard software.

1.1.1. Fuse on Apache Karaf hardware requirements

The hardware requirements for a full installation of Fuse on Apache Karaf are:

  • 250 MB of free disk space
  • 2 GB of RAM

In addition, a system that is running Fuse requires space for caching, persistent message stores, and other functions. The actual requirement is dependent on what your Fuse applications do.

1.1.2. Fuse on Apache Karaf supported platforms

  1. Confirm that the system on which you plan to install Fuse is running a supported platform. Red Hat tests and supports Fuse products on the platforms that are listed in Red Hat Fuse Supported Configurations.

1.1.3. Fuse on Apache Karaf supported Java runtime

See the section Supported Java Versions in the article Red Hat Fuse Supported Configurations for a list of supported runtime versions.

Note

You must not install Your Java runtime in a directory path that includes whitespace. Whitespace in paths causes unpredictable errors in Fuse on Apache Karaf at run time.

For example, C:\Program Files\Java\jdk8 is not an acceptable path.

1.1.4. Fuse on Apache Karaf supported standards

See the article Red Hat Fuse Supported Standards for a list of supported standard software:

  • Web services
  • APIs
  • Transport protocols.

1.2. Install Fuse on Apache Karaf

The standard installation package for Fuse 7.13 on Karaf is available for download from the Red Hat Customer Portal. It installs the standard assembly of the Apache Karaf container, and provides the full Fuse technology stack.

It is possible to create your own custom assembly of Fuse 7.13, which contains a customized subset of the Fuse features and bundles. The custom quickstart demonstrates how to use Maven to create a custom assembly of Red Hat Fuse. You can install all the quickstarts from a downloadable file available on the Fuse Software Downloads page.

Prerequisite

The system on which you install Fuse must meet the hardware and software requirements described in Section 1.1, “Prerequisites for installing Fuse on Apache Karaf”.

Procedure

  1. In a browser, go to the Fuse Software Downloads page.

    If you are not already logged in to the Red Hat customer portal, there is a prompt to log in and then the download page appears (your account must be associated with a Red Hat Fuse subscription).

  2. In the Fuse Software Downloads page, to the right of Red Hat Fuse 7.13 on Karaf Installer, click Download to obtain a local zip file.
  3. Extract the contents of the zip file into a directory for which you have all permissions.

    Do not unpack the zip file into a directory that has spaces or any of the following special characters in its path name: #, %, ^, ". For example, do not unpack into C:\Documents and Settings\Greco#Roman\Desktop\fuse.

  4. If you are using the IBM JDK:

    Example 1.1. Additional steps for the IBM JDK

    1. In your Fuse installation directory, in the /lib/endorsed directory, remove the saaj-api .jar file, for example:

      rm lib/endorsed/org.apache.servicemix.specs.saaj-api-1.3-2.9.0.jar
    2. Set the JAVA_OPTS environment variable as follows:

      JAVA_OPTS=-Xshareclasses:none

      You must set the JAVA_OPTS environment variable before you start the Karaf container.

  5. Add an administrator user to enable remote access to the Fuse on Karaf container and to access the Fuse Console.

    Note

    By default, no users are defined for the container. You can run the container in the foreground in this case, but you cannot access the container remotely, and you cannot run it in the background.

    Create at least one user with the admin role by following these steps:

    1. In a text editor, open the etc/users.properties file, which is in your Fuse installation directory.
    2. Locate the following lines:

      #admin = admin,_g_:admingroup
      #_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
    3. For each line, remove the leading # character to uncomment the line.
    4. In the first line, change the first instance of admin to a username that you choose, for example user1.
    5. In the same line, change the second instance of admin to a password for that user, for example passw0rd.

      For example:

      user1 = passw0rd,_g_:admingroup
      _g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
    6. Save and close the file.
  6. To start Fuse, run bin/fuse on Linux/Unix or bin\fuse.bat on Windows.
  7. Optionally, to access the Fuse Console, open the provided URL in a web browser and login with the username and password that you set in the etc/users.properties file. For more information about using the Fuse Console see Managing Fuse on Karaf Standalone.

1.3. About running Fuse on Karaf offline

You can run the Apache Karaf container in offline mode, that is, without an Internet connection. However, if you are planning to deploy custom applications to the container, it might be necessary to download additional dependencies to a local Maven repository before you can run the container in offline mode with these applications.

To run the Apache Karaf container in offline mode, it is necessary to distinguish between the following kinds of dependencies:

  • Runtime dependencies are dependencies that are required to run the Apache Karaf container in its default configuration.
  • Build-time dependencies are dependencies that are required to build a custom application, which might include third-party libraries.

Here is a summary of what can be done in offline mode and what needs to be done in online mode (with an Internet connection):

  • Running the Apache Karaf container in its default configuration is supported in offline mode. The default configuration of the Apache Karaf container is specified by the featuresBoot property in the etc/org.apache.karaf.features.cfg file. The required dependencies are provided in the system/ sub-directory of the installation.
  • Installing additional features is, in general, not supported in offline mode. In principle, you can use the features:install command to install any of the features from the standard feature repositories (as specified by the featuresRepositories property in the etc/org.apache.karaf.features.cfg file), but the majority of these features must be downloaded from the Internet and are thus not supported in offline mode.
  • Deploying custom applications is, in general, not supported in offline mode. There may be some cases where an application with a minimal set of build-time dependencies is deployable offline. However, custom applications typically have third-party dependencies that require an Internet connection so that JAR files can be downloaded by Apache Maven.

1.4. Optionally use standalone Apache distributions

Red Hat Fuse provides an additional package to download, which contains the standard distributions of Apache Camel and Apache CXF. If you want to use a standard, upstream distribution of Apache Camel or Apache CXF (without the OSGi container) use the archived versions in the downloaded extras package.

Procedure

  1. Log in to the Red Hat customer portal.
  2. Go to the Red Hat Customer Portal→Downloads→Red Hat Fuse→Downloads page.
  3. Select 7.13.0 from the Version drop-down list on the Software Downloads page.
  4. Download the Red Hat Fuse 7.13.0 Extras archive.

    The extras archive file contains the following archive files nested inside it:

    • apache-camel-2.23.2.fuse-7_13_0-00013-redhat-00001.zip
    • apache-cxf-3.3.6.fuse-7_13_0-00015-redhat-00001.zip
  5. Copy these files to the desired location and decompress them using the appropriate utility for your platform.
Warning

Do not unpack an archive file into a folder that has spaces in its path name. For example, do not unpack into C:\Documents and Settings\Greco Roman\Desktop\fuse.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.