Installing and Operating Fuse Online on OpenShift Container Platform

Red Hat Fuse 7.7

Install, configure, and upgrade Fuse Online, and export/import integrations for CI/CD pipelines

Red Hat Fuse Documentation Team

Abstract

Information and instructions for installing, managing, and operating Fuse Online on OpenShift Container Platform in a customer-managed environment on-site, in the cloud, or in a hybrid cloud.

Preface

You can install and operate Fuse Online on-site on OpenShift Container Platform (OCP). When Fuse Online is running on-site, additional features are available beyond the features that are provided when Fuse Online is running on OpenShift Dedicated.

The term on-site means a customer-managed environment; Red Hat is not managing the OpenShift environment. A customer-managed environment can be on-premise, in the cloud, or in a hybrid cloud.

See the following topics for details:

Chapter 1. Installing Fuse Online on OCP

Installation of Fuse Online requires a cluster administrator to register the Fuse Online custom resource definition and grant installation permission to the appropriate user(s). The user who installs Fuse Online must determine whether to install a default Fuse Online environment or a customized Fuse Online environment. For a customized Fuse Online environment, editing of the default custom resource file is required.

Each installation of Fuse Online is referred to as a Fuse Online environment. In a given OpenShift project, there can be exactly one Fuse Online environment. Each Fuse Online environment has its own URL. In a single OpenShift cluster, there can be multiple Fuse Online environments.

Important

The Fuse Online installation process requires access to registry.redhat.io, which is the Red Hat catalog for container images. Fuse Online does not support or test the use of external container registries, custom registries, or registries in disconnected environments.

The following topics provide details for installing Fuse Online:

1.1. Overview of the steps required to install Fuse Online on OCP

To install Fuse Online on OCP on-site, a cluster administrator must perform some tasks and then a user who has permission to install Fuse Online in a particular OpenShift project performs some tasks and runs the installation script. The following diagram shows the workflow:

Workflow for installing Fuse Online on OCP. See outline after this image.

Outline for installing Fuse Online on OCP workflow image

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

  1. A user with cluster administration permissions:

    1. Downloads the installation script and related files.
    2. Registers a custom resource definition (CRD) at the cluster level, by using OpenShift oc client tool commands.
    3. Grants permission for one or more users to install Fuse Online in their projects, by using OpenShift oc client tool commands.
  2. For each OpenShift project in which you want to install Fuse Online, a user who is granted permission to install Fuse Online:

    1. Decides whether to install a default Fuse Online environment or a customized Fuse Online environment. A customized Fuse Online environment enables one or more add-on features and/or implements one or more custom configuration settings.
    2. Downloads the installation script and related files.
    3. Optional. Edits the default-cr.yml file (provided in the Fuse Online download package) if a customized Fuse Online environment is wanted.
    4. Optional. Creates an OpenShift secret if an external database for persisting connection and integration definitions is wanted.
    5. Invokes the installation script.
    6. Confirms that Fuse Online is running.

For each OpenShift project in which Fuse Online is to be installed, the cluster administrator must grant permission to a user to install Fuse Online in that particular project.

To install a default Fuse Online environment, the user with permission to install Fuse Online downloads and runs the installation script. No other steps are required.

1.2. Registering a custom resource definition for deploying Fuse Online resources

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. Then, for each project in which the administrator wants Fuse Online to be installed, the administrator grants an appropriate user permission to install Fuse Online in that project.

Prerequisites

  • You must have cluster administration permissions.
  • You installed the oc client tool and it is connected to the OCP cluster into which Fuse Online will be installed.
  • On your OCP environment, at least three persistent volumes are available for use by Fuse Online.

Procedure

  1. Download the package that contains the Fuse Online installation script from the following location:

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

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

    oc login -u admin -p adminpwd

  4. Confirm that you are properly connected by running the following command, which lists any custom resource definitions that are already registered in this cluster.

    oc get crd

    You are properly connected if there is no error message.

  5. Register the custom resource definition at the cluster level by switching to the fuse-online-install-1.14 directory and invoking the following command:

    bash install_ocp.sh --setup

  6. Confirm that registration was successful by running the following command again:

    oc get crd

    The output list of registered custom resource definitions should include syndesis.

  7. In each project in which you want Fuse Online to be installed, grant installation permission to a user. For each project:

    1. Change to the project in which you want a user to be able to install Fuse Online. For example:

      oc project fuse-online-project

    2. Grant a user permission to install Fuse Online in that project. For example, the following command grants permission to install Fuse Online to developer user. After running this command, the developer user can install Fuse Online in the current project, which is fuse-online-project in this example:

      bash install_ocp.sh --grant developer

      Repeat these two commands for each OpenShift project in which you want to grant permission for Fuse Online installation. A single user can install Fuse Online in more than one project in the cluster. To enable this, change to another project and specify the same user, for example:

      oc project another-fuse-online-project
      bash install_ocp.sh --grant developer

Result

The syndesis custom resource definition is registered in the cluster.

Next steps

Users with permission to install Fuse Online must decide whether to install a default Fuse Online environment or a customized Fuse Online environment.

1.3. When editing the default custom resource file is required before installing Fuse Online

The Fuse Online download package includes the default-cr.yml file, which specifies the default settings for configurable Fuse Online environment add-on features and parameter settings. Installation of Fuse Online uses the default-cr.yml file to create the syndesis custom resource, which controls the Fuse Online environment’s configuration.

You need to edit the default-cr.yml file before you install Fuse Online only if you want the installed Fuse Online environment to:

  • Use a URL that you specify for the OpenShift route by which the Fuse Online console can be reached. The default is that the installation process calculates this route.
  • Run the Camel K runtime engine in place of the Spring Boot runtime for Camel integrations. The Camel K runtime is a Technology Preview feature.
  • Enable access to Knative resources. Knative resource access is a Technology Preview feature.
  • Use an external database to store connection and integration definitions. The default is that the environment uses an internal database.
  • Increase the amount of internal storage that is available for persisting connection and integration definitions. The default, which is 1Gi, is sufficient for most Fuse Online environments.

To configure a Fuse Online environment for any one of these behaviors, you MUST edit the default-cr.yml file before you install Fuse Online. In other words, you cannot change the configuration of an installed Fuse Online environment to implement any of these behaviors. Also, after you install a Fuse Online environment that is configured for any of these behaviors, you cannot change that behavior in the installed environment.

1.4. Descriptions of custom resource attributes that configure Fuse Online

In addition to the custom resource attributes that you can specify only before installation, there are a number of custom resource attributes that you can change before or after installation.

Table 1 provides a brief description of configurable custom resource settings and indicates whether you can change them only before installation. To achieve the Fuse Online configuration that you want, use the information in this table to determine how you need to change the default-cr.yml file before installation or how you want to change the syndesis custom resource after installation. Then follow the appropriate procedure:

Important

Camel K runtime, access to Knative resources, and data virtualization are Technology Preview features only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Table 1.1. Configurable custom resource settings

Feature/SettingWhen you can set thisSpecification

Camel K runtime (Technology Preview)

Additional information about the Camel K runtime follows this table.

Set only before installation

addons:
  camelk:
    enabled: true

Enhanced activity tracking

Additional information about enhanced activity tracking follows this table.

Set only before installation

addons:
  jaeger:
    enabled: true

External database

Additional information about using an external database follows this table.

Set only before installation

spec:
  components:
    database:
      externalDbURL: postgresql://custom-postgres:5432
      user: db-user-name
      name: db-name


Replace custom-postgres:5432 with the host name and port for a PostgreSQL database.
Replace db-user-name with the name of a user account that can access that database.
Replace db-name with the name of the database.

Internal storage capacity for connections and integrations.

Ignored if you also specify an external database.

Additional information about increasing internal storage follows this table.

Set only before installation

spec:
  components:
    database:
      resources:
        volumeCapacity: 1Gi
        volumeName: my-volume


Replace 1Gi with the amount of storage you need. The default is 1Gi.

Replace my-volume with the name of the volume to use for internal storage. This parameter is optional.

Knative resource access
(Technology Preview)

To enable access to Knative resources, you must also enable the Camel K runtime.

Set only before installation

addons:
  camelk:
    enabled: true
  knative:
    enabled: true

OpenShift route for accessing Fuse Online console

Set only before installation

spec:
  routeHostname: project.route.com


Replace project.route.com with the OpenShift route by which the Fuse Online console can be reached.
For example: north-project.6a63.fuse-online.openshiftapps.com

3scale discovery

Expose APIs for Fuse Online API provider integrations so that they are discoverable by Red Hat 3scale.

More information: Configuring Fuse Online to enable 3scale discovery of APIs.

Set before or after installation

components:
    server:
      features:
        managementUrlFor3scale: https://url-for-3scale


Specify the URL for your 3scale user interface.

Backups

