Chapter 10. Patching Fuse Integration Services

10.1. Patching Overview

You might need to perform one or more of the following tasks to bring the Fuse Integration Services (FIS) product up to the latest patch level:

Section 10.2, “Patch Application Dependencies”
Update the dependencies in your project POM file, so that your application uses patched versions of the Maven artifacts.
Section 10.3, “Patch the FIS Templates”
Update the FIS templates on your OpenShift server, so that new projects created with the FIS templates use patched versions of the Maven artifacts.
Section 10.4, “Patch the FIS Images”
Update the FIS images on your OpenShift server, so that new application builds are based on patched versions of the Fuse base images.

10.2. Patch Application Dependencies

In the context of Fuse Integration Services (FIS), applications are built entirely using Maven artifacts downloaded from the Red Hat Maven repositories. Hence, to patch your application, all that you need to do is to edit your project’s POM file, changing the Maven dependencies to use the appropriate FIS patch version.

It is important to upgrade all of the Maven dependencies for FIS together, so that your project uses dependencies that are all from the same patch version. The FIS project consists of a carefully curated set of Maven artifacts that are built and tested together. If you try to mix and match Maven artifacts from different FIS patch levels, you could end up with a configuration that is untested and unsupported by Red Hat. The easiest way to avoid this scenario is to use a Bill of Materials (BOM) file in Maven, which defines the versions of all the Maven artifacts supported by FIS. When you update the version of a BOM file, you automatically update the versions for all the FIS Maven artifacts in your project’s POM.

The POM file that is generated by a FIS Maven archetype or by a FIS template in OpenShift has a standard layout that uses a BOM file and defines the versions of certain required plug-ins. It is recommended that you stick to this standard layout in your own applications, because this makes it much easier to patch and upgrade your application’s dependencies.

10.2.1. Update Dependencies in a Spring Boot Application

