Chapter 3. Managing Fuse Online on OCP


After you install Fuse Online on OpenShift Container Platform (OCP) on-site, you can use Prometheus to monitor integration activity, and you can set up periodic Fuse Online backups, which you can use to restore Fuse Online environments. 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:

3.1. Monitoring Fuse Online integrations and infrastructure components with Prometheus

You can use Prometheus to monitor Fuse Online infrastructure components and Fuse Online integrations. You can also use Grafana dashboards to visualize the metrics gathered by Prometheus.

Important

Red Hat support for Prometheus is limited to the setup and configuration recommendations provided in Red Hat product documentation.

Grafana is a community-supported feature. Deploying Grafana to monitor Red Hat Fuse products is not supported with Red Hat production service level agreements (SLAs).

In addition to monitoring Fuse Online integrations, you can use Prometheus to monitor the metrics exposed by the following Fuse Online infrastructure components:

Syndesis Server
The syndesis-server component has been instrumented with Micrometer and exposes all of the JVM Micrometer metrics automatically by default. Additionally, syndesis-server exposes metrics about the REST API endpoints, such as request rate, error rate, and latency.
Syndesis Meta
The syndesis-meta component has been instrumented with Micrometer and exposes all of the JVM Micrometer metrics automatically by default. It also exposes metrics about its REST API endpoints.
Syndesis DB
Metrics for the Fuse Online Postgres database are exported using a third-party Prometheus exporter.
Integrations
The integration metrics are visible after an integration has been created and are exported by using the official JMX exporter, which exposes several JVM metrics by default. Additionally, integration metrics expose metrics that are specific to Apache Camel, such as message rate and error rate.

Prerequisites

  • Fuse Online 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.
  • You have admin access to the Fuse Online namespace.
  • 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.
  • A person with cluster admin access has deployed Prometheus and Grafana with the Application Monitoring operator (specifically, tag v1.1.6) by following these installation instructions.

Procedure

  1. In the Fuse Online namespace, set the monitoring-key=middleware label by using the following command:

    oc label namespace <fuse-online-namespace> monitoring-key=middleware
  2. Verify that your Fuse Online installation added the application monitoring configuration resources to the OpenShift cluster:

    1. In the OpenShift web console, go to the application-monitoring project and then open the prometheus-route URL.
    2. In the Prometheus console, go to the Status Targets page.

      If a Syndesis target is listed, then Fuse Online is configured for monitoring and you can skip to Step 4.

      If a Syndesis target is not listed, continue to Step 3.

  3. To expose Fuse Online for monitoring by a Prometheus instance that is installed in a separate OpenShift project, enable the ops add-on in the syndesis custom resource:

    1. Go to the Fuse Online namespace:

      OpenShift 4.xOpenShift 3.11
      1. In the OpenShift web console, go to the Fuse Online (syndesis) project.
      2. Select Catalog > Installed Operators and then click Fuse Online Operator.
      3. Click Syndesis CRD and then click app.
      4. Click Yaml to open the yaml file in the editor.
      1. Select Resources > Other Resources.
      2. From the dropdown menu, select the Syndesis resources type.
      3. For the app resource, click Actions and then select Edit YAML to open the yaml file in the editor.
    2. Edit the yaml file to set the Syndesis.Spec.Addons.Ops.Enable value to true by adding the follow lines:

      spec:
        addons:
          ops:
            enabled: true
    3. Save the file.
    4. Wait for the pod to restart.

      Note

      Fuse Online infrastructure resources are not available immediately after you run the install commands. You might need to wait before you can see the Fuse Online (Syndesis) targets in the Prometheus Targets page.

  4. To access Prometheus:

    1. In the OpenShift console for the project where the application monitoring operator is installed, open the list of routes.
    2. Next to the prometheus-route entry, click the hostname URL to open the Prometheus console.
    3. To view a list of the alert rules configured for Fuse Online infrastructure components, click the Alerts menu item.
  5. To access Grafana dashboards:

    1. In the OpenShift console for the project where the application monitoring operator is installed, open the list of routes.
    2. Next to the grafana-route entry, click the hostname URL to open the Grafana console.
    3. At the top of the Grafana console, click the dashboard selector.

      • For Fuse Online integrations, select Integration - Camel. This dashboard displays the standard metrics exposed by Apache Camel integration applications.
      • For Fuse Online infrastructure components, select one of the following infrastructure dashboards:

        Infrastructure - DB
        Displays metrics related to the Fuse Online Postgres instance.
        Infrastructure - JVM
        Displays metrics about the running JVM for the syndesis-meta or syndesis-server applications. Chose the application that you want to monitor from the Application drop down list at the top of the dashboard.
        Infrastructure - REST APIs
        Displays metrics relating to the Fuse Online infrastructure API endpoints, such as request throughput and latency. Choose the application that you want to monitor from the Application drop down list at the top of the dashboard.
  6. To access Prometheus Alertmanager:

    1. In the OpenShift console for the project where the application monitoring operator is installed, open the list of routes.
    2. Next to the alertmanager-route entry, click the hostname URL to open the Alertmanager console.

      If the Fuse Online infrastructure is healthy, the default view is empty.

      If any of the infrastructure components are unhealthy, any active alerts that have been fired are listed, along with the option to silence them.

