このコンテンツは選択した言語では利用できません。
Installing on JBoss EAP
Install Red Hat Fuse 7.4 on Red Hat JBoss Enterprise Application Platform 7.2.1
Abstract
Preface
An administrator can install Red Hat Fuse on Red Hat JBoss Enterprise Application Platform so that programmers can develop Fuse applications that run on JBoss EAP. For information about JBoss EAP, see Introduction to JBoss EAP.
To install Fuse on JBoss EAP, see:
Chapter 1. Installing Fuse on JBoss EAP
To develop Fuse applications on JBoss EAP, install JBoss EAP, and then install Fuse.
Prerequisites
- Red Hat Customer Portal login credentials.
A supported version of a Java runtime is installed.
Red Hat Fuse Supported Runtimes lists the Java runtimes that are supported on different operating systems.
Procedure
Install JBoss EAP 7.2.1:
- Go to the Enterprise Application Platform Software Downloads page on the Red Hat Customer Portal.
- When prompted, log in to your customer account.
-
In the Version dropdown menu, select
7.2
. - Click the Download link for the Red Hat JBoss Enterprise Application Platform 7.2 Installer package.
Run the downloaded installer. In the following example, replace
DOWNLOAD_LOCATION
with the location of the JBoss EAP installer on your system:java -jar DOWNLOAD_LOCATION/jboss-eap-7.2-installer.jar
- Accept the terms and conditions.
-
Choose your preferred installation path, which is represented by
EAP_HOME
for the JBoss EAP runtime. - Create an administrative user and be sure to note this administrative user’s credentials. You need them to log in to the Fuse Management Console.
- Accept the default settings on the remaining screens.
- Check the Red Hat Fuse Supported Configurations page for any notes or advice on the compatibility of JBoss EAP patches with Red Hat Fuse.
Install the relevant JBoss EAP patches by following the instructions on Enterprise Application Platform Software Downloads > Patches. You must ensure that JBoss EAP 7.2 Update 01 is applied. For example, on Red Hat Enterprise Linux:
bin/jboss-cli.sh "patch apply jboss-eap-7.2.1-patch.zip" { "outcome" : "success", "result" : {} }
Install Fuse 7.4 on JBoss EAP 7.2.1:
- Go to the Red Hat Fuse Software Downloads page on the Red Hat Customer Portal.
- When prompted, log in to your customer account.
-
In the Version dropdown menu, select
7.4.0
. -
Click the
Download
link for the Red Hat Fuse 7.4.0 on EAP Installer package. - Open a shell prompt (or a command prompt on Windows).
-
Change to the
EAP_HOME
directory, which is the root directory of the fresh Red Hat JBoss Enterprise Application Platform installation. Run the downloaded installer. In the following example, replace
DOWNLOAD_LOCATION
with the location of the downloaded Fuse installer on your system:java -jar DOWNLOAD_LOCATION/fuse-eap-installer-7.4.0.fuse-740017-redhat-00003.jar
- The installer runs without prompts and logs its activity to the screen.
Next steps
- Start JBoss EAP, verify that Fuse is running, and then add Fuse users to JBoss EAP. The next chapters explain how to perform these tasks.
- Optional but recommended: set up Maven for local use with Fuse projects. This is explained in Chapter 7, Setting up Maven locally.
Additional resource
For more detailed information about installing JBoss EAP, see the JBoss EAP 7.2 Installation Guide.
Chapter 2. Starting JBoss EAP
You must start the JBoss Enterprise Application Platform instance before Fuse. This is because the Fuse components run on the JBoss Enterprise Application Platform container. The commands in this section start JBoss EAP as a standalone server.
Prerequisites
- JBoss EAP 7.2.1 is installed.
Procedure
For Red Hat Enterprise Linux, run the following command:
EAP_HOME/bin/standalone.sh
For Microsoft Windows Server, run the following command:
EAP_HOME\bin\standalone.bat
Additional resources
-
To obtain a list of parameters that you can pass to the start-up scripts, enter the
-h
parameter. - For more information about starting and stopping JBoss Enterprise Application Platform using alternative and more advanced methods, see the Red Hat JBoss Enterprise Application Platform Configuration Guide.
Chapter 3. Verifying installation of Fuse on JBoss EAP
After installing Fuse on JBoss EAP, verify that the installation was successful.
Prerequisites
- Fuse 7.4 on JBoss EAP 7.2.1 is installed.
- The JBoss EAP server is running.
Procedure
Open the following file to check if any error messages have been logged:
EAP_HOME/standalone/log/server.log
- In a browser, open the Fuse Management Console.
- Sign in by entering the administrator credentials that you created during JBoss EAP installation.
Results
If the Fuse Management Console runs and you can log in, the Fuse installation was successful.
Chapter 4. Adding Fuse users to JBoss EAP
Run the JBoss EAP add-user
script to add Fuse users to JBoss EAP.
Prerequisites
- JBoss EAP is running.
Procedure
-
Navigate to
EAP_HOME/bin
. Run the
add-user
script. For example:./add-user.sh
Respond to the prompts to create a new user:
- Management User is a Fuse administrative user on JBoss EAP.
- Application User is a Fuse non-administrative user on JBoss EAP.
Chapter 5. Stopping JBoss EAP
The following procedure uses the Management command line interface (CLI) to stop JBoss EAP.
Prerequisites
- JBoss EAP 7.2.1 is running.
Procedure
Launch the Management CLI by running:
$ EAP_HOME/bin/jboss-cli.sh
Connect to the server by running the
connect
command:[disconnected /] connect
Stop the server by running the
shutdown
command:[standalone@localhost:9999 /] shutdown
Close the Management CLI by running the
quit
command:[standalone@localhost:9999 /] quit
Alternative
Here is another way to stop JBoss EAP:
- Navigate to the terminal where JBoss EAP is running.
-
Press
Ctrl+C
to stop JBoss Enterprise Application Platform.
Chapter 6. Applying a hotfix patch to Fuse on JBoss EAP
6.1. Hotfix patches for Fuse on JBoss EAP
Hotfix patches contain updated versions of specific files in a Fuse on JBoss EAP installation. They typically include only fixes for one or more critical bugs. Hotfix patches are applied on top of your existing Red Hat Fuse distribution and update a subset of the existing Fuse files only.
Applying patches for Fuse on JBoss EAP is a two-stage process where patch files are first added to a patch repository and then installed in the JBoss EAP server. The following diagram shows an overview of the Fuse patching process on JBoss EAP:
- Patch repository
- The patch repository is a holding area for Fuse on JBoss EAP patches that runs in the same JVM as the JBoss EAP server. When a patch is present in the repository, this does not imply that it has been installed in the JBoss EAP server. You must first add the patch to the repository, and then you can install the patch from the repository into the JBoss EAP server.
- fusepatch utility
-
The
fusepatch
utility is a command-line tool for patching Fuse on JBoss EAP. After installing the Fuse on EAP package, thefusepatch.sh
script (Linux and UNIX) and thefusepatch.bat
(Windows) script are available in thebin
directory of the JBoss EAP server.
6.2. Installing a Fuse hotfix patch on JBoss EAP
A hotfix patch must be installed on top of an existing Fuse installation. This section explains how to install a hotfix patch, fuse-eap-distro-VERSION.fuse-MODULE_ID.HOTFIX_ID.zip
, on top of an existing Fuse installation that already includes fuse-eap-distro-VERSION.fuse-MODULE_ID-BASE_ID
.
Prerequisites
- Section 6.1, “Hotfix patches for Fuse on JBoss EAP”.
-
Download the hotfix patch
.zip
file available on demand from Red Hat Support. -
Read the instructions in the
readme.txt
file accompanying the hotfix patch file, in case there are any extra steps that you must perform to install it. - Make a full backup of your Fuse on JBoss EAP installation before applying the patch.
Procedure
-
Copy the hotfix patch file to your
EAP_HOME
directory. Make sure that the correct base version has already been added to your patch repository and installed on the JBoss EAP server. For example, if the base installation includes
MODULE_ID
andBASE_ID
, check that these are installed in the repository:$ bin/fusepatch.sh --query-repository fuse-eap-distro-VERSION.fuse-MODULE_ID-redhat-BASE_ID
And check that the same IDs are installed on the JBoss EAP server:
$ .bin/fusepatch.sh --query-server fuse-eap-distro-VERSION.fuse-MODULE_ID-redhat-BASE_ID
Given the one-off hotfix patch file,
fuse-eap-distro-VERSION.fuse-MODULE_ID.HOTFIX_ID.zip
, add this to your repository and associate it with the base installation by entering the following command:$ bin/fusepatch.sh --add file:fuse-eap-distro-VERSION.fuse-MODULE_ID.HOTFIX_ID.zip --one-off fuse-eap-distro-VERSION.fuse-MODULE_ID-BASE_ID
Update the base module,
fuse-eap-distro-VERSION.fuse-MODULE_ID-BASE_ID
, on the JBoss EAP server to the latest version:$ .bin/fusepatch.sh --update fuse-eap-distro-VERSION.fuse-MODULE_ID-BASE_ID
- Perform any post-installation steps documented in the patch instructions.
Additional resources
For more details on the
fusepatch
command, enter:bin/fusepatch.sh --help
- For details on patching the underlying JBoss EAP instance, see the JBoss EAP Patching and Upgrading Guide.
Chapter 7. Setting up Maven locally
Typical Fuse application development uses Maven to build and manage projects.
The following topics describe how to set up Maven locally:
7.1. Preparing to set up Maven
Maven is a free, open source, build tool from Apache. Typically, you use Maven to build Fuse applications.
Procedure
- Download the latest version of Maven from the Maven download page.
Ensure that your system is connected to the Internet.
While building a project, the default behavior is that Maven searches external repositories and downloads the required artifacts. Maven looks for repositories that are accessible over the Internet.
You can change this behavior so that Maven searches only repositories that are on a local network. That is, Maven can run in an offline mode. In offline mode, Maven looks for artifacts in its local repository. See Section 7.3, “Using local Maven repositories”.
7.2. Adding Red Hat repositories to Maven
To access artifacts that are in Red Hat Maven repositories, you need to add those repositories to Maven’s settings.xml
file. Maven looks for the settings.xml
file in the .m2
directory of the user’s home directory. If there is not a user specified settings.xml
file, Maven uses the system-level settings.xml
file at M2_HOME/conf/settings.xml
.
Prerequisite
You know the location of the settings.xml
file in which you want to add the Red Hat repositories.
Procedure
In the settings.xml
file, add repository
elements for the Red Hat repositories as shown in this example:
<?xml version="1.0"?> <settings> <profiles> <profile> <id>extra-repos</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>redhat-ga-repository</id> <url>https://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>redhat-ea-repository</id> <url>https://maven.repository.redhat.com/earlyaccess/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>jboss-public</id> <name>JBoss Public Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>redhat-ga-repository</id> <url>https://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> <pluginRepository> <id>redhat-ea-repository</id> <url>https://maven.repository.redhat.com/earlyaccess/all</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> <pluginRepository> <id>jboss-public</id> <name>JBoss Public Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public</url> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>extra-repos</activeProfile> </activeProfiles> </settings>
7.3. Using local Maven repositories
If you are running the Apache Karaf container without an Internet connection, and you need to deploy an application that has dependencies that are not available offline, you can use the Maven dependency plug-in to download the application’s dependencies into a Maven offline repository. You can then distribute this customized Maven offline repository to machines that do not have an Internet connection.
Procedure
In the project directory that contains the
pom.xml
file, download a repository for a Maven project by running a command such as the following:mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.0:go-offline -Dmaven.repo.local=/tmp/my-project
In this example, Maven dependencies and plug-ins that are required to build the project are downloaded to the
/tmp/my-project
directory.Edit the
etc/org.ops4j.pax.url.mvn.cfg
file to setorg.ops4j.pax.url.mvn.offline
to true. This enables offline mode:## # If set to true, no remote repository will be accessed when resolving artifacts # org.ops4j.pax.url.mvn.offline = true
- Distribute this customized Maven offline repository internally to any machines that do not have an Internet connection.
7.4. About Maven artifacts and coordinates
In the Maven build system, the basic building block is an artifact. After a build, the output of an artifact is typically an archive, such as a JAR or WAR file.
A key aspect of Maven is the ability to locate artifacts and manage the dependencies between them. A Maven coordinate is a set of values that identifies the location of a particular artifact. A basic coordinate has three values in the following form:
groupId:artifactId:version
Sometimes Maven augments a basic coordinate with a packaging value or with both a packaging value and a classifier value. A Maven coordinate can have any one of the following forms:
groupId:artifactId:version groupId:artifactId:packaging:version groupId:artifactId:packaging:classifier:version
Here are descriptions of the values:
- groupdId
-
Defines a scope for the name of the artifact. You would typically use all or part of a package name as a group ID. For example,
org.fusesource.example
. - artifactId
- Defines the artifact name relative to the group ID.
- version
-
Specifies the artifact’s version. A version number can have up to four parts:
n.n.n.n
, where the last part of the version number can contain non-numeric characters. For example, the last part of1.0-SNAPSHOT
is the alphanumeric substring,0-SNAPSHOT
. - packaging
-
Defines the packaged entity that is produced when you build the project. For OSGi projects, the packaging is
bundle
. The default value isjar
. - classifier
- Enables you to distinguish between artifacts that were built from the same POM, but have different content.
Elements in an artifact’s POM file define the artifact’s group ID, artifact ID, packaging, and version, as shown here:
<project ... > ... <groupId>org.fusesource.example</groupId> <artifactId>bundle-demo</artifactId> <packaging>bundle</packaging> <version>1.0-SNAPSHOT</version> ... </project>
To define a dependency on the preceding artifact, you would add the following dependency
element to a POM file:
<project ... > ... <dependencies> <dependency> <groupId>org.fusesource.example</groupId> <artifactId>bundle-demo</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> ... </project>
It is not necessary to specify the bundle
package type in the preceding dependency, because a bundle is just a particular kind of JAR file and jar
is the default Maven package type. If you do need to specify the packaging type explicitly in a dependency, however, you can use the type
element.