The following code fragment shows the standard layout of a POM file for a Spring Boot application in FIS, highlighting some important property settings:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project ...>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- maven plugin versions -->
    <fabric8.maven.plugin.version>3.1.80.redhat-000004</fabric8.maven.plugin.version>

    <!-- configure the versions you want to use here -->
    <fabric8.version>2.2.170.redhat-000004</fabric8.version>
    <spring-boot.version>1.4.1.RELEASE</spring-boot.version>

    <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
    <maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-project-bom-camel-spring-boot</artifactId>
        <version>${fabric8.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  ...
</project>

Notice how the dependencyManagement section of the POM references the fabric8-project-bom-camel-spring-boot BOM file, which defines the versions for all of the Spring Boot Maven artifacts in FIS. When it comes to patching or upgrading the application, the following version settings are important:

fabric8.version
Defines the version of the fabric8-project-bom-camel-spring-boot BOM file. By updating the BOM version to a particular patch version, you are effectively updating all of the FIS Maven dependencies as well.
fabric8.maven.plugin.version
Defines the version of the fabric8-maven-plugin plug-in. The fabric8-maven-plugin plug-in is tightly integrated with each version of FIS. Hence, whenever you patch or upgrade FIS, it is essential to upgrade the fabric8-maven-plugin plug-in to the matching version.

10.2.2. Update Dependencies in a Karaf Application

The following code fragment shows the standard layout of a POM file for a Karaf application in FIS, highlighting some important property settings:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project ...>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      <!-- configure the versions you want to use here -->
    <fabric8.version>2.2.170.redhat-000004</fabric8.version>
    <karaf.plugin.version>4.0.8.redhat-000017</karaf.plugin.version>

    <!-- maven plugin versions -->
    ...
    <fabric8.maven.plugin.version>3.1.80.redhat-000004</fabric8.maven.plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- fabric8 bom must be before fabric8 bom -->
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-project-bom-fuse-karaf</artifactId>
        <version>${fabric8.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  ...
</project>

Notice how the dependencyManagement section of the POM references the fabric8-project-bom-fuse-karaf BOM file, which defines the versions for all of the Karaf Maven artifacts in FIS. When it comes to patching or upgrading the application, the following version settings are important:

fabric8.version
Defines the version of the fabric8-project-bom-fuse-karaf BOM file. By updating the BOM version to a particular patch version, you are effectively updating all of the FIS Maven dependencies as well.
fabric8.maven.plugin.version
Defines the version of the fabric8-maven-plugin plug-in. The fabric8-maven-plugin plug-in is tightly integrated with each version of FIS. Hence, whenever you patch or upgrade FIS, it is essential to upgrade the fabric8-maven-plugin plug-in to the matching version.

10.2.3. Available BOM Versions

The following table shows the BOM versions corresponding to different patch releases of JBoss Fuse.

Table 10.1. JBoss Fuse Releases and Corresponding BOM Version

JBoss Fuse ReleaseBOM VersionFabric8 Maven Plug-In Version

JBoss Fuse 6.3.0 GA

2.2.170.redhat-000004

3.1.80.redhat-000004

JBoss Fuse 6.3.0 Roll Up 1

2.2.170.redhat-000010

3.1.80.redhat-000010

JBoss Fuse 6.3.0 Roll Up 2

2.2.170.redhat-000013

3.1.80.redhat-000013

JBoss Fuse 6.3.0 Roll Up 4

2.2.170.redhat-000019

3.1.80.redhat-000019

JBoss Fuse 6.3.0 Roll Up 5

2.2.170.redhat-000022

3.1.80.redhat-000022

JBoss Fuse 6.3.0 Roll Up 6

2.2.170.redhat-000023

3.1.80.redhat-000023

JBoss Fuse 6.3.0 Roll Up 7

2.2.170.redhat-000024

3.1.80.redhat-000024

JBoss Fuse 6.3.0 Roll Up 8

2.2.170.redhat-000030

3.1.80.redhat-000030

To upgrade your application POM to a specific JBoss Fuse patch release, set the fabric8.version property to the corresponding BOM version, and the fabric8.maven.plugin.version property to the corresponding Fabric8 Maven plug-in version.

To discover the latest available versions, you can check the Red Hat Maven repository directly:

10.3. Patch the FIS Templates

You must update the FIS templates to the latest patch level, to ensure that new template-based projects are built using the correct patched dependencies. Patch the FIS templates as follows:

  1. You need administrator privileges to update the FIS templates in OpenShift. Log in to the OpenShift Server as an administrator, as follows:

    oc login URL -u ADMIN_USER -p ADMIN_PASS

    Where URL is the URL of the OpenShift server and ADMIN_USER, ADMIN_PASS are the credentials of an administrator account on the OpenShift server.

  2. Install the patched FIS templates. Enter the following commands at a command prompt:

    BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/6.3-GA
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/karaf2-camel-amq-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/karaf2-camel-log-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/karaf2-camel-rest-sql-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/karaf2-cxf-rest-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-amq-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-config-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-drools-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-infinispan-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-rest-sql-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-teiid-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-camel-xml-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-cxf-jaxrs-template.json
    oc replace --force -n openshift -f ${BASEURL}/quickstarts/spring-boot-cxf-jaxws-template.json
    Note

    The BASEURL points at the relevant branch of the Git repository that stores the quickstart templates and it will always have the latest templates at HEAD. So, any time you run the preceding commands, you will get the latest version of the templates.

10.4. Patch the FIS Images

The FIS images are updated independently of the main Fuse product. If any patches are required for the FIS images, updated images will be made available on the standard FIS image streams and the updated images can be downloaded from the Red Hat image registry, registry.access.redhat.com. Fuse Integration Services provides the following image streams (identified by their OpenShift image stream name):

  • fis-java-openshift
  • fis-karaf-openshift

These image streams are normally installed on the openshift project on the OpenShift server. To check the status of the FIS images on OpenShift, login to OpenShift as an administrator and enter the following command:

$ oc get is -n openshift
NAME                                  DOCKER REPO                                                                    TAGS                               UPDATED
fis-java-openshift                    registry.access.redhat.com/jboss-fuse-6/fis-java-openshift        2.0-2,2.0-3,latest + 1 more...     3 days ago
fis-karaf-openshift                   registry.access.redhat.com/jboss-fuse-6/fis-karaf-openshift       latest,2.0,2.0-2 + 1 more...       3 days ago
...

You can now update each image stream one at a time:

oc import-image -n openshift fis-java-openshift
oc import-image -n openshift fis-karaf-openshift
Note

You can also configure your Fuse applications so that a rebuild is automatically triggered whenever a new FIS image becomes available. For details, see the section Setting Deployment Triggers in the OpenShift Container Platform 3.5 Developer Guide.