Additional resources

For information about getting started with Prometheus, go to: https://prometheus.io/docs/prometheus/latest/getting_started/

3.2. Backing up a Fuse Online environment

You can configure Fuse Online to periodically back up:

  • The internal PostgreSQL database in which Fuse Online stores connections and integrations.
  • OpenShift resources that syndesis-operator creates and that are needed to run Fuse Online. This includes, but is not limited to, configuration maps, deployment configurations, and service accounts.

You can configure backups for a Fuse Online environment before you install Fuse Online or you can change the configuration of a Fuse Online environment to enable backups.

When Fuse Online is configured to perform backups, Fuse Online zips data into one file and uploads that file to an Amazon S3 bucket that you specify. You can apply a backup to a new Fuse Online environment (no connections or integrations defined) to restore the Fuse Online environment that was backed up.

Prerequisites

  • OCP is running on-site.
  • The oc client tool is installed and connected to the OCP cluster in which Fuse Online is or will be running.
  • 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 an AWS access key and an AWS secret key. For details about obtaining these credentials, see the AWS documentation for Managing Access Keys for IAM Users.
  • You know the AWS region where the S3 bucket that you want to upload to resides.
  • You know the name of the S3 bucket that you want to upload backups to.

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 the OpenShift project that is or will be running the Fuse Online environment for which you want to configure backups. For example:

    oc project my-fuse-online-project

  3. Create an OpenShift secret. In the command line:

    • Specify syndesis-backup-s3 as shown in the following command format.
    • Replace the AWS variables with your AWS access key, AWS secret key, AWS region in which the bucket resides, and the name of the bucket.

      Use the following command format to create the secret:

      oc create secret generic syndesis-backup-s3 \
      --from-literal=secret-key-id="my-aws-access-key" \
      --from-literal=secret-access-key="my-aws-secret-key" \
      --from-literal=region="aws-region" \
      --from-literal=bucket-name="aws-bucket-name"

      This secret must be present when the backup job is running.

  4. If Fuse Online is not yet installed, you must edit the default-cr.yml file to enable backups. See Editing the syndesis custom resource before installing Fuse Online. After Fuse Online is installed, there will be backup jobs according to the schedule that you specified in the custom resource.

    If Fuse Online is running, you must edit the syndesis custom resource:

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

      oc edit syndesis

    2. Add the following under spec::

      backup:
        schedule: my-backup-interval

      Replace my-backup-interval with the desired duration between backups. To determine how to specify the interval between backups, consult the following resources:

      • cron pre-defined schedules
      • cron intervals

        Do not specify the @ sign in front of the interval. For example, to configure daily backups, the custom resource would contain something like this:

        apiVersion: syndesis.io/v1beta1
        kind: Syndesis
        metadata:
          name: app
        spec:
          backup:
            schedule: daily
  5. Save the file.

    This adds a backup job to syndesis-operator.

Result

