Customizing the IBM App Connect policy project
The FTM IBM® MQ and JDBC policies are deployed to the IBM App Connect server containers by using a policy project configuration instance. During deployment, the policy project instance is applied to all the default IBM App Connect pods. You can also update the policy project after deployment.
The following steps show you how to customize a policy project for IBM App Connect.
For example, you can customize the default FTM JDBC and IBM MQ
policies.
- Use the following command to get the names of the policy project configurations that are
deployed.
oc get configuration | grep policies - Download the policy project as a .zip file by running the following command. In the
command,
<ftm-instance>indicates the name of the FTM instance that is deployed in the namespace.oc get configuration <ftm-instance>-default-policies -o jsonpath='{.spec.contents}' | base64 -d > defaultPolicies.zip - Extract the JDBC and IBM MQ policy files from the .zip file
that you downloaded by running the following command.
unzip defaultPolicies.zip - Modify the default policies as needed. For example, some of the other IBM MQ connection options are not compatible with the IBM MQ automatic reconnect option, which is enabled by default in FTM. The defragmentor message flow in the FTM fragmentation sample application uses some of these other IBM MQ connection options. Therefore, to run this sample application you need to update the default policy to disable or remove the reconnect option.
- Create the .zip file with the updated policy files. First, make sure that the
directory name and its structure are intact.
Then, create the .zip file by running the following command.defaultPolicies |-- JDBCProvider.policyxml |-- MQEndpoint.policyxml |-- policy.descriptorzip -r defaultPolicies.zip defaultPolicies - Run the following commands to update the existing policy project configuration instance with the newly
modified policies.
export newcontents=$(base64 -w 0 defaultPolicies.zip)oc get configuration <ftm-instance>-default-policies -o json | jq --arg a "$newcontents" '.spec.contents = $a' | oc replace -f - - Restart the IBM App Connect pods to apply the changes that you made.
Note: The FTM operator does not monitor or manage any new custom resources. For more
information, see https://www.ibm.com/docs/en/app-connect/13.0?topic=delivery-creating-your-authoring-runtime-environments-other-resources.