Red Hat Training

A Red Hat training course is available for Red Hat Fuse

Chapter 10. How to install or upgrade Fuse Online on OpenShift Container Platform

You can install and upgrade Fuse Online on OpenShift Container Platform (OCP) on premise. See the following topics for details:

10.1. Overview of steps for installing Fuse Online on OCP

To install Fuse Online on OCP on premise, the main steps are:

  1. A user with cluster administration permissions:

    1. Downloads the installation script.
    2. Registers a custom resource definition (CRD) at the cluster level.
    3. Grants permission for a user to install Fuse Online in their projects.
  2. A user who is granted permission to install Fuse Online:

    1. Ensures that all prerequisites are met.
    2. Decides how to install Fuse Online with regard to the OpenShift project to install into, the OpenShift route for Fuse Online, and the level of accessibility of OpenShift logs.
    3. Downloads the installation script.
    4. Invokes the installation script with the command that implements decisions.
    5. Confirms that Fuse Online is running.

10.2. Register a custom resource definition

To enable installation of Fuse Online, a cluster administrator registers a custom resource definition. The administrator needs to do this only once for the OpenShift cluster. The administrator also grants permission for installing Fuse Online to the appropriate users. Each user can then install Fuse Online in their projects.

Prerequisites

  • You must have cluster administration permissions.
  • You must be connected to the OCP cluster into which Fuse Online will be installed.

Procedure

  1. Download the Fuse Online installation script to the current local directory by invoking the following command:

    $ wget https://raw.githubusercontent.com/syndesisio/fuse-online-install/1.5/install_ocp.sh

  2. To verify that you are properly connected and can list custom resource definitions, invoke the following command:

    $ oc get crd

  3. To register the custom resource definition at the cluster level, invoke the following command:

    $ bash install_ocp.sh --setup

  4. Grant installation permission to each user who needs to install Fuse Online. For example, suppose you want to grant permission to an account with the user name developer. The following command grants permission to developer to install Fuse Online into any project that the developer account can access on the currently connected cluster:

    $ bash install_ocp.sh --grant developer --cluster

    Repeat this command for each user account that needs permission to install Fuse Online.

10.3. Decisions to make before you install Fuse Online on OCP

To correctly specify the Fuse Online installation command, decide on the answers to these questions:

  • Do you want to install Fuse Online into the current OpenShift project or do you want to specify the project into which you want to install Fuse Online in the command that you invoke to do the installation?

    The default is that the installation script installs Fuse Online into the current project.

    You can install Fuse Online into a project that you specify. If this project does not yet exist, then the script creates it. If this project exists then the installation script prompts you to confirm that it is okay to delete the project’s content. To continue, you must confirm. The installation script then deletes the project and re-creates it.

  • Do you want the installation script to calculate the OpenShift route by which Fuse Online can be reached or do you want to specify the OpenShift route in the installation command?

    The default is that the installation script calculates the route.

  • Do you want to be able to access OpenShift log information for Fuse Online integrations by clicking a link in the Fuse Online user interface?

    While you can always access OpenShift logs manually, you might want to enable direct access by means of a link in the Fuse Online user interface. The default is that the installation script does not enable this link. To enable this link, you specify the URL for your OpenShift console when you invoke the installation script.

10.4. Install Fuse Online on OCP

To install Fuse Online on OCP on premise, download the installation script, run it, and confirm that Fuse Online is installed.

Prerequisites

  • You are running OCP on premise.
  • You installed the oc client tool and it is connected to the OCP cluster in which you want to install Fuse Online.
  • A user with cluster administration permissions gave you permission to install Fuse Online in any project that you have permission to access in the cluster.
  • You decided whether to perform the default installation or specify options to customize the installation.

Procedure

  1. Download the Fuse Online installation script to the current local directory by invoking the following command:

    $ wget https://raw.githubusercontent.com/syndesisio/fuse-online-install/1.5/install_ocp.sh

  2. Log in to OpenShift with an account that has permission to install Fuse Online. For example:

    $ oc login -u developer -p developer

  3. Ensure that the current project is the project into which you want to install Fuse Online. To view the current project:

    $ oc project

  4. In the directory in which you downloaded the installation script, invoke the installation script:

    • To perform the default installation, invoke:

      $ bash install_ocp.sh

    • To specify installation options, you might invoke something like the following command, which specifies three options:

      $ bash install_ocp.sh \
          --project my-project \
          --route my-project.6a63.fuse-online.openshiftapps.com \
          --console https://console.fuse-online.openshift.com/console
      • --project specifies the name of the OpenShift project in which you want to install Fuse Online. You need to specify this option only when you want to install Fuse Online into an OpenShift project other than the current OpenShift project.
      • --route specifies the URL that your Fuse Online environment will have. This URL will be where you access your Fuse Online environment. This URL specifies the project in which you are installing Fuse Online followed by the domain that is specific to your OpenShift cluster.

        In other words, specify the project name followed by the hostname that is associated with the OpenShift route that is used to access Fuse Online. The DNS resolution of the specified hostname must point to the OpenShift Router.

      • --console specifies the full URL for your OpenShift console.

    To learn more about the installation script options, invoke the $ bash install_ocp.sh --help command.

  5. Confirm that installation was successful:

    1. Display the OpenShift OAuth proxy log-in page at https://openshift-route.

      If you specified the --route option when you ran the installation script, replace openshift-route with the route name that you specified. If you chose to let the installation script calculate the OpenShift route, then the script displays the calculated route near the end of its execution. Replace openshift-route with the value that the script provided.

    2. If you are not already logged in to the OpenShift console, its log-in page appears. Enter your OpenShift user name and password to log in.

    The Fuse Online home page appears either immediately or after you log in to the OpenShift console.

