Chapter 2. Managing Fuse Online on OCP

After you install Fuse Online on OpenShift Container Platform (OCP) on-site, you can configure it to make APIs for API provider integrations discoverable in Red Hat 3scale or to increase Fuse Online internal storage capacity. You can also add sample data to a Fuse Online environment.

As needed, you can upgrade Fuse Online, uninstall Fuse Online, or delete an OCP project that contains Fuse Online.

See the following topics for details:

2.1. Configuring Fuse Online to enable 3scale discovery of APIs

If you create an API provider integration, you might want to enable discovery of the API for that integration in Red Hat 3scale. The default behavior is that APIs are not exposed for automatic discovery in 3scale.

For Fuse Online environments that are installed on OCP, you can enable 3scale discovery of APIs by updating the Fuse Online syndesis custom resource. Your update must provide a URL for a 3scale user interface, which turns on 3scale service discovery. When you enable discovery, it applies to only the OpenShift project that you are connected to when you update the resource.

Turning on 3scale service discovery means that:

  • The default behavior is that 3scale publishes API provider integrations. When 3scale publishes an API provider integration:

    • Fuse Online does not provide an external URL for an API provider integration that is running.
    • The API is accessible only through 3scale. Configuration in 3scale is required to expose the endpoint. For details, see Red Hat 3scale API Management, Service Discovery.
  • The creator of an API provider integration can disable 3scale discovery for that integration. In other words, each API provider integration creator can choose whether that integration’s API is discoverable.

Prerequisites

  • Fuse Online is installed on OCP on-site.
  • The oc client tool is installed and it is connected to the OCP cluster in which Fuse Online is installed.
  • You have permission to install Fuse Online in the project for which you want to enable discovery of APIs.

Procedure

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

    $ oc login -u developer -p developer
  2. Switch to an OpenShift project in which Fuse Online is running. You are enabling discovery for only this project. For example:

    $ oc project my-fuse-online-project
  3. Invoke the oc patch command on the syndesis custom resource and provide the URL for the 3scale user interface. In the following sample command, replace 3scale-url-here with the actual URL for your 3scale user interface:

    oc patch syndesis app --type='merge' -p '{"spec":{"components":{"server":{"features":{"managementUrlFor3scale":"3scale-url-here"}}}}}'
  4. Optional. To confirm that discovery is turned on for the project that you switched to, invoke the following command:

    oc describe dc/syndesis-server

    When discovery is turned on, the output from this command shows that the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable is set to the URL that you specified in the oc patch command.

Results

The oc patch command updates the syndesis custom resource. The update sets the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable to the specified URL for the 3scale user interface. This change to the syndesis custom resource triggers the syndesis-operator, which is responsible for installing Fuse Online, to redeploy syndesis-server. In the OpenShift project that you switched to, the new default behavior is that APIs are exposed for discovery in 3scale.

Do not edit the syndesis-server DeploymentConfig object to set the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable. This does not work because the syndesis-operator reverts your change. The syndesis-operator ensures that Fuse Online is deployed only and always according to the syndesis custom resource.

2.2. Configuring Fuse Online to disable 3scale discovery of APIs

If you followed the procedure described in Configuring Fuse Online to enable 3scale discovery of APIs, each API provider integration creator can choose whether that integration’s API is discoverable. At some point, you might want to reconfigure the default behavior, which is that integration APIs are not discoverable in 3scale, To do this, update the Fuse Online syndesis custom resource to reset the management URL for 3scale to blank. Then republish any API provider integrations that were published with discoverable APIs.

Prerequisites

  • Fuse Online is installed on OCP on-site.
  • You have permission to install Fuse Online in the project in which you want to disable discovery.
  • The oc client tool is installed and it is connected to the OCP cluster in which Fuse Online is installed.
  • 3scale discovery was enabled in an OpenShift project as described in Configuring Fuse Online to enable 3scale discovery of APIs.