If Fuse Online was already running, there is now a Fuse Online backup job according to the schedule that you defined.

Next steps

If Fuse Online needs to be installed, edit the default-cr.yml file to enable any other desired features or set any other parameters. When the default-cr.yml file has all the settings that you want, install Fuse Online in the project that you specified when you created the OpenShift secret.

3.3. Restoring a Fuse Online environment

In a new Fuse Online environment, in which you have not yet created any connections or integrations, you can restore a backup of a Fuse Online environment. After you restore a Fuse Online environment, you must edit the restored connections to update their passwords. You should then be able to publish the restored integrations.

Prerequisites

  • OCP is running on-site.
  • The oc client tool is installed and connected to the OCP cluster in which you want to restore a Fuse Online environment.
  • 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.
  • There is a Fuse Online environment that was configured to periodically back up data and upload the data to Amazon S3.
  • The Fuse Online release number, for example, 7.6, is the same for the Fuse Online environment that was backed up and the Fuse Online environment in which you want to restore the backup.
  • You have permission to access the AWS bucket that contains the Fuse Online backups.
  • The Fuse Online environment in which you want to restore a backup is a new Fuse Online installation. In other words, there are no connections or integrations that you defined. If you want to restore Fuse Online in a project that has a Fuse Online environment with connections and integrations, then you must uninstall that Fuse Online environment and install a new Fuse Online environment.

Procedure

  1. Download the desired backup file from Amazon S3. Details for doing this are in the AWS documentation for How Do I Download an Object from an S3 Bucket?
  2. Extract the content of the zip file. For example, the following command line unzips the 7.6-2020-03-15-23:30:00.zip file and copies the content into the /tmp/fuse-online-backup folder:

    unzip 7.6-2020-03-15-23:30:00.zip -d /tmp/fuse-online-backup

  3. Decode the Fuse Online database, for example:

    base64 -d /tmp/fuse-online-backup/syndesis-db.dump > /tmp/fuse-online-backup/syndesis-db
  4. Switch to the OpenShift project that is running the new Fuse Online environment. For example, if the new Fuse Online environment is in the my-fuse-online-project, then you would invoke the following command:

    oc project my-fuse-online-project

    The remainder of this procedure assumes that you have switched to the project that contains the new Fuse Online environment.

  5. Obtain the name of the database pod.

    If the restored Fuse Online environment uses the provided, internal, PostgreSQL database, invoke the following command to obtain the name of the database pod:

    oc get pods -l deploymentconfig=syndesis-db -o jsonpath='{.items[*].metadata.name}'

    If the restored Fuse Online environment uses an external database, it is assumed that you know how to obtain the name of the pod for that database.

    In the remaining commands, where you see DATABASE_POD_NAME, insert the name of the database pod for the restored Fuse Online environment.

  6. Scale down the components that are accessing the database in any way.

    1. Scale down syndesis-operator so that other components can be scaled down:

      oc scale dc syndesis-operator --replicas 0

    2. Scale down the syndesis-server and syndesis-meta components:

      oc scale dc syndesis-server --replicas 0
      oc scale dc syndesis-meta --replicas 0

  7. Send the database backup file to the Fuse Online database pod:

    oc cp /tmp/fuse-online-backup/syndesis-db DATABASE_POD_NAME:/tmp/syndesis-db
  8. Open a remote shell session in the Fuse Online database pod:

    oc rsh DATABASE_POD_NAME

  9. Invoke the following commands to restore the Fuse Online database.

    If a psql command prompts for the database password, and the restored Fuse Online environment uses the provided, internal PostgreSQL database, you can find the password in the POSTGRESQL_PASSWORD environment variable in the syndesis-db deployment configuration. If the restored Fuse Online environment uses an external database, then it is assumed that you know the password.

    cd /tmp
    psql -c 'DROP database if exists syndesis_restore'
    psql -c 'CREATE database syndesis_restore'
    pg_restore -v -d syndesis_restore /tmp/syndesis-db
    psql -c "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'syndesis'"
    psql -c 'DROP database if exists syndesis'
    psql -c 'ALTER database syndesis_restore rename to syndesis'

    Fuse Online should now be restored. You can end the RSH session:

    exit

  10. Scale up the Fuse Online components:

    oc scale dc syndesis-operator --replicas 1

    Scaling syndesis-operator to 1 should bring up the other pods that were scaled down. However, if that does not happen, you can scale them up manually:

    oc scale dc syndesis-server --replicas 1
    oc scale dc syndesis-meta --replicas 1

  11. The server tries to start each restored integration but you need to update connections first. Consequently, ensure that the restored integrations are not running:

    1. Obtain the Fuse Online console route:

      echo "https://$(oc get route/syndesis -o jsonpath='{.spec.host}' )"
    2. Log in into the Fuse Online console with an OpenShift user account that has permission to install Fuse Online.
    3. Display the list of integrations and ensure that all integrations are stopped. If an integration is running, stop it.
  12. For each connection that has a password, you need to update the connection to have the correct password for this Fuse Online environment. The following steps show how to do this for the provided PostgresDB connection.

    1. In the OpenShift console for the project in which this restored Fuse Online environment is running, retrieve the password for the PostgresDB connection. In the syndesis-db deployment, the password is available in the environment variables.
    2. In the Fuse Online console, display the connections.
    3. Edit the PostgresDB connection.
    4. In the connection details for the PostgresDB connection, paste the retrieved password in the Password field.
  13. For each integration, confirm that there are no Configuration Required indicators. If there are, edit the integration to resolve the issues. When all steps in the integration are correct, publish the integration.

    If Fuse Online keeps rolling an integration back to a Stopped state right after the Build step, delete the deployment, ensure that no configuration is required, and try publishing the integration again.

    You can safely ignore the following message if you see it in the log:

    Error performing GET request to https://syndesis-my-fuse-online-project.my-cluster-url/api/v1/metrics/integrations