10.5. Expose APIs in 3scale for API Provider integrations

If you create an API provider integration, you might want to enable discovery of the API for that integration in 3scale. For Fuse Online environments that are installed on OCP, you can expose APIs by setting a server configuration environment variable.

The default behavior is that APIs are not exposed for automatic discovery in 3scale. Turning on 3scale service discovery applies to all API Provider integrations in your Fuse Online environment. You cannot choose which APIs are exposed.

When 3scale service discovery is turned on then the API is accessible only by means of a 3scale endpoint. That is, OCP does not create a route that would expose the API. Configuration in 3scale is required to expose the endpoint. For details, see Red Hat 3scale API Management, Service Discovery.

Prerequisites

Fuse Online is installed on OCP on premise.

Procedure

Edit the syndesis-server DeploymentConfig object to set the CONTROLLERS_EXPOSE_VIA3SCALE environment variable to true. To do this, enter the following command on one line:

$ oc patch dc syndesis-server -p '{"spec":{"template":{"spec":{"containers":[{"name":"syndesis-server","env":[{"name":"CONTROLLERS_EXPOSE_VIA3SCALE","value":"true"}]}]}}}}'

10.6. Monitor Fuse Online integrations on OCP with Prometheus

When you install Fuse Online on OCP on premise, the environment includes an instance of Prometheus in the OpenShift project in which you installed Fuse Online. You can access the Prometheus dashboard to monitor Fuse Online integrations.

Prerequisites

  • You are running OCP on premise.
  • Fuse Online is installed in an OpenShift project.

Procedure

  1. Log in to the OpenShift console.
  2. Open the project in which you installed Fuse Online.
  3. In the left pane of the OpenShift console, select Applications > Routes.
  4. Click the syndesis-prometheus Hostname URL to open the Prometheus dashboard in a new browser tab or window.

Additional resources

10.7. Upgrade Fuse Online on OCP

To upgrade Fuse Online on OCP on premise, download the latest Fuse Online release and run the update script.

From time to time, fresh application images, which incorporate patches and security fixes, are released for Fuse Online. You are notified of these updates through Red Hat’s errata update channel. You can then upgrade your Fuse Online images.

The upgrade procedure is the same whether you want to upgrade from Fuse Online 7.1 to Fuse Online 7.2, or from a Fuse Online 7.2 version to a newer Fuse Online 7.2 version.

Prerequisites

  • You installed and are running version 7.1 of Fuse Online on OCP on premise. OR, you installed and are running a version of 7.2 of Fuse Online on OCP on premise and you want to upgrade to fresh application images.
  • You installed the oc client tool and it is connected to the OCP cluster in which Fuse Online is installed.
  • A user with cluster administration permissions gave you permission to install or upgrade Fuse Online in any project that you have permission to access in the cluster.

Procedure

  1. Download the latest Fuse Online release to the current local directory by invoking the following command:

    $ wget https://github.com/syndesisio/fuse-online-install/archive/1.5.tar.gz

  2. Uncompress the downloaded file.
  3. Change to the directory that contains the extracted archive. For example:

    $ cd fuse-online-install-1.5

  4. Log in to OpenShift with an account that has permission to upgrade Fuse Online. For example:

    $ oc login -u developer

  5. Invoke the following command, which returns the name of the current project, to ensure that the current project is the project where Fuse Online is installed:

    $ oc project

    If you need to switch to the project where Fuse Online is installed then invoke the following command with the name of the OpenShift project that contains Fuse Online:

    $ oc project project-name

  6. To check which version you are about to upgrade to, run the update script with the --version option, as follows:

    $ bash update_ocp.sh --version

  7. Invoke the update script as follows:

    $ bash update_ocp.sh

    To learn more about the script, invoke $ bash update_ocp.sh --help.

    During and after an infrastructure upgrade, existing integrations continue to run with the older versions of Fuse Online libraries and dependencies.

  8. Upgrade Fuse Online integrations that are running as follows:

    1. In Fuse Online, select the integration that you want to upgrade.
    2. Select Edit.
    3. Select Publish to republish the integration.

    Republishing the integration forces a rebuild that uses the latest Fuse Online dependencies.

10.8. Uninstall Fuse Online from an OCP project

You can uninstall Fuse Online from an OCP project without deleting the project nor anything else in that project. After uninstalling Fuse Online, integrations that are running continue to run but you can no longer edit or republish them.

Prerequisite

  • You have an OCP project in which Fuse Online is installed.
  • You exported any integrations that you might want to use in some other OpenShift project in which Fuse Online is installed. If necessary, see Export integrations.

Procedure

Invoke the following command:

$ oc delete syndesis app

This command deletes the Fuse Online infrastructure.

10.9. Delete an OCP project that contains Fuse Online

Deleting an OpenShift project in which Fuse Online is installed deletes everything in the project. This includes all integrations that have been defined as well as all integrations that are running.

Prerequisites

  • You have an OCP project in which Fuse Online is installed.
  • You exported any integrations that you might want to use in some other OpenShift project in which Fuse Online is installed. If necessary, see Export integrations.

Procedure

Invoke the oc delete project command. For example, to delete an OpenShift project whose name is fuseonline, enter the following command:

$ oc delete project fuseonline