Procedure

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

    $ oc login -u developer -p developer
  2. Switch to an OpenShift project in which 3scale discovery was enabled. For example:

    $ oc project my-fuse-online-project
  3. Invoke the oc patch command on the syndesis custom resource and set the URL for the 3scale user interface to the empty value:

    oc patch syndesis app --type='merge' -p '{"spec":{"components":{"server":{"features":{"managementUrlFor3scale":""}}}}}'

    This command updates the syndesis custom resource. The update disables the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable. This change to the syndesis custom resource triggers the syndesis-operator, which is responsible for installing Fuse Online, to redeploy syndesis-server. The new default behavior is that APIs are no longer exposed for discovery in 3scale.

    Do not edit the syndesis-server DeploymentConfig object to set the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable. This does not work because the syndesis-operator reverts your change. The syndesis-operator ensures that Fuse Online is deployed only and always according to the syndesis custom resource.

  4. Republish any API provider integration that had discovery enabled and that was created in the project in which you just disabled discovery.

    In other words, you do not need to republish an API provider integration if you disabled discovery of that integration’s API while discovery was enabled for the project in which the API provider integration was created.

Results

APIs for API provider integrations that were created in the relevant OpenShift project are no longer discoverable in 3scale.

When Fuse Online publishes (or republishes) an API provider integration that is in the relevant project, Fuse Online provides an external URL for invoking the API provider integration operations.

2.3. Adding sample data to a Fuse Online environment running on OCP

To help new users learn how to create integrations with Fuse Online, you can add sample data to your Fuse Online environment. The sample data includes:

  • The PostgresDB connection, which provides access to a SQL database that contains records about tasks. New users can create integrations that use this connection one or more times to query, add, modify, or delete records.
  • The To Do app, which enables users to confirm that the AMQ to REST API sample integration works as expected.

Alternatively, rather than adding sample data to a Fuse Online environment, any user can request a Fuse Online evaluation environment, which contains the sample data. The new user can then create sample integrations by following instructions in Fuse Online Sample Integration Tutorials.

Prerequisites

  • Fuse Online 7.5 is installed and running on OCP on-site.
  • The oc client tool is installed 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 Fuse Online in any project that you have permission to access in the cluster.
  • You have a Red Hat developer account for which you know your user name and password. The installation script prompts you for these credentials so it can authenticate you against https://developers.redhat.com. For details about creating an account, see Accessing and Configuring the Red Hat Registry.

Procedure

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

    $ oc login -u developer -p developer

  2. Ensure that the current project is the project in which Fuse Online is running. To view the current project:

    $ oc project

  3. Edit the syndesis custom resource:

    1. Invoke the following command, which typically opens the resource in an editor:

      oc edit syndesis
    2. Add the following lines to the end of the resource:

      spec:
        demoData: true
        addons:
          todo:
            enabled: true
    3. Save the resource.

      Saving this change to the syndesis custom resource triggers the syndesis-operator, which is responsible for installing Fuse Online, to redeploy syndesis-server.

  4. Confirm that the redeployed server provides the sample data:

    1. Display the Fuse Online console in a browser.
    2. In the left navigation panel, click Connections.
    3. Confirm that the PostgresDB connection appears.

2.4. Upgrading Fuse Online on OCP

To upgrade Fuse Online on OCP on-site, 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 for the following upgrades is the same:

  • From Fuse Online 7.4 to Fuse Online 7.5
  • From a Fuse Online 7.5 version to a newer Fuse Online 7.5 version

