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 sample data to a Fuse Online environment running on OCP”
3.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 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 | |
Auditing Note: This is a Technology Preview feature. |
Updates the configuration of the running | |
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 sample data to a Fuse Online environment running on OCP |
demoData |
Provides a sample database and sample database connector. You must delete the Creates a PostgreSQL database named sampledb and adds a PostgresDB Connection to SampleDB connector in the Fuse Online environment. | Descriptions of custom resource attributes that configure Fuse Online Adding sample data 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
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
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developer
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
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 thesyndesis_app_backup.yml
file:oc get syndesis app -o yaml > syndesis_app_backup.yml
Invoke the following command to open the syndesis custom resource in an editor:
oc edit syndesis/app
Note: This procedure describes how to set configurations by opening the custom resource file in an editor. Alternatively, you can use
oc patch
commands to edit the custom resource.-
Edit the
syndesis
custom resource as needed. Save the resource.
Depending on the type of object that your edits apply to, your update triggers the
syndesis-operator
to redeploy some Fuse Online components when you save the resource.If you made changes to the
demoData
option in the custom resource, you must trigger the redeployment by deleting thesyndesis-server
andsyndesis-db
pods by using these commands:oc delete $(oc get -o name pod -l syndesis.io/component=syndesis-server) oc delete $(oc get -o name pod -l syndesis.io/component=syndesis-db)
Wait two or three minutes, and then confirm that the
syndesis
custom resource was updated correctly:Invoke the following command to display the content of the
syndesis
custom resource:oc describe syndesis/app
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 the Fuse Online syndesis-server
component. This means 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-server
pod 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
syndesis
custom 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
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
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.
- 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 developer
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
Add permissions that allow the 3scale project to view Fuse Online integrations:
oc adm policy add-cluster-role-to-user view system:serviceaccount:<3scale-project>:amp
For example, if the 3scale project on OpenShift is named
my3scale
:oc adm policy add-cluster-role-to-user view system:serviceaccount:my3scale:amp
Edit the
syndesis
custom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesis
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
- 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-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.
3.3.2. Configuring Fuse Online to disable 3scale discovery of APIs
If you followed the procedure described in Configuring Fuse Online to enable 3scale discovery of APIs, each API provider integration creator can choose whether that integration’s API is discoverable. At some point, you might want to reconfigure the default behavior, which is that integration APIs are not discoverable in 3scale, 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
Log in to OpenShift with an account that has permission to install Fuse Online. For example:
oc login -u developer -p developer
Switch to an OpenShift project in which 3scale discovery was enabled. For example:
oc project my-fuse-online-project
Edit the
syndesis
custom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesis
Edit the resource by inserting a hash sign (
#
) at the beginning of the line that specifies themanagementUrlFor3scale
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
Save the resource.
This updates the
syndesis
custom resource. The update removes theOPENSHIFT_MANAGEMENT_URL_FOR3SCALE
environment variable. This change to thesyndesis
custom 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 DeploymentConfig
object to remove the setting of theOPENSHIFT_MANAGEMENT_URL_FOR3SCALE
environment variable. This does not work becausesyndesis-operator
reverts your change. Thesyndesis-operator
ensures that Fuse Online is deployed only and always according to thesyndesis
custom 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
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 theinfraScheduling
option to configure node affinity and tolerations settings for these Fuse Online infrastructure deployments:-
syndesis-db
-
syndesis-meta
-
syndesis-prometheus
syndesis-ui
Note: The
syndesis-operator
deployment is not affected by a change in node affinity or tolerations because it is the Fuse Online management component.
-
integrationScheduling
- Specify theintegrationScheduling
option 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 pods
command to view a list of running deployments. If a deployment name includes a-i
prefix, 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
oc
client tool is installed and it is connected to the OCP cluster in which Fuse Online is installed.
Procedure
Use the
oc patch
command with the following syntax to configure tolerations settings. SpecifyinfraScheduling
for Fuse Online infrastructure component deployments orintegrationScheduling
for 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 patch
command with the following syntax to configure node affinity settings. SpecifyinfraScheduling
for Fuse Online infrastructure component deployments orintegrationScheduling
for 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
remove
option in theoc patch
command, as demonstrated in the following example commands:The following example command removes the
preferredDuringSchedulingIgnoredDuringExecution
setting 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
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-server
andsyndesis-meta
components, set the Java Options (javaOptions
) parameter and specify values for the HTTP proxy host and port. Use the same HTTP proxy values for bothsyndesis-server
andsyndesis-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=8800
For 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-server
pod is redeployed in response to the javaOptions update in Step 2.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 sample data to a Fuse Online environment running on OCP
To help new users learn how to create integrations with Fuse Online, you can add sample data to your Fuse Online environment.
- The ToDo app
- The sample PostgresDB database and PostgresDB connection
The Salesforce to Database, AMQ to REST API, and API Provider quickstart sample integrations require this sample data.
By default, the sample PostgresDB database and connection and the ToDo app are disabled (not installed).
To configure Fuse Online to include the sample data 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
oc
client tool is installed and it is connected to the OCP cluster in which Fuse Online is installed. - You have permission to edit the Fuse Online custom resource.
Procedure
Log in to OpenShift with an account that has permission to edit the Fuse Online custom resource. For example:
oc login -u developer -p developer
Switch to the project in which Fuse Online is running. For example:
oc project my-fuse-online-project
Edit the
syndesis
custom resource:Invoke the following command, which typically opens the resource in an editor:
oc edit syndesis
Edit the custom resource by adding the
demoData
field and setting it to true and by changing theaddons:todo:enabled
field to true:spec: demoData: true addons: todo: enabled: true
Save the resource.
Saving this change to the
syndesis
custom resource triggerssyndesis-operator
to create a newtodo
pod.
To update changes related to the
demoData
option in the custom resource, you must trigger the redeployment by deleting thesyndesis-server
andsyndesis-db
pods by using these commands:oc delete $(oc get -o name pod -l syndesis.io/component=syndesis-server) oc delete $(oc get -o name pod -l syndesis.io/component=syndesis-db)