Chapter 3. 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:
- Section 3.1, “Fuse Online configuration changes allowed after installation”
- Section 3.2, “General procedure for changing Fuse Online configuration”.
Configuring (prodname} and 3scale discovery of APIs:
- Section 3.5, “Configuring the HTTP proxy”
- Section 3.6, “Adding a sample app to a Fuse Online environment running on OCP”
3.1. Fuse Online configuration changes allowed after installation Copy linkLink copied to clipboard!
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 or when you delete the syndesis-server pod, OpenShift creates a new server pod. 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.
| Feature/Setting | Effect of changing | Information |
|---|---|---|
| 3scale discovery |
Redploys | |
| Backups |
Adds a backup job to | |
| Monitoring | Installs new OpenShift resources | |
| Public Fuse Online REST API endpoints |
Creates | Exposing Fuse Online public REST APIs for use by external tools |
| Sample Todo app for testing integrations |
Creates new | Adding a sample app to a Fuse Online environment running on OCP |
| Java options |
Redeploys | Descriptions of custom resource attributes that configure Fuse Online |
| Maven configuration |
You must delete the | |
| Assigning Fuse Online pods to OpenShift cluster nodes | Redeploys Fuse Online infrastructure component and integration pods | Descriptions of custom resource attributes that configure Fuse Online |
| Memory available to Fuse Online components | Redeploys component with changed memory | Descriptions of custom resource attributes that configure Fuse Online |
| Number of running integrations allowed |
You must delete the | |
| Database connection pool |
Redploys |
3.2. General procedure for changing Fuse Online configuration Copy linkLink copied to clipboard!
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
occlient 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
syndesiscustom resource for the configuration changes you want to make.
Procedure
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developerSwitch to the OpenShift project that is running the Fuse Online environment whose configuration you want to change. For example:
oc project my-fuse-online-projectOptional. Create a backup copy of the current settings in the
syndesiscustom resource, just in case you update and save incorrect content. For example, invoking the following command saves a backup in thesyndesis_app_backup.ymlfile:oc get syndesis app -o yaml > syndesis_app_backup.ymlInvoke the following command to open the syndesis custom resource in an editor:
oc edit syndesis/appNote: This procedure describes how to set configurations by opening the custom resource file in an editor. Alternatively, you can use
oc patchcommands to edit the custom resource.-
Edit the
syndesiscustom resource as needed. Save the resource.
Depending on the type of object that your edits apply to, your update triggers the
syndesis-operatorto redeploy some Fuse Online components when you save the resource.If you made changes to the
maven:additionalArguments,MavenRepositories, andintegrationLimitattributes in thecomponents.server.featuressection of the custom resource, you must trigger the redeployment by deleting thesyndesis-serverpod. Use this command:oc delete 'oc get -o name pod -l syndesis.io/component=syndesis-server'Wait two or three minutes, and then confirm that the
syndesiscustom resource was updated correctly:Invoke the following command to display the content of the
syndesiscustom resource:oc describe syndesis/appCheck the content.
If the
syndesiscustom 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 the Fuse Online syndesis-server component. This means that OpenShift creates a new server pod. Some changes require you to delete the syndesis-server pod so that OpenShift creates a new server pod.
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-serverpod status isRunning. - 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
syndesiscustom resource to specify backups, it is a few seconds before the backup job is in place.
The effect of each configuration change is described in Fuse Online configuration changes allowed after installation.
3.3. Configuring Fuse Online and 3scale discovery of APIs Copy linkLink copied to clipboard!
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.
If you enable 3scale discovery, you can later optionally disable it.
3.3.1. Configuring Fuse Online to enable 3scale discovery of APIs Copy linkLink copied to clipboard!
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
occlient 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.
- You know the name of the 3scale project on the OpenShift cluster.
Procedure
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developerSwitch 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-projectAdd permissions that allow the 3scale project to view Fuse Online integrations:
oc adm policy add-cluster-role-to-user view system:serviceaccount:<3scale-project>:ampFor example, if the 3scale project on OpenShift is named
my3scale:oc adm policy add-cluster-role-to-user view system:serviceaccount:my3scale:ampEdit the
syndesiscustom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesisEdit the resource by setting
managementUrlFor3scaleto the URL for your 3scale user interface. The result looks like this:spec: components: server: features: managementUrlFor3scale: https://3scale-admin.apps.mycluster.com- Save the resource.
Optional. To confirm that discovery is turned on for the project that you switched to, invoke the following command:
oc describe dc/syndesis-serverWhen discovery is turned on, the output from this command shows that the
OPENSHIFT_MANAGEMENT_URL_FOR3SCALEenvironment 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.
3.3.2. Configuring Fuse Online to disable 3scale discovery of APIs Copy linkLink copied to clipboard!
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
occlient 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
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developerSwitch to an OpenShift project in which 3scale discovery was enabled. For example:
oc project my-fuse-online-projectEdit the
syndesiscustom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesisEdit the resource by inserting a hash sign (
#) at the beginning of the line that specifies themanagementUrlFor3scalekey 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.comSave the resource.
This updates the
syndesiscustom resource. The update removes theOPENSHIFT_MANAGEMENT_URL_FOR3SCALEenvironment variable. This change to thesyndesiscustom resource triggerssyndesis-operator, which is responsible for installing Fuse Online, to redeploysyndesis-server. The new default behavior is that APIs are no longer exposed for discovery in 3scale.
Do not edit the
syndesis-server DeploymentConfigobject to remove the setting of theOPENSHIFT_MANAGEMENT_URL_FOR3SCALEenvironment variable. This does not work becausesyndesis-operatorreverts your change. Thesyndesis-operatorensures that Fuse Online is deployed only and always according to thesyndesiscustom resource.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.
3.4. Configuring Fuse Online pods Copy linkLink copied to clipboard!
You can configure the placement of Fuse Online infrastructure component and integration pods onto nodes within an OpenShift cluster by setting node affinity and tolerations options in the Fuse Online custom resource. The nodeAffinity option allows you to specify an affinity for Fuse Online pods towards a group of nodes to be placed on. The tolerations option allows you to control which nodes the Fuse Online pods run on and to prevent other workloads from using those nodes.
You set these options by editing the Fuse Online custom resource before or after installing Fuse Online.
You specify configure node affinity or tolerations settings for infrastructure component deployments separately from integration deployments:
infraScheduling- Specify theinfraSchedulingoption to configure node affinity and tolerations settings for these Fuse Online infrastructure deployments:-
syndesis-db -
syndesis-meta -
syndesis-prometheus syndesis-uiNote: The
syndesis-operatordeployment is not affected by a change in node affinity or tolerations because it is the Fuse Online management component.
-
integrationScheduling- Specify theintegrationSchedulingoption to configure node affinity and tolerations settings for all Fuse Online integration deployments.Note: If you want to know whether a Fuse Online deployment is an integration deployment, check the deployment name. You can use the
oc get podscommand to view a list of running deployments. If a deployment name includes a-iprefix, it is an integration deployment, for example,i-my-integration.
The following procedure describes how to edit the custom resource with the oc patch command. Alternatively, you can edit the custom resource as described in these topics:
- If you have already installed Fuse Online, open the custom resource by following the steps in “General procedure for changing Fuse Online configuration.
If you have not yet installed Fuse Online, open the custom resource by following the steps in these topics, depending on your OCP version:
Prerequisites
- Fuse Online is installed on OCP on-site.
-
The
occlient tool is installed and it is connected to the OCP cluster in which Fuse Online is installed.
Procedure
Use the
oc patchcommand with the following syntax to configure tolerations settings. SpecifyinfraSchedulingfor Fuse Online infrastructure component deployments orintegrationSchedulingfor Fuse Online integration deployments:oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling"|"infraScheduling":{"tolerations":[{"key":"_value1_","operator":"_value2_","effect":"_value3_"},{"key":"_value4_","operator":"_value5_","effect":"_value6_"}]}}}'For example, the following command adds tolerations for Fuse Online infrastructure components:
oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling":{"tolerations":[{"key":"tol_1","operator":"Equal","effect":"NoSchedule"},{"key":"tol_2","operator":"Equal","value":"value2","effect":"NoSchedule"}]}}}'Use the
oc patchcommand with the following syntax to configure node affinity settings. SpecifyinfraSchedulingfor Fuse Online infrastructure component deployments orintegrationSchedulingfor Fuse Online integration deployments:oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling"|"infraScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":_value1_,"preference":{"matchExpressions":[{"key":"_value1_","operator":"_value2_","values":["_value3_","_value4_"]}]}}]}}}'For example, the following command sets nodeAffinity to both Fuse Online infrastructure components and integrations:
oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":11,"preference":{"matchExpressions":[{"key":"_affinity","operator":"In","values":["foo","bar"]}]}}]}}},"integrationScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":22,"preference":{"matchExpressions":[{"key":"my_affinity2","operator":"In","values":["foo","bar"]}]}}]}}}}}'To remove a configuration setting, use the
removeoption in theoc patchcommand, as demonstrated in the following example commands:The following example command removes the
preferredDuringSchedulingIgnoredDuringExecutionsetting from a nodeAffinity for Fuse Online integrations:oc patch syndesis/app --type=json -p '[{"op": "remove", "path": "/spec/integrationScheduling/affinity/nodeAffinity/preferredDuringSchedulingIgnoredDuringExecution" }]'The following example removes the tolerations from Fuse Online infrastructure components:
oc patch syndesis/app --type=json -p '[{"op": "remove", "path": "/spec/infraScheduling/tolerations" }]'
Additional resources
For information about tolerations and node affinity, see the Understanding node affinity and the Controlling pod placement using node taints sections of the OpenShift documentation.
3.5. Configuring the HTTP proxy Copy linkLink copied to clipboard!
Many services use a HTTP proxy to filter and secure communications with other services or components. To configure the HTTP proxy on Fuse Online components and integrations, edit the Fuse Online custom resource before or after installing Fuse Online.
Prerequisite
- You know the host and port values for the HTTP proxy.
Procedure
Open the custom resource in an editor:
If you have already installed Fuse Online, open the custom resource by following the steps in “General procedure for changing Fuse Online configuration.
If you have not yet installed Fuse Online, open the custom resource by following the steps in these topics, depending on your OCP version:
For the
syndesis-serverandsyndesis-metacomponents, set the Java Options (javaOptions) parameter and specify values for the HTTP proxy host and port. Use the same HTTP proxy values for bothsyndesis-serverandsyndesis-meta.For example:
spec: components: server: javaOptions: -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 meta: javaOptions: -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800For Fuse Online integrations, set the Maven Arguments (additionalArguments) parameter. For example:
spec: components: server: features: maven: additionalArguments: "-Dhttp.proxy=10.0.0.100 -Dhttp.proxyPort=8800"Save the custom resource.
If Fuse Online is already installed, the
syndesis-serverpod is redeployed in response to the javaOptions update in Step 2. (Note that if you make a change to only the MavenadditionalArgumentsparameter, you must delete thesyndesis-serverpod in order to trigger a redeployment.)Republish any running integrations that use the HTTP proxy.
- In Fuse Online, select the integration that you want to update.
- Select Edit.
- Select Publish.
Fuse Online uses the HTTP proxy settings when it rebuilds the integration.
3.6. Adding a sample app to a Fuse Online environment running on OCP Copy linkLink copied to clipboard!
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.
Prerequisites
- Fuse Online is installed and running on OCP on-site.
-
The
occlient 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
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developerSwitch to the project in which Fuse Online is running. For example:
oc project my-fuse-online-projectEdit the
syndesiscustom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesisEnsure that the following lines are in the resource. Edit as needed.
spec: addons: todo: enabled: trueSave the resource.
Saving this change to the
syndesiscustom resource triggerssyndesis-operatorto create a newtodopod.
Next steps
Use the Todo app by Implementing the AMQ to REST API sample integration.