Prerequisites

  • You installed and are running version 7.4 of Fuse Online on OCP on-site. OR, you installed and are running a version of 7.5 of Fuse Online on OCP on-site and you want to upgrade to fresh application images.

    If you are running version 7.3 of Fuse Online on OCP, then you must upgrade to 7.4 and then you can upgrade to 7.5.

    If you are running version 7.2 of Fuse Online on OCP, then you must upgrade to 7.3.

    If you are running version 7.1 of Fuse Online on OCP, then you must upgrade to 7.2.

  • 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 package containing the Fuse Online installation scripts from the following location:

    https://github.com/syndesisio/fuse-online-install/releases/tag/1.8

    Unpack the downloaded archive at a convenient location on your file system. The fuse-online-install-1.8 directory contains the scripts and supporting files for upgrading Fuse Online.

  2. Change to the directory that contains the extracted archive. For example:

    $ cd fuse-online-install-1.8

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

    $ oc login -u developer

  4. 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

  5. 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

  6. 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.

  7. 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.

2.5. Uninstalling 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.

2.6. Deleting 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 Exporting 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

2.7. Configuring Fuse Online to increase storage capacity

The syndesis custom resource configures a Fuse Online environment by defining values for a number of parameters. One such parameter is volumeCapacity, which determines the amount of storage that is available for the internal PostgreSQL database in which Fuse Online stores data for connectors, connections, integrations, activity, and settings. The default setting for volumeCapacity is 1Gi. This is sufficient for most Fuse Online environments.

Fuse Online configuration happens when you run the install_ocp.sh script, which installs Fuse Online in an OpenShift project. While it is possible to increase the internal database volume capacity, you can do this only in a Fuse Online environment that has no data that you want to keep. In other words, you cannot increase the volumeCapacity setting for a Fuse Online environment that contains connections and integrations.

Prerequisites

  • Fuse Online 7.5 is installed and running on OCP on-site.
  • The oc client tool is installed and it is connected to the OCP cluster in which you want to install Fuse Online with an increased volume capacity.
  • 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.
  • In a Fuse Online environment that you have been running, you encountered Fuse Online server errors and Red Hat technical support has determined that you need to install a new Fuse Online environment with a database volume capacity that is larger than the default.
  • If you want to increase Fuse Online internal storage capacity in an OpenShift project that is already running Fuse Online, you must do the following before you start the procedure desribed here:

    1. Export all Fuse Online integrations that you want to keep.
    2. Delete all Fuse Online integrations.

Procedure

  1. If you did not already download the package that contains the Fuse Online installation scripts, download it now from the following location:

    https://github.com/syndesisio/fuse-online-install/releases/tag/1.8

  2. Unpack the downloaded archive at a convenient location on your file system. The fuse-online-install-1.8 directory contains the scripts and supporting files for installing Fuse Online.
  3. Log in to OpenShift with an account that has permission to install Fuse Online. For example:

    $ oc login -u developer -p developer
  4. Ensure that the current project is the project into which you want to install Fuse Online. To view the current project:

    $ oc project
  5. In the directory in which you downloaded the installation script, run it to obtain the syndesis custom resource, which you will edit in a subsequent step.

    $ bash install_ocp.sh
  6. Obtain the syndesis custom resource as a YAML file:

    oc get syndesis app -o yaml > syndesis.yaml
  7. Edit syndesis.yaml to increase the volumeCapacity parameter setting. For example:

    apiVersion: "syndesis.io/v1alpha1"
    kind: "Syndesis"
    metadata:
      name: "app"
    spec:
      components:
        db:
          resources:
            volumeCapacity: 10Gi
  8. Save the edited syndesis resource with a new name, for example, custom-syndesis.yaml.

    OpenShift copies the new volumeCapacity value to a PersistentVolumeClaim object.

    Warning

    Do not invoke the next command in a Fuse Online environment in which there is any data, such as connections and integrations, that you do not want to delete. The command in the next instruction removes data for all Fuse Online objects in this Fuse Online environment.

  9. Remove Fuse Online data by running:

    oc delete syndesis app
  10. Create a new syndesis custom resource that configures the increased volume capacity. In the command line, specify the .yaml file in which you updated the volumeCapacity setting. For example:

    oc create -f custom-syndesis.yaml

Next steps

In the Fuse Online environment in which you increased internal storage capacity, import integrations, configure connections in the imported integrations, and publish the integrations.