3.4. Upgrading Fuse Online on OCP

To upgrade Fuse Online on OCP on-site, download the latest Fuse Online release, obtain permission to upgrade Fuse Online from a cluster administrator, 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.6 to Fuse Online 7.7
  • From a Fuse Online 7.7 version to a newer Fuse Online 7.7 version

Prerequisites

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

    For earlier versions:

    • If you are running version 7.5 of Fuse Online on OCP, then you must upgrade to 7.6 and then you can upgrade to 7.7.
    • If you are running version 7.4 of Fuse Online on OCP, then you must upgrade to 7.5 and then you can upgrade to 7.6.
    • 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.
  • You have cluster administration permissions, which are required for the first five steps in this procedure.

Procedure

  1. A cluster administrator downloads the Fuse Online package and grants permission for a user to upgrade Fuse Online in a particular project:

    1. Download the package containing the Fuse Online installation scripts from the following location:

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

      Unpack the downloaded archive at a convenient location on your file system. The fuse-online-install-1.14 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.14

    3. Log in to OpenShift with a cluster administration account, for example:

      oc login -u admin -p admin

    4. Change to the OpenShift project in which Fuse Online needs to be upgraded, for example:

      oc project fuse-online-project

    5. Grant permission for upgrading Fuse Online in just this project. For example, the following command grants permission for upgrading Fuse Online to the developer user. After the cluster administrator runs this command, the developer user can upgrade Fuse Online in only this project, which is fuse-online-project, in this example:

      bash install_ocp.sh --grant developer

  2. The user who was granted permission to upgrade Fuse Online performs the upgrade:

    1. Log in to OpenShift, for example:

      oc login -u developer

    2. Switch to the project in which you want to upgrade Fuse Online, for example:

      oc project fuse-online-project

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

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

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

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

  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 the OpenShift project that is running the Fuse Online environment that you want to uninstall. For example:

    oc project my-fuse-online-project

  3. Delete Fuse Online infrastructure:

    oc delete syndesis app

  4. Delete syndesis-operator DeploymentConfig and ImageStream resources:

    oc delete dc/syndesis-operator
    oc delete is/syndesis-operator

3.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 fuse-online-project, enter the following command:

oc delete project fuse-online-project

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.