Additional setup steps are described in Backing up a Fuse Online environment.

Set before or after installation

spec:
  backup:
    schedule: interval


Replace interval with the desired duration between backups. Use cron utility format for intervals and predefined schedules. Do not specify the @ sign in front of the interval.

Data virtualization
(Technology Preview)
Additional information about the data virtualization feature follows this table.

Set before or after installation

addons:
  dv:
    enabled: true
      resources:
        memory: 1024Mi

Integration limit

Specify the maximum number of running integrations. The default, 0, does not limit the number of running integrations.

Set before or after installation

components:
    server:
      features:
        integrationLimit: 0

Maven

Specify external Maven repositories that your Fuse Online environment needs to access.

Set before or after installation

components:
    server:
      features:
        mavenRepositories:
          customRepo1: https://customRepo1
          customRepo2: https://customRepo2


Replace customRepo with the name of a repository.
For each repository, specify its URL.

Memory

Increase the default amount of memory that is available to one or more components. Each component defines its own memory requirement, which means that each pod has a limit on the amount of memory it is assigned.

The database component is the internal database that stores connection and integration definitions.

The meta component provides the business logic, such as the connectors, which the server loads.

Set before or after installation

components:
  database:
    resources:
      memory: 270Mi
  meta:
    resources:
      memory: 300Mi
  server:
    resources:
      memory: 810Mi

Monitoring

See also: Monitoring Fuse Online integrations on OCP with Prometheus.

Set before or after installation

addons:
  ops:
    enabled: true

Public REST API

Additional set-up steps are described in Exposing Fuse Online public REST API endpoints for use by external tools.

Set before or after installation

addons:
  publicApi:
    enabled: true
    routeHostname: public-syndesis.192.168.64.63.nip.io


Set routeHostname to the public address for invoking Fuse Online REST API endpoints. Your cluster setup determines the public address that you need to specify. In the previous example, the route host name is valid for a minishift cluster.

ToDo app
For testing sample integrations.

Set before or after installation

addons:
  todo:
    enabled: true

About add-on features and configuration settings

  • Camel K runtime engine (Technology Preview)

    The Apache Camel K runtime speeds up turnaround times when deploying and redeploying integrations on OCP. For example, performance can improve from 1-2 minutes to a few seconds. When Camel K is installed as the runtime engine, it replaces the Spring Boot runtime for Camel integrations.

    Apache Camel K is a lightweight cloud integration platform based on the Apache Camel framework for Enterprise Integration Patterns. Camel K runs natively on Kubernetes, OpenShift, and Knative, and is specifically designed and optimized for serverless and microservice architectures. Camel K provides automation and performance optimizations when running integrations in the cloud. Camel K uses the Kubernetes Operator SDK to deploy integrations, for example, it automatically creates services and routes on OCP.

    Camel K is a subproject of the Apache Camel open source community. For more details, see the Apache Camel K GitHub web site.

    The following limitations apply when the Camel K runtime is installed with Fuse Online:

    • Fuse Online extensions are not supported by the Camel K runtime.
    • Extensions are not displayed in the Fuse Online user interface under Customizations.

    For installation information, see Installing Fuse Online on OCP.

  • Data virtualization (Technology Preview)

    Data virtualization lets a Fuse Online developer integrate data from multiple heterogeneous sources to create a virtual database image that is deployable on OpenShift. For details, see the connecting to virtual databases documentation.

  • Enhanced activity tracking

    If you run the install_ocp.sh script to install Fuse Online, the default behavior is that enhanced activity tracking is enabled in the Fuse Online environment. If you use OperatorHub, then the recommendation is that you enable enhanced activity tracking before you install Fuse Online. The user interface guides you in doing this.

  • External database for persisting connections and integrations

    A default installation of Fuse Online provides an internal PostgreSQL database that Fuse Online uses to persist connection and integration definitions. You can choose to use an external PostgreSQL database instead, such as Amazon RDS for PostgreSQL.

  • Internal storage capacity

    The default setting of 1Gi is sufficient for most Fuse Online environments. It is expected that you would increase this setting for a new Fuse Online installation only upon the recommendation of Red Hat technical support. That is, you have been running another Fuse Online environment in which you encountered Fuse Online server errors and Red Hat technical support determined that you need to install a new Fuse Online environment with a database volume capacity that is larger than the default.

    To increase Fuse Online internal storage capacity in an OpenShift project that is already running Fuse Online, you must first uninstall Fuse Online. See Uninstalling Fuse Online from an OCP project.

1.5. Editing the default custom resource file before installing Fuse Online

To install a default Fuse Online environment, you do not need to edit the default custom resource file. See Installing Fuse Online on OCP.

To install a customized Fuse Online environment, you must edit the default-cr.yml file before you install Fuse Online. This file is in the Fuse Online download package. There are some custom resource settings that you can specify only before Fuse Online installation. See When editing the default custom resource is required before installation.

There are other custom resource settings that you can specify before or after Fuse Online installation. See Descriptions of custom resource attributes that configure Fuse Online.

The Fuse Online installation process uses the settings that you specify in the default-cr.yml file to create the syndesis custom resource. The syndesis custom resource settings determine the configuration of the installed Fuse Online environment.

Prerequisites

  • You plan to install and run Fuse Online on OCP on-site.
  • The oc client tool is installed and it is connected to the OCP cluster in which you plan 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.

Procedure

  1. If you did not already download the package that contains the Fuse Online installation scripts:

    1. Download it now from the following location:

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

    2. 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 installing Fuse Online.
  2. Log in to OpenShift with an account that has permission to install Fuse Online. For example:

    oc login -u developer -p developer

  3. Open the fuse-online-install-1.14/default-cr.yml file in an editor.
  4. Edit the default-cr.yml file so that it enables the features and sets the parameters that you want. To determine what you need to specify, see Descriptions of custom resource attributes that configure Fuse Online.
  5. Save the default-cr.yml file.

Result

The default-cr.yml file contains the configuration specifications for a new Fuse Online installation.

Next steps

If you edited the default-cr.yml file to specify an external database then follow the instructions in Creating a secret for installing Fuse Online with an external database before you install Fuse Online. Otherwise, you are ready to follow the instructions in Installing Fuse Online on OCP.

1.6. Creating a secret for installing Fuse Online with an external database

If you want to install a Fuse Online environment that uses an external database to persist connection and integration definitions, create an OpenShift secret, syndesis-global-config, before you install Fuse Online.

Prerequisites

  • You edited the default-cr.yml file to specify the use of an external database to persist connection and integration definitions.
  • Fuse Online is not yet installed.
  • The oc client tool is installed and it is connected to the OCP cluster in which you plan 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.

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. Create and save a resource file, for example, my-fuse-onling-secret-cr.yml) that contains the following:

    apiVersion: v1
    kind: Secret
    metadata:
      name: syndesis-global-config
      namespace: my-fuse-online-project
      type: Opaque
      data:
        POSTGRESQL_PASSWORD: base64-encoded-value

    Replace my-fuse-online-project with the name of the OpenShift project in which you plan to install the Fuse Online environment for which you are specifying an external database.

    Replace base64-encoded-value with a base64-encoded value that Fuse Online will use as the password for accessing the external database.

    For information about OpenShift secrets, see Secrets.

  3. Add the secret to the cluster, for example:

    oc apply -f my-fuse-online-secret-cr.yml

Result

In the cluster, the syndesis-global-config secret is available to a Fuse Online environment that is installed with a custom resource that specifies an external database.

Next step

Follow the instructions in Installing Fuse Online on OCP.

1.7. Running the script that installs Fuse Online on OCP

The Fuse Online installation script installs a Fuse Online environment according to the specifications in the default-cr.yml file, which is in the Fuse Online download package. To install a default environment, no editing of that file is required. To install a customized environment, you must edit the default-cr.yml file before you run the installation script.

Prerequisites

Procedure

  1. If you did not already download the package that contains the Fuse Online installation scripts:

    1. Download it from the following location:

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

    2. 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 installing Fuse Online.
  2. Log in to OpenShift with an account that has permission to install Fuse Online. For example:

    oc login -u developer -p developer

  3. Switch to the OpenShift project into which you want to install Fuse Online, for example:

    oc project my-fuse-online-project

    Alternatively, when you run the installation script, you can specify, for example, --project my-fuse-online-project.

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

    bash install_ocp.sh

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

  5. Confirm that the syndesis custom resource that syndesis-operator used to install Fuse Online contains exactly the content that you want:

    1. Invoke the following command to display the syndesis custom resource content:

      oc describe syndesis/app

    2. Check the content of the custom resource.

      If it does not contain all of your updates, then there was probably a syntax error in the custom resource. You must uninstall Fuse Online and try again to define a valid custom resource. See Uninstalling Fuse Online from an OCP project.

  6. Confirm that installation was successful:

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

      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.

      If you edited the default-cr.yml file to specify the routeHostname for Fuse Online, replace openshift-route with the route that you specified.

    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.

Chapter 2. Changing the configuration of a Fuse Online environment

After you install Fuse Online on OpenShift Container Platform (OCP) on-site, you can change the configuration of the Fuse Online environment.

See the following topics for details:

2.1. Fuse Online configuration changes allowed after installation

After you install Fuse Online on OpenShift Container Platform (OCP) on-site, you can change its configuration to enable/disable some features or change some configuration settings. The following table lists the features and settings that you can change, the effect of the change, and where to find instructions for making the change.

When changes to the syndesis custom resource cause redeployment of syndesis-server, OpenShift creates a new server deployment. It takes a maximum of one to two minutes until the new server is ready. During this time, the Fuse Online console is not usable. Integrations that are running continue to run while a new server is being deployed. When the new deployment is ready, the new server loads the state of the integrations. You can use the Fuse Online console again when the syndesis-server pod status is Running and refreshing the Fuse Online console displays values for integrations, connections, messages, and uptime.

Important

Data virtualization is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Table 2.1. Features and settings that you can change

Feature/SettingEffect of changingInformation

3scale discovery

Redploys syndesis-server

Configuring Fuse Online to enable 3scale discovery of APIs

Backups

Adds a backup job to syndesis-operator

Backing up a Fuse Online environment

Data virtualization
(Technology Preview)

Creates a new syndesis-dv pod and updates the Fuse Online console

Descriptions of custom resource attributes that configure Fuse Online

Monitoring

Installs new OpenShift resources

Monitoring Fuse Online integrations on OCP with Prometheus

Public Fuse Online REST API endpoints

Creates syndesis-public-oauthproxy pod

Exposing Fuse Online public REST APIs for use by external tools

Sample Todo app for testing integrations

Creates new todo pod

Adding a sample app to a Fuse Online environment running on OCP

External Maven repository specifications

Redeploys syndesis-server

Descriptions of custom resource attributes that configure Fuse Online

Memory available to Fuse Online components

Redeploys component with changed memory

Number of running integrations allowed

Redeploys syndesis-server

2.2. General procedure for changing Fuse Online configuration

For a Fuse Online environment that is installed on OCP, you can change its configuration by updating its syndesis custom resource. After you save your changes, OpenShift updates syndesis-operator with your updates if they are syntactically correct. A syntax error prevents the update.

While editing the syndesis custom resource, ensure that you do not specify an invalid setting that is syntactically correct. The syndesis-operator will use the updated syndesis custom resource even if a syntactically correct setting is invalid. If you do specify an invalid setting, you learn about it only after OpenShift completes the update. During the update, OpenShift deletes invalid settings.

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 change Fuse Online configuration.
  • You consulted Descriptions of custom resource attributes that configure Fuse Online to learn which configuration changes are allowed after installation and how to update the syndesis custom resource for the configuration changes you want to make.

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 whose configuration you want to change. For example:

    oc project my-fuse-online-project

  3. Optional. Create a backup copy of the current settings in the syndesis custom resource, just in case you update and save incorrect content. For example, invoking the following command saves a backup in the syndesis_app_backup.yml file:

    oc get syndesis app -o yaml > syndesis_app_backup.yml

  4. Invoke the following command to open the syndesis custom resource in an editor:

    oc edit syndesis

  5. Edit the syndesis custom resource as needed.
  6. Save the resource.
  7. Wait two or three minutes, and then confirm that syndesis-operator was able to use your updates to the syndesis custom resource:

    1. Invoke the following command to display the content of the syndesis custom resource:

      oc describe syndesis/app

    2. Check the content.

      If the syndesis custom resource does not contain the settings that you need, edit it again to specify valid settings.

Results

Most changes to the syndesis custom resource trigger syndesis-operator to redeploy Fuse Online (syndesis-server). This means that OpenShift creates a new server deployment. It takes a maximum of one to two minutes until the new server is ready. During this time, the Fuse Online console is not usable. Integrations that are running continue to run while a new server is being deployed. When the new deployment is ready, the new server loads the state of the integrations. You can use the Fuse Online console again when:

  • The syndesis-server pod status is Running.
  • Refreshing the Fuse Online console displays values for integrations, connections, messages, and uptime.

Some changes to the syndesis custom resource update the Fuse Online configuration but do not require redeployment of syndesis-server. For example:

  • When you update the syndesis custom resource to specify backups, it is a few seconds before the backup job is in place.
  • Updating a Fuse Online configuration to enable data virtualization requires updates to the Fuse Online console user interface and deployment of the data virtualization pod. While the console updates typically require a maximum of ten seconds, how long it takes to deploy the data virtualization pod depends on a number of variable things. To confirm that a Fuse Online environment enables data virtualization, do the following:

    1. In the Fuse Online console, in the left panel, click Data.
    2. On the Data Virtualizations page, you should be able to add data views.

The effect of each configuration change is described in Fuse Online configuration changes allowed after installation.

2.3. 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. When you enable discovery, you must provide a URL for a 3scale user interface.

To configure Fuse Online to enable 3scale discovery of APIs before you install Fuse Online, see Descriptions of custom resource attributes that configure Fuse Online.

After installation, you can enable discovery by updating the syndesis custom resource. Instructions for doing this are in this topic. 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. Edit the syndesis custom resource:

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

      oc edit syndesis

    2. Edit the resource by setting managementUrlFor3scale to the URL for your 3scale user interface. The result looks like this:

      spec:
        components:
          server:
            features:
              managementUrlFor3scale: https://3scale-admin.apps.mycluster.com
    3. Save the resource.
  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 custom resource.

Results

This change to the syndesis custom resource triggers 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 syndesis-operator reverts your change. The syndesis-operator ensures that Fuse Online is deployed only and always according to the syndesis custom resource.

2.4. 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, For example, you might want to edit and test an API provider integration in Fuse Online. To do this, update the Fuse Online syndesis custom resource so that the line that specifies the managementUrlFor3scale key and value is commented out. This disables discovery by 3scale. 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. Edit the syndesis custom resource:

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

      oc edit syndesis

    2. Edit the resource by inserting a hash sign (#) at the beginning of the line that specifies the managementUrlFor3scale key and value. This makes the line a comment, which disables discovery. The result should look like this:

      spec:
        components:
          server:
            features:
            #  managementUrlFor3scale: https://3scale-admin.apps.mycluster.com
    3. Save the resource.

      This updates the syndesis custom resource. The update removes the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable. This change to the syndesis custom resource triggers 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 remove the setting of the OPENSHIFT_MANAGEMENT_URL_FOR3SCALE environment variable. This does not work because 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.5. Adding a sample app to a Fuse Online environment running on OCP

To help new users learn how to create integrations with Fuse Online, you can add a sample app to your Fuse Online environment. The ToDo app enables users to confirm that the AMQ to REST API sample integration works as expected.

To configure Fuse Online to have the ToDo app before you install Fuse Online, see Descriptions of custom resource attributes that configure Fuse Online.

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

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.
  • 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. Switch to the project in which Fuse Online is running. For example:

    oc project my-fuse-online-project

  3. Edit the syndesis custom resource:

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

      oc edit syndesis

    2. Ensure that the following lines are in the resource. Edit as needed.

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

      Saving this change to the syndesis custom resource triggers syndesis-operator to create a new todo pod.

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

Chapter 4. How to invoke Fuse Online public REST API endpoints

When you are running Fuse Online on OCP, each Fuse Online environment can expose public REST API endpoints. External Continuous Integration/Continuous Delivery (CI/CD) tools can invoke these endpoints to operate on the resources that are in that Fuse Online environment.

In each Fuse Online environment, an OpenShift administrator must expose Fuse Online public REST API endpoints before external tools can invoke those endpoints. The command that invokes an API endpoint specifies the URL for the Fuse Online environment on which the endpoint operates, a secret token, and an authorization token.

See the following topics for details:

4.1. Exposing Fuse Online public REST APIs for use by external tools

When you are running Fuse Online on OCP on-site, you might want to use an external tool to copy Fuse Online integrations from one Fuse Online environment to another Fuse Online environment. An external CI/CD tool might be a Jenkins job, an Ansible playbook, a cron-based shell script, or something else. For example, an Ansible playbook can export an integration from a Fuse Online development environment and import it into a Fuse Online testing environment.

To enable this, you must expose Fuse Online public REST API endpoints for each Fuse Online environment. In other words, you must repeat the procedure here in each OpenShift project in which Fuse Online is installed.

Prerequisites

  • You have an OCP project in which Fuse Online is installed.
  • The oc client tool is installed and it is connected to the OCP cluster in which Fuse Online is installed.
  • You use an external CI/CD tool and you want it to copy marked integrations from one Fuse Online environment to another.
  • Cluster administration privileges are required to execute the syndesis-operator grant command. A user who has administrative privileges for the OpenShift project, but not cluster administration privileges, can execute the other commands.

Procedure

  1. Log in to OpenShift with an account that has cluster administration privileges. For example:

    oc login -u admin -p admin

    While cluster administration privileges are required for only the syndesis-operator grant command, this procedure assumes that a cluster administrator is performing all steps.

  2. Switch to an OpenShift project in which Fuse Online is running. You are exposing the public API in only this project. For example:

    oc project fuse-online-north

  3. Grant roles to the syndesis-public-oauthproxy service account. Your OpenShift project uses this service account to run an OAuth proxy service. Specify a user account that has cluster administration privileges. For example:

    syndesis-operator grant --user developer

    This command creates and assigns a cluster role and cluster role binding to the syndesis-public-oauthproxy service account. The ClusterRoleBinding specifies the name of the OpenShift project in which you are exposing the API, which is fuse-online-north in this example:

    • ClusterRole: syndesis-auth-delegator
    • ClusterRoleBinding: syndesis-fuse-online-north-auth-delegator
  4. Create a client service account and grant it permission to access the Fuse Online public API:

    1. Create an OpenShift service account with a name that you choose. For example, the following command creates the cicd-client service account:

      oc create serviceaccount cicd-client

      Commands that invoke public API endpoints use this account to access the public API. Also, you will need this service account to obtain a secret token, which must be specified in calls to API endpoints. This is described in Obtaining a secret token for calling a REST API endpoint.

    2. Grant the client service account permission to access the Fuse Online public API. If fuse-online-north is the name of the OpenShift project in which Fuse Online is installed, and if cicd-client is the name of the service account that you created for accessing the API service, then you would invoke the following command:

      oc policy add-role-to-user edit system:serviceaccount:fuse-online-north:cicd-client`
  5. Edit the syndesis custom resource:

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

      oc edit syndesis

    2. Edit the resource so that it enables the public API and specifies the Fuse Online environment’s public address for invoking endpoints as the setting of routeHostname. (If edits to the default-cr.yml file, which was used to install Fuse Online, enabled the public API and specified the route hostname for endpoints, you will not need to edit the resource.)

      Your cluster setup determines the public address that you need to specify. For details, see the OpenShift documentation for routes. In the following example, the route host name is valid for a minishift cluster.

      spec:
        addons:
          publicApi:
            enabled: true
            routeHostname: public-syndesis.192.168.64.63.nip.io
    3. Save (or close) the resource.

      Saving the syndesis custom resource triggers syndesis-operator, which is responsible for installing Fuse Online, to deploy the public API OAuth proxy service.

      If you did not need to edit the syndesis custom resource, then the public API OAuth proxy service has already been deployed. This is probably because publicApi was enabled and its route specified in the default-cr.yml file that was used to install Fuse Online.

Result

In OpenShift, you can now see:

  • A pod for the syndesis-public-oauthproxy deployment configuration.
  • A syndesis-public-oauthproxy service.
  • A syndesis-public-api route.

In the OpenShift project in which you performed this procedure, external CI/CD tools can use Fuse Online public REST API endpoints to export or import Fuse Online integrations.

Next steps

4.2. Description of base URL for Fuse Online public REST API endpoints

The base URL for Fuse Online public REST API endpoints is something like this:

https://public-syndesis.192.168.64.42.nip.io/api/v1/public

The first part of the base URL is different for each Fuse Online environment. When you create the OpenShift application that runs the Fuse Online public OAuth proxy that enables access to public REST API endpoints, you specify the public address of your Fuse Online environment. This address is the first part of the base URL for calling endpoints that operate in that Fuse Online environment. For example:

https://public-syndesis.192.168.64.42.nip.io

The second part of the base URL is the same for all Fuse Online environments:

/api/v1/public

The Fuse Online public REST API provides endpoints that operate on three resources:

  • /integrations are the integrations that are in the Fuse Online environment that is identified in the base URL.
  • /connections are the connections that are in the Fuse Online environment that is identified in the base URL.
  • /environments is the set of environment labels that are in the Fuse Online environment that is identified in the base URL.

4.3. Obtaining a secret token for calling a public REST API endpoint

A command that calls a Fuse Online public REST API endpoint must specify a secret token. This token is for the service account that you created when you exposed the Fuse Online public REST API in a given Fuse Online environment.

Prerequisites

  • You are running Fuse Online on OCP on-site.
  • You exposed the public REST API that is provided by a Fuse Online environment in which you want to invoke endpoints.

Procedure

  1. Obtain the names of the secret tokens for the service account that you created when you exposed the public REST API for this Fuse Online environment. For example, if cicd-client is the name of the service account, you would invoke the following command:

    oc describe serviceaccount cicd-client

    This displays a list of information about the cicd-client service account including the names of its two tokens, which looks something like this:

    Tokens:      cicd-client-token-gxb25
                 cicd-client-token-gxdnv
  2. Display the content of either one of the tokens. For example:

    oc describe secret cicd-client-token-gxb25

    This displays a list of information, including a Data section that displays token: followed by a long series of random characters. This is one of the service account’s two secret tokens.

  3. Copy the secret token, paste it into a file, and save it.

Result

In a curl command, specification of the secret token looks like this:

-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJzeW5kZXNpcyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJzeW5kZXNpcy1jZC1jbGllbnQtdG9rZW4tMnZjNmwiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoic3luZGVzaXMtY2QtY2xpZW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNjUxMjYxNGMtMmYwMS0xMWU5LTk3OWEtNDI1YWNlMzY3MTcyIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OnN5bmRlc2lzOnN5bmRlc2lzLWNkLWNsaWVudCJ9.uKsri0JSKJDbgHoQwAhBJSNuWKwJgjegf2QlrCkhxVssSK1zIMZQaF9P5a4R7ZcWRnrZ_345UTqxYVeRlfHWVH0PqBkD-n7PAS9dcKJIFdS1jUHOmL1FTGgc3YW-bz1SlWT93tvK1EhorZ4_-EBfXhSAP4Uumi5qAg3_QUTMDstq233NSwBKYtFOw3Pp1ys3p3y0hcaiLMimeCH60vR4iWvptqqzc5QDigHiPySZNWxs_5awZlwdoIDvR-nSj690aC-49UKFgyEEdzdFU4bI2W4hOyDyhN9fVaIAZQKeJUrJBU-lnFTHI_NAd2OwzOEBpWZuj31Za5w9fU4kf4UDGA'

Next step

Copy the token from your saved file into a command that calls a public REST API endpoint in the given Fuse Online environment.

4.4. How to find integration IDs

In a command that invokes a Fuse Online public REST API endpoint that operates on only a particular integration, you must specify the ID of the integration that you want the endpoint to operate on. Specify one of the following:

  • The integration’s name

    You must specify it exactly as it appears in the Fuse Online console, for example, timer-to-log. If the integration name has any spaces or special characters, then you must specify HTML escape characters.

  • The internal integration ID

    This ID is in the Fuse Online console URL when you view an integration’s summary. To view an integration’s summary, in the left navigation panel, click Integrations. In the list of integrations, click the entry for the integration whose ID you need.

    With the integration summary visible in the browser, you would see something like this at the end of the URL: /integrations/i-Lauq5ShznJ4LcuWwiwcz. This integration’s ID is i-Lauq5ShznJ4LcuWwiwcz.

4.5. Format for specifying curl commands to invoke Fuse Online public endpoints

A curl command that calls a Fuse Online public REST API endpoint has the following format:

curl [options] \
     -H "Content-Type: <media-type>" \
     -H "SYNDESIS-XSRF-TOKEN: awesome" \
     -H `Authorization: Bearer <token>` \
     <base-url><endpoint> \
     [--request <HTTP-method>] \
     [-d <data>] \
     [-o <filename>]

Table 4.1. curl command options

OptionDescription

[options]

Specify curl options that you choose.

<media-type>

For the export and import endpoints, specify multipart/form-data. For all other endpoints, specify application/json.

<token>

Specify a secret token for the OpenShift service account that you created when you exposed the public REST API.

<base-url>

Specify the base URL for the Fuse Online environment that has the integration, connection, or environment label, that you want the endpoint to operate on.

<endpoint>

Specify the endpoint that you want to call.

[--request <HTTP-method>]

Optionally, specify the HTTP method, for example, --request POST.

[-d <data>]

Optionally, depending on the endpoint that is being called, specify arguments that the endpoint requires. For example, to change an integration’s environment label to test, you would specify -d `test`

[-o <filename>]

Optionally, if you need to specify the name of a file that contains output, specify the -o curl option with the name of a file, for example, -o export.zip.

The following curl command invokes the Fuse Online public API endpoint that marks an integration for one or more environments that you specify:

curl -v -k -L -H "Content-Type: application/json" -H "SYNDESIS-XSRF-TOKEN: awesome" -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJzeW5kZXNpcyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJzeW5kZXNpcy1jZC1jbGllbnQtdG9rZW4tMnZjNmwiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoic3luZGVzaXMtY2QtY2xpZW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNjUxMjYxNGMtMmYwMS0xMWU5LTk3OWEtNDI1YWNlMzY3MTcyIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OnN5bmRlc2lzOnN5bmRlc2lzLWNkLWNsaWVudCJ9.uKsri0JSKJDbgHoQwAhBJSNuWKwJgjegf2QlrCkhxVssSK1zIMZQaF9P5a4R7ZcWRnrZ_345UTqxYVeRlfHWVH0PqBkD-n7PAS9dcKJIFdS1jUHOmL1FTGgc3YW-bz1SlWT93tvK1EhorZ4_-EBfXhSAP4Uumi5qAg3_QUTMDstq233NSwBKYtFOw3Pp1ys3p3y0hcaiLMimeCH60vR4iWvptqqzc5QDigHiPySZNWxs_5awZlwdoIDvR-nSj690aC-49UKFgyEEdzdFU4bI2W4hOyDyhN9fVaIAZQKeJUrJBU-lnFTHI_NAd2OwzOEBpWZuj31Za5w9fU4kf4UDGA'
https://public-syndesis.192.168.64.42.nip.io/api/v1/public/integrations/timer-to-log/tags -d '["test","staging"]' --request PUT

In the sample curl command:

  • The URL at the end of the command identifies the Fuse Online environment whose endpoint you are invoking.
  • timer-to-log indicates that you are marking the timer-to-log integration for the specified environments.
  • Specification of test and staging marks the timer-to-log integration for those environments.

Chapter 5. Using external tools to export/import Fuse Online integrations for CI/CD

When you are running Fuse Online on OCP on-site, you might have Continuous Integration/Continuous Deployment (CI/CD) pipelines that you want to act on certain integrations. Implementing this requires the completion of these tasks:

  • In the Fuse Online console, mark integrations for CI/CD pipelines.
  • In OpenShift, expose the Fuse Online public API.
  • Use external tools to invoke Fuse Online public API endpoints that export and import integrations.

See the following topics for details:

5.1. About marking integrations for CI/CD

When you are running Fuse Online on OCP on-site, to identify an integration for pipelines, mark the integration for a CI/CD environment that you specify. This applies a time-stamped label to the integration. Backend CI/CD Fuse Online public APIs use the label and its timestamp to filter integrations to find an integration that a pipeline needs to act on.

For example, suppose that in Fuse Online you mark an integration for the test1 environment. You can then invoke the Fuse Online public API export endpoint to export integrations that have the test1 environment label. The endpoint packages test1 integrations into an export file and returns that file. To copy test1 integrations to a Fuse Online test environment, you would invoke the public API import endpoint and provide the file that contains the exported test1 integrations.

Now suppose that you iteratively update and publish an integration that you previously marked for the test1 environment. You now have a new version of the integration and you want to export the updated version to the test1 environment. You must mark the integration again, even though it is already marked for the test1 environment. Marking the integration again updates the timestamp on the test1 environment label. This indicates to external tools that the integration has been updated and it is ready to be exported.

To mark an integration again, that is, to refresh the timestamp on an environment label that is already assigned to an integration, start the procedure for Marking integrations for CI/CD. In the CI/CD dialog, click Save since the checkbox for the desired environment should already be selected.

5.2. Marking an integration for CI/CD

When you are running Fuse Online on OCP on-site, to identify an integration for pipelines, mark the integration for a CI/CD environment that you specify. This applies a label to the integration.

Prerequisite

You have an OCP project in which Fuse Online is installed.

Procedure

  1. In the Fuse Online navigation panel on the left, click Integrations.
  2. In the list of integrations, at the right of the entry for the integration that you want to mark, click More Options to display a popup menu and click Manage CI/CD.
  3. In the dialog that appears, do one or more of the following:

    • If the environment for which you want to mark this integration already appears, select the checkbox to the left of that environment.
    • If the environment for which you want to mark this integration is already selected, leave it selected.
    • If you need to create a label for an environment, then click Manage CI/CD, which displays a dialog for creating new environment labels. Create the label that you need, and then return to this procedure to mark the integration.

    Fuse Online applies selected environment label(s) to the integration. You can apply any number of environment labels to an integration.

  4. Click Save.

Result

Fuse Online labels the integration for release in the selected environment. Backend APIs can filter integrations to find the integrations that have, for example, the test1 label.

Next step

You must expose the Fuse Online public API endpoints before pipelines can act on integrations that are marked for a particular environment. See Exposing Fuse Online public REST APIs for use by external tools.

5.3. Managing environment labels for CI/CD

In the Fuse Online console, you can create, change, or remove CI/CD environment labels. CI/CD environment labels are tags that you can apply to integrations to identify them for CI/CD pipelines.

Prerequisites

  • Fuse Online is running on OCP on-site.
  • External tools use Fuse Online environment labels to identify integrations for CI/CD pipelines.

Procedure

  1. In Fuse Online, in the left navigation panel, click Integrations.
  2. In the upper right, click Manage CI/CD.
  3. On the Manage CI/CD page:

    • To create a CI/CD environment label:

      1. Click Add New.
      2. In the Add Tag Name dialog, in the Tag Name input field, enter a name for a new environment label, for example, test1.
      3. Click Save. On the Manage CI/CD page, there is a new entry for the environment label that you just added.
    • To change a CI/CD environment label:

      1. In the list of CI/CD environment labels, in the entry for the label that you want to change, click Edit.
      2. In the Edit Tag dialog, change the name as needed.
      3. Click Save to see the updated name in the list of environment labels. Fuse Online applies the updated name to every integration that is already marked with the environment label that you changed.
    • To delete a CI/CD environment label:

      1. In the list of CI/CD environment labels, in the entry for the label that you want to delete, click Remove.
      2. In the confirmation dialog, click Yes. Fuse Online deletes the environment label and also removes the deleted environment label from any integrations that have been marked with it.

Next step

Mark integrations with new environment labels. See Marking an integration for CI/CD.

5.4. Invoking the Fuse Online public API export endpoint

Before you can use external tools to copy Fuse Online integrations from one Fuse Online environment to another, the following tasks must be completed:

  • In Fuse Online, an integration that you want to export for a CI/CD pipeline must be marked for a particular environment. See Marking an integration for CI/CD.

    There is an exception to this requirement. When you want to export all integrations from a Fuse Online environment in one export operation, it does not matter whether or not an integration has already been marked for a particular environment.

  • You exposed the Fuse Online public API. See Exposing Fuse Online public API endpoints for external tools.

Endpoint for exporting integrations for a particular environment

To export integrations that have been marked for a particular environment, Fuse Online provides the following GET method endpoint:

/public​/integrations​/{env}​/export.zip

Replace {env} with a CI/CD environment label that you already created. When an integration is marked for a particular environment, Fuse Online maintains a timestamp that indicates when it was marked. The default behavior is that the endpoint exports an integration only if it has not already been exported since it was marked. For example, to export integrations that have been marked for the test1 environment, the endpoint is:

/public/integrations/test1/export.zip

This endpoint exports each integration that has the test1 environment label and that meets one of the following conditions:

  • The integration was marked for the test1 environment since the last time that it was exported.
  • The integration was marked for the test1 environment and it has never been exported.

The endpoint packages the integrations in the export.zip file and returns that file.

If no integration that is marked for the specified environment has been marked since the last time that the integration was exported, then the endpoint returns an HTTP 204 response to indicate that there is nothing to return.

Endpoint for exporting all integrations tagged for the specified environment

You can invoke the export endpoint so that it exports all integrations in a Fuse Online environment that are tagged with an environment label that you specify. The endpoint exports the integration whether or not it was marked for the specified environment since the last time the integration was exported. This makes it easy to duplicate all integrations that have a particular tag in another Fuse Online environment. To do this:

  • You must have already created the environment label. See Marking an integration for CI/CD.
  • Add the ignoreTimestamp=true option to the invocation of the export endpoint.

For example:

/public/integrations/test1/export.zip?ignoreTimestamp=true -o export.zip

Endpoint for exporting all integrations

You can invoke the export endpoint so that it exports all integrations in one Fuse Online environment. This makes it easy to duplicate all integrations in another Fuse Online environment. To do this:

For example:

/public/integrations/{env}/export.zip?all=true

Replace {env} with a CI/CD environment label. The endpoint assigns the specified environment label to each integration that is not already marked for that environment.

When you add the all=true option, you must also explicitly specify that you want the exported integrations to be packaged in the export.zip file. For example:

/public/integrations/test1/export.zip?all=true -o export.zip

This invocation of the endpoint:

  • Marks each integration for the test1 environment.
  • Returns all integrations in the export.zip file.

    If you do not specify the -o export.zip option, then the endpoint returns a file whose name is export.zip?all=true.

Custom headers required by export endpoint

A command that invokes the export endpoint must specify these custom headers exactly as follows:

  • -H "Content-Type: multipart/form-data"
  • -H "SYNDESIS-XSRF-TOKEN: awesome"

    The Fuse Online public API requires this header to authenticate the request.

  • -H 'Authorization: Bearer <token>'

    Replace <token> with the secret token that you copied into a file when you created the OpenShift service account that is used to expose the Fuse Online public API.

Sample curl command that exports integrations

Following is an example of a curl command that invokes a Fuse Online API endpoint that exports integrations:

curl -v -k -L -H "Content-Type: multipart/form-data" -H "SYNDESIS-XSRF-TOKEN: awesome" -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJzeW5kZXNpcyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJzeW5kZXNpcy1jZC1jbGllbnQtdG9rZW4tMnZjNmwiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoic3luZGVzaXMtY2QtY2xpZW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNjUxMjYxNGMtMmYwMS0xMWU5LTk3OWEtNDI1YWNlMzY3MTcyIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OnN5bmRlc2lzOnN5bmRlc2lzLWNkLWNsaWVudCJ9.uKsri0JSKJDbgHoQwAhBJSNuWKwJgjegf2QlrCkhxVssSK1zIMZQaF9P5a4R7ZcWRnrZ_345UTqxYVeRlfHWVH0PqBkD-n7PAS9dcKJIFdS1jUHOmL1FTGgc3YW-bz1SlWT93tvK1EhorZ4_-EBfXhSAP4Uumi5qAg3_QUTMDstq233NSwBKYtFOw3Pp1ys3p3y0hcaiLMimeCH60vR4iWvptqqzc5QDigHiPySZNWxs_5awZlwdoIDvR-nSj690aC-49UKFgyEEdzdFU4bI2W4hOyDyhN9fVaIAZQKeJUrJBU-lnFTHI_NAd2OwzOEBpWZuj31Za5w9fU4kf4UDGA'
https://public-syndesis.192.168.64.42.nip.io/api/v1/public/integrations/dev1/export.zip

In the command:

  • The URL at the end of the command identifies the Fuse Online environment from which to export integrations.
  • Specification of the dev1 environment label indicates that you want to export integrations that have been marked for the dev1 environment and that have not already been exported since they were marked.

5.5. Invoking the Fuse Online public API import endpoint

You can obtain one or more integrations by invoking a Fuse Online public API export endpoint. To copy exported integrations to another Fuse Online environment, invoke the Fuse Online public API import endpoint.

Endpoint for importing an integration

To import integrations, Fuse Online provides the following POST method endpoint:

​/public​/integrations

In the following example, the endpoint imports the integrations that are in the export.zip file and tags them for the testing environment:

/public/integrations -F data=@export.zip -F environment=testing --request POST

An import endpoint always imports the supplied integrations. That is, even if an integration has not changed since the last time it was imported, the endpoint still imports it.

Custom headers required by import endpoint

A command that invokes the import endpoint must specify these custom headers exactly as follows:

  • -H "Content-Type: multipart/form-data"
  • -H "SYNDESIS-XSRF-TOKEN: awesome"

    The Fuse Online public API requires this header to authenticate the request.

  • -H 'Authorization: Bearer <token>'

    Replace <token> with the secret token that you copied into a file when you created the OpenShift service account that is used to expose the Fuse Online public API.

Sample curl command that imports integrations

Following is an example of a curl command that invokes a Fuse Online API endpoint that imports integrations:

curl -v -k -L -H "Content-Type: multipart/form-data" -H "SYNDESIS-XSRF-TOKEN: awesome" -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJzeW5kZXNpcyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJzeW5kZXNpcy1jZC1jbGllbnQtdG9rZW4tMnZjNmwiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoic3luZGVzaXMtY2QtY2xpZW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNjUxMjYxNGMtMmYwMS0xMWU5LTk3OWEtNDI1YWNlMzY3MTcyIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OnN5bmRlc2lzOnN5bmRlc2lzLWNkLWNsaWVudCJ9.uKsri0JSKJDbgHoQwAhBJSNuWKwJgjegf2QlrCkhxVssSK1zIMZQaF9P5a4R7ZcWRnrZ_345UTqxYVeRlfHWVH0PqBkD-n7PAS9dcKJIFdS1jUHOmL1FTGgc3YW-bz1SlWT93tvK1EhorZ4_-EBfXhSAP4Uumi5qAg3_QUTMDstq233NSwBKYtFOw3Pp1ys3p3y0hcaiLMimeCH60vR4iWvptqqzc5QDigHiPySZNWxs_5awZlwdoIDvR-nSj690aC-49UKFgyEEdzdFU4bI2W4hOyDyhN9fVaIAZQKeJUrJBU-lnFTHI_NAd2OwzOEBpWZuj31Za5w9fU4kf4UDGA'
https://public-syndesis.192.168.64.45.nip.io/api/v1/public/integrations -F data=@export.zip -F environment=testing --request POST

In this command:

  • The URL at the end of the command identifies the Fuse Online environment to import integrations into.
  • The export.zip file contains the integrations to be imported.
  • Specification of environment=testing causes the endpoint to mark each imported integration for the testing environment.
  • This command produces multipart/form-data.

Chapter 6. Fuse Online public REST API endpoints reference

This section provides reference information for each Fuse Online public REST API endpoint. For additional information, see How to invoke Fuse Online public REST API endpoints.

The OpenAPI document that defines the public REST API endpoints is available in your Fuse Online environment at https://<fuse-online-host>/api/v1/openapi.json. However, this document defines the tags object as having three tags: public-api, extensions, and integration-support. Only the public-api tag is accessible when using the OpenShift public OAuth proxy process for Fuse Online. You should ignore the other two tags.

6.1. Endpoint for obtaining the state of an integration

This endpoint returns the state of the specified integration. The state is Running, Stopped, Pending, or Error.

Method and endpoint

GET

/public/integrations/{id}/state

Table 6.1. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required path parameter. Name or internal ID of the integration whose state you want to obtain. See How to find integration IDs.

Request example

In the following example, the endpoint returns the state of the timer-to-log integration:

/public/integrations/timer-to-log/state

Produces

application/json

Response example

{"currentState":"Unpublished","stateDetails":{"id":"i-Lc0JLrsUFtBJfR_ylfEz:5","integrationId":"i-Lc0JLrsUFtBJfR_ylfEz","deploymentVersion":5,"detailedState":{"value":"BUILDING","currentStep":2,"totalSteps":4},"namespace":"syndesis","podName":"i-timer-to-log-5-build","linkType":"LOGS"}}`

6.2. Endpoint for obtaining a list of an integration’s environment labels

This endpoint returns the environment labels (tags) that have been applied to the specified integration.

Method and endpoint

GET

/public/integrations/{id}/tags

Table 6.2. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required path parameter. Name or internal ID of the integration whose environment labels you want to obtain. How to find integration IDs.

Request example

In the following example, the endpoint returns the environment labels for the timer-to-log integration:

/public/integrations/timer-to-log/tags

Produces

application/json

Response example

{"test":{"name":"test","releaseTag":"i-Lc5WI16UFtBJfR_ylggz","lastTaggedAt":1554887553159,"lastExportedAt":1554887330152,"lastImportedAt":1554888047271},"staging":{"name":"staging","releaseTag":"i-Lc5WI16UFtBJfR_ylgfz","lastTaggedAt":1554887553159}}

6.3. Endpoint for marking an integration and keeping unspecified tags

This endpoint uses the PATCH method to mark the specified integration for the specified environment(s). If the integration is already marked for a specified environment, the endpoint updates the timestamp for that environment label. If the integration was previously marked for an environment that is not specified in a new request, the endpoint leaves that tag in place and does not update its timestamp.

This PATCH endpoint is a convenience method for CI/CD tools because it adds tags without the need to remove any other existing tags. This is in contrast to the PUT endpoint, which marks the integration for specified environments and removes any tags for environments that are not specified in the request.

Method and endpoint

PATCH

/public/integrations/{id}/tags

Table 6.3. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required. Name or internal ID of the integration that you want to mark for the specified environment(s). See How to find integration IDs.

Additional Parameters

--request PATCH

 

Specify the PATCH method.

-d [env{,…​}]

string

Required. Specify one or more, comma-separated, environment labels, that you want to add to the specified integration. You must have already created the environment label; the endpoint cannot create a label. See Marking integrations for CI/CD.

Request example

In the following example, the endpoint marks the timer-to-log integration for the test2 and test3 environments:

public/integrations/timer-to-log/tags --request PATCH -d '["test2","test3"]'

Produces

application/json

Response example

{"test2":{"name":"test2","releaseTag":"i-LcXydouUFtBJfR_ylgrz","lastTaggedAt":1555365010746},"test3":{"name":"test3","releaseTag":"i-LcXydouUFtBJfR_ylgsz","lastTaggedAt":1555365010746},"test":{"name":"test","releaseTag":"i-Lc5WI16UFtBJfR_ylggz","lastTaggedAt":1554887553159,"lastExportedAt":1554887330152,"lastImportedAt":1554888047271},"staging":{"name":"staging","releaseTag":"i-Lc5WI16UFtBJfR_ylgfz","lastTaggedAt":1554887553159}}

6.4. Endpoint for marking an integration and removing unspecified tags

This endpoint uses the PUT method to mark the specified integration for the specified environment(s). If the integration was previously marked for an environment that is not specified in the new request, the endpoint removes that environment label from the integration.

To mark an integration without removing unspecified environment labels, call the PATCH method endpoint instead.

Method and endpoint

PUT

/public/integrations/{id}/tags

Table 6.4. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required. Name or internal ID of the integration that you want to mark. See How to find integration IDs.

Additional Parameters

--request PUT

 

Specify the PUT method.

-d [env{,…​}]

string

Required. Specify one or more, comma-separated, environment labels. The endpoint marks the specified integration for these environments. You must have already created the environment label; the endpoint cannot create a label. See Marking integrations for CI/CD.

Request example

In the following example, the endpoint marks the timer-to-log integration for the test2 and test3 environments. If the integration was previously marked for any other environments, the endpoint removes those tags from the integration.

public/integrations/timer-to-log/tags --request PUT -d '["test2","test3"]'

Produces

application/json

Response example

{"test2":{"name":"test2","releaseTag":"i-LcXyw7GUFtBJfR_ylgtz","lastTaggedAt":1555365085713},"test3":{"name":"test3","releaseTag":"i-LcXyw7GUFtBJfR_ylguz","lastTaggedAt":1555365085713}}

6.5. Endpoint for publishing an integration

This endpoint publishes the specified integration. If the integration is already running, then the endpoint stops the integration and re-publishes it.

Method and endpoint

POST

/public/integrations/{id}/deployments

Table 6.5. Parameters

NameTypeDescription

Required Header Parameter

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameters

{id}

string

Required. Name or internal ID of the integration that you want to publish. See How to find integration IDs.

Request example

In the following example, the endpoint publishes the timer-to-log integration.

/public/integrations/timer-to-log/deployments

Produces

application/json

Response example

In this example, the ellipsis indicates the omission of some of the response.

{"id":"i-Lc0JLrsUFtBJfR_ylfEz:8","version":8,"createdAt":1555365135324,"updatedAt":1555365135324,"userId":"system:serviceaccount:syndesis:syndesis-cd-client","currentState":"Pending","targetState":"Published","integrationId":"i-Lc0JLrsUFtBJfR_ylfEz", . .2c+PC9zdmc+","description":"Trigger events based on an interval or a cron expression","isDerived":false},"stepKind":"endpoint"},{"id":"-Lc0I7wqEVfKCDDHC8Jv","configuredProperties":{"bodyLoggingEnabled":"true","contextLoggingEnabled":"true"},"metadata":{"configured":"true"},"stepKind":"log","name":"Log"}]}],"continuousDeliveryState":{"test2":{"name":"test2","releaseTag":"i-LcXyw7GUFtBJfR_ylgtz","lastTaggedAt":1555365085713},"test3":{"name":"test3","releaseTag":"i-LcXyw7GUFtBJfR_ylguz","lastTaggedAt":1555365085713}}}}

6.6. Endpoint for stopping an integration

This endpoint stops the specified integration.

Method and endpoint

PUT

/public/integrations/{id}/deployments/stop

Table 6.6. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required. Name or internal ID of the integration that you want to stop. See How to find integration IDs.

Request example

In the following example, the endpoint stops the timer-to-log integration.

/public/integrations/timer-to-log/deployments stop

Produces

application/json

Response example

No content with a 204 status code

6.7. Endpoint for exporting integrations

This endpoint exports integrations. The default behavior is that the endpoint exports integrations that are marked for the specified environment and that have never been exported or that have not been exported since the last time that they were marked for that environment. You can specify options when you want to do either of the following:

  • Export all integrations in a Fuse Online environment and tag them with the specified environment label.
  • Export all integrations that are tagged with the specified environment label regardless of whether or not an integration was updated and tagged since the last time it was exported.

See also: Invoking the Fuse Online public API export endpoint.

Method and endpoint

GET

/public/integrations/{env}/export.zip

Table 6.7. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

multipart/form-data

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{env}

string

Required. Environment label that you created in the Fuse Online console. The endpoint exports the integrations that are marked for this environment.

Query Parameters

all=true

string

Optional. Specify this option to export all integrations that are in the Fuse Online environment. The endpoint exports the current version of each integration. If an integration is not already marked for the specified environment, then the endpoint adds the specified environment label to the integration. You must have already created the environment label; the endpoint cannot create a label.

ignoreTimestamp=true

string

Export all integrations tagged with the specified environment label. Do this regardless of whether or not an integration was edited and tagged since the last time the integration was exported.

Additional Parameter

-o export.zip

string

Required if you specify the query parameter. Without this option, the exported integrations are in a file named export.zip?all=true.

Request examples

In the first example, the endpoint exports integrations that have been marked for the test1 environment and that have never been exported or that have not been exported since the last time that they were marked for that environment.

/public/integrations/test1/export.zip

In the next example, the endpoint exports all integrations that have been marked for the test1 environment. It does not matter whether or not the integration was updated since the last time it was exported.

/public/integrations/test1/export.zip?ignoreTimestamp=true -o export.zip

In the last example, the endpoint ensures that each integration is marked for the test1 environment and returns all integrations in the export.zip file.

/public/integrations/test1/export.zip?all=true -o export.zip

Produces

application/octet-stream

Response

The export.zip file that contains the exported integration(s). The endpoint returns an HTTP status of 204 if there are no integrations to export.

6.8. Endpoint for importing integrations

This endpoint imports the integrations that are in the provided file. See also: Invoking the Fuse Online public REST API import endpoint.

Method and endpoint

POST

/public/integrations

Table 6.8. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

multipart/form-data

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Additional Parameters

data=@export.zip

string

Required. This is the file that contains the integrations that you want to import. You must have previously invoked the export endpoint to obtain this file.

environment={env}

string

Required. Environment label that you want to add to each imported integration. You must have already created the environment label; the endpoint cannot create a label.

Request example

In the following example, the endpoint imports the integrations that are in the export.zip file and marks them for the testing environment.

/public/integrations -F data=@export.zip -F environment=testing --request POST

Produces

multipart/form-data

Response example

The response is a list of the imported resources, which includes integrations and connections. In the following example, an ellipsis indicates that part of the response is omitted here.

{"lastImportedAt":1554888047271,"results":[{"id":"i-Lc0JLrsUFtBJfR_ylfEz","version":5,"createdAt":1554800274935,"updatedAt":0,"tags":["timer"],"name":"timer-to-log","flows":[{"id":"-Lc0I5AZEVfKCDDHC8Jv","steps":[{"id":"-Lc0I5jnEVfKCDDHC8Jv","configuredProperties":{"period":"900000"},"metadata":…​"description":"Trigger events based on an interval or a cron expression","isDerived":false},"stepKind":"endpoint"},{"id":"-Lc0I7wqEVfKCDDHC8Jv","configuredProperties":{"bodyLoggingEnabled":"true","contextLoggingEnabled":"true"},"metadata":{"configured":"true"},"stepKind":"log","name":"Log"}]}],"continuousDeliveryState":{"staging":{"name":"staging","releaseTag":"i-Lc5WI16UFtBJfR_ylgfz","lastTaggedAt":1554887553159},"test":{"name":"test","releaseTag":"i-Lc5WI16UFtBJfR_ylggz","lastTaggedAt":1554887553159,"lastExportedAt":1554887330152,"lastImportedAt":1554887859824}}}]}

6.9. Endpoint for removing an environment label from a particular integration

This endpoint removes the specified environment label from the specified integration. The environment label itself continues to exist but it no longer marks the specified integration.

Method and endpoint

DELETE

/public/integrations/{id}/tags/{env}

Table 6.9. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameters

{id}

string

Required path parameter. Name or internal ID of the integration that you want to unmark. See How to find integration IDs.

{env}

string

Required path parameter. Environment label that you want to remove from the specified integration.

Additional Parameter

--request DELETE

 

Specify the DELETE method.

Request example

In the following example, the endpoint removes the dev1 environment label from the timer-to-log integration.

/public/integrations/timer-to-log/tags/dev1 --request DELETE

Response example

No content with a 204 status code

6.10. Endpoint for creating an environment label

This endpoint creates an environment label. No integrations are marked with this label until you explicitly mark them in the Fuse Online console or by invoking a public API endpoint.

Method and endpoint

POST

/public/environments/{env}

Table 6.10. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{env}

string

Required. Environment label that you want to create.

Produces

Does not produce anything but responds as follows:

ResponseDescription

204 No Content

Success.

400 Bad Request

The environment name you specified already exists.

5xx errors

The server is unable to fulfill the request.

Request example

In the following example, the endpoint creates the dev1 environment label:

/public/environments/dev1 --request POST

The dev1 environment label now exists in the Fuse Online environment in which you invoked this endpoint. There are not yet any integrations that are marked with this label.

Response example

No content with response status code 204

6.11. Endpoint for obtaining a list of environment labels

This endpoint returns a list of environment labels that exist in the Fuse Online environment. You create environment labels in the Fuse Online console. See Managing environment labels for CI/CD.

Method and endpoint

GET

/public/environments[?withUses=true]

Table 6.11. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

withUses

Boolean

Optional. If the command specifies withUses=true, the endpoint returns environment labels and the number of integrations that are marked with that label. If not specified, or set to false, the endpoint returns only environment labels.

Produces

application/json

Request examples

  • /public/environments

    Response example:
    ["env-label-1", "env-label-2"]

  • /public/environments/?withUses=true

    Response example
    [{"name":"env-label-1","uses":1},
    {"name":"env-label-2","uses":0}]

6.12. Endpoint for changing an environment label

This endpoint changes an environment label. Integrations that were marked for the original environment label are now marked for the new environment label.

Method and endpoint

PUT

/public/environments/{env}

Table 6.12. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{env}

string

Required. Environment label that you want to change.

Additional Parameters

-d {env}

string

Required. Specify the new label for the environment. You must have already created the environment label; the endpoint cannot create a label.

--request PUT

 

Specify the PUT method.

Request example

In the following example, the endpoint changes the dev1 environment label to dev2:

/public/environments/dev1 -d ‘dev2’ --request PUT

Integrations that were marked for the dev1 environment no longer have that tag. Those integrations are now marked for the dev2 environment.

Response example

No content with response status code 204

6.13. Endpoint for removing an environment label from all integrations

This endpoint removes the specified environment label from each integration to which it has been applied.

Method and endpoint

DELETE

/public/environments/{env}

Table 6.13. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{env}

string

Required. Environment label that you want to remove from integrations that have it.

Additional Parameter

--request DELETE

 

Specify the DELETE method.

Request example

In the following example, the endpoint removes the dev1 tag from any integrations that have it:

/public/environments/dev1 --request DELETE

Response example

No content with response status code 204

6.14. Endpoint for changing a connection’s properties

This endpoint changes the properties of the specified connection. This is often useful after you import an integration that has connections that require configuration. For example, you might need to change the credentials that a connection uses.

Method and endpoint

POST

​/public​/connections​/{id}​/properties

Table 6.14. Parameters

NameTypeDescription

Required Header Parameters

-H "Content-Type: <media-type>"

application/json

Media type that the endpoint requires.

-H "SYNDESIS-XSRF-TOKEN: awesome"

Custom

Required for authentication.

-H 'Authorization: Bearer <token> '

Custom

Secret token for the OpenShift service account that exposes the Fuse Online public REST API. See Obtaining a secret token.

Path Parameter

{id}

string

Required. Replace {id} with the ID of the connection whose properties you want to change. For the connection ID, specify one of the following:

  • The connection’s name, for example: PostgresDB. If the connection name has any spaces or special characters, then you must specify HTML escape characters.
  • The internal connection ID, which is in the Fuse Online console URL when you view a connection’s details. To view a connection’s details, in the left navigation panel, click Connections. Then click the connection whose details you want to view. When the connection details are visible in the browser, you would see something like this at the end of the URL: /connections/i-LaupI8XznJ4LcuWwiwaz. This connection’s ID is i-LaupI8XznJ4LcuWwiwaz.

Request example

The following example changes the properties of the PostgresDB connection. The new value of the user property is myuser, and the new value of the password property is mypassword:

/public/connections/PostgresDB/properties --request POST -d '{ "user": "myuser", "password": "mypassword" }'

Produces

application/json

Sample response

In this example, there is an ellipsis that indicates the omission of a large part of the response.

{"uses":0,"id":"i-LaOziUGpQE45nua4pfCz","name":"TODO app","configuredProperties":{"password":"»ENC:c2cb731046372a275b76beabc92aefa061f79b43fb791fb599d9e85ec0235a7e","basePath":"/api","host":"http://todo-syndesis.my-minishift.syndesis.io/","specification":…​"userId":"admin","lastUpdated":1555365796629,"createdDate":1553066813379,"board":{"id":"i-Lbj4-vqUFtBJfR_ylfCz","metadata":{"connector-id":"i-LaOzcPZpQE45nua4pfBz","connector-version-latest":"1","connector-version-connection":"1"},"messages":[{"level":"WARN","code":"SYNDESIS007"}],"createdAt":1554494263030,"updatedAt":1554494263727,"targetResourceId":"i-LaOziUGpQE45nua4pfCz","notices":0,"warnings":1,"errors":0},"isDerived":false}

Chapter 7. Rebranding the Fuse Online user interface

You can rebrand Fuse Online by replacing the Fuse Online application name, logo, icons, and other user interface details. You do this by mounting customized resources as ConfigMap objects in the syndesis-ui deployment file.

Prerequisites

  • Fuse Online is installed and running on OpenShift Container Platform on-site in a customer-managed environment.
  • The oc client tool is connected to the OCP cluster in which Fuse Online is installed.
  • You have permission to install Fuse Online.

Procedure

  1. Obtain the name of the syndesis-ui pod in which Fuse Online is installed by invoking the following command:

    oc get pods

  2. Fetch customizable logos, icons, fonts, and backgrounds by invoking the following command and replacing SYNDESIS_UI_POD_NAME with the actual name of the pod that is running syndesis-ui:

    oc rsync SYNDESIS_UI_POD_NAME:/opt/app-root/src/static/media ~/

    This puts user interface resources in the the ~/media/ folder.

  3. Edit and save the file that contains the header logo, which is ~/media/syndesis_logo_full_darkbkg.9c467d96.svg.
  4. Upload the modified file to the cluster by creating a ConfigMap object that contains the updated logo file:

    cd ~/
    oc create configmap syndesis-ui-custom-logo --from-file=media/syndesis_logo_full_darkbkg.9c467d96.svg
  5. Modify the syndesis-ui deployment file to mount the syndesis-ui-custom-logo ConfigMap object. Do this by invoking oc edit dc/syndesis-ui or by using the OpenShift web console, selecting Applications > Deployments > syndesis-ui > Actions > Edit YAML.

    1. Under spec.template.containers.volumeMounts, add the following:

      -name: syndesis-ui-custom-logo-volume
       mountPath: /opt/app-root/src/static/media/syndesis_logo_full_darkbkg.9c467d96.svg
       subPath: syndesis_logo_full_darkbkg.9c467d96.svg
    2. Under spec.template.volumes, add the following:

      -name: syndesis-ui-custom-logo-volume
       configMap:
        name: syndesis-ui-custom-logo
    3. Save the syndesis-ui deployment file.
  6. Repeat steps 3 through 5 for each file that is in the `~/media folder and that you want to customize.
  7. Edit and save the file that contains the application title:

    1. Create a directory in which to update the file:

      mkdir ~/syndesis-custom/src

    2. Fetch the application title file by invoking the following command and replacing SYNDESIS_UI_POD_NAME with the actual name of the pod that is running syndesis-ui:

      oc rsync SYNDESIS_UI_POD_NAME:/opt/app-root/src/index.html ~/syndesis-custom/src
    3. Replace the application title. For example:

      sed -i 's/<title>.*<\/title>/<title>NEW_TITLE<\/title>/g' ~/syndesis-custom/src/index.html
  8. Upload the modified application title file to the cluster by creating a ConfigMap object that contains the updated file:

    cd ~/syndesis-custom/src
    oc create configmap syndesis-ui-custom-index --from-file=index.html
  9. Modify the syndesis-ui deployment by mounting the syndesis-ui-custom-index ConfigMap object:

    1. Under spec.template.containers.volumeMounts, add the following:

      -name: syndesis-ui-custom-vindex-olume
       mountPath: /opt/app-root/src/index.html
       subPath: index.html
    2. Under spec.template.volumes, add the following:

      -name: syndesis-ui-custom-index-volume
       configMap:
        name: syndesis-ui-custom-index
    3. Save the syndesis-ui deployment file.

Results

Saving the syndesis-ui deployment file automatically redeploys Fuse Online with a user interface that reflects your changes. Subsequent re-deployments of Fuse Online also reflect your changes.

Legal Notice

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.