Customizing Workflow Process Service

You can customize Workflow Process Service on Red Hat OpenShift Container Platform (OCP) in several ways.

Enabling multiple server instances

Workflow Process Service supports multiple server instances under the same namespace. To create another instance, you can create a custom resource with a different name and apply it in the same namespace.

For example, you can deploy a custom resource with the name wfps-instance2. The custom resource might look similar to
cat <<EOF | kubectl apply -f -
apiVersion: icp4a.ibm.com/v1
kind: WfPSRuntime
metadata:
  name: wfps-instance2
spec:
  appVersion: "22.0.1"
  deploymentLicense: production    
  admin:
    username: "<require>"
  license:
    accept: true
EOF
After you deploy the custom resource, you will see another Workflow Process Service server and PostgreSQL instance deployed, for example
wfps-instance2-postgre-1                                          1/1     Running     0          2h

wfps-instance2-wfps-runtime-server-0                              1/1     Running     0          2h

Enabling automatic horizontal pod scaling

You can customize parameters to enable the horizontal pod autoscaler for Workflow Process Service. For more information about the autoscaler parameters, see Workflow Process Service parameters. For example, your configuration might look similar to
spec:

  node:

    autoScaling:

      enabled: true

      minReplicas: 2

      maxReplicas: 5

      targetAverageUtilization: 80

Customizing the Liberty configuration

To override the Liberty default configuration, you can provide your own Liberty configuration.

  • If you do not have credential information in the configuration, you can use the spec.node.customize.libertyXML parameter. Your configuration might look similar to
    spec:
    
      node:
    
        customize:
    
          libertyXML: |-
    
            <server>
    
              <!-- liberty custom properties here -->
    
            </server>
  • If credential information is in the configuration, you can use the spec.node.customize.libertyXMLSecret parameter. Store the credential configuration in a custom.xml file and create a secret from this file by using the following command:
    kubectl create secret generic custom-xml-secret-name --from-file=sensitiveCustomConfig=./custom.xml

    Use the spec.node.customize.libertyXMLSecret parameter in the CR to indicate the secret name. For example:

    spec:
    
      node:
    
        customize:
    
          libertyXMLSecret: custom-xml-secret-name

Customizing the Workflow Process Service configuration

To override the Workflow Process Service default configuration, you can provide your configuration in the 100Custom.xml properties file. For details about working with the 100Custom.xml file, see Creating a 100Custom.xml configuration file.

The location of your 100Custom.xml content depends on if you have credential information in your 100Custom.xml file.
  • If your file does not have credential information, paste the content of 100Custom.xml as the value for the spec.node.customize.lombardiXML parameter. For example, your configuration might look similar to:
    spec:
    
      node:
    
        customize:
    
          lombardiXML: |-
    
            <!-- Your 100Custom.xml content here -->
            <properties>
    
              <!--Properties file for customer cluster scoped properties. -->
    
            </properties> 
    The 100Custom.xml content is mounted in the server at /opt/ibm/wlp/usr/servers/defaultServer/config/199Custom.xml.
  • If your 100Custom.xml file contains credential information, create a secret by using the following command:
    kubectl create secret generic custom-lombardi-xml-secret-name --from-file=sensitiveCustomConfig=./100Custom.xml 
    Use the spec.node.customize.lombardiXMLSecret parameter in the CR to indicate the secret name. For example:
    spec:
    
      node:
    
        customize:
    
          lombardiXMLSecret: custom-lombardi-xml-secret-name
    The 100Custom.xml content is mounted in the server at /opt/ibm/wlp/usr/servers/defaultServer/config/198Custom.xml.

Configuring the Filebeat output

You can configure your environment to write the Filebeat log message to your external Elasticsearch output or stash.
  1. Create the filebeat-output.yml secret by running the command:
    oc create secret generic wfps-filebeat-secret --from-file=filebeat-output.yml=./filebeat-output.yml
  2. Configure your filebeat-output.yml. A section of the filebeat-output.yml file might look similar to:
    output.elasticsearch:
      hosts: ["https://elasticsearch-host:9200"]
      username: es_username
      password: es_password
      ssl.verification_mode: none
      index: "wfps-filebeat"
    For more information about configuring the Filebeat output, see Configure the output.
  3. Update your Workflow Process Service custom resource (CR) YAML file. Set spec.node.logging.enableFilebeat to true and spec.node.logging.filebeatOutputSecret to wfps-filebeat-secret. For example, your CR might look similar to:
    spec:
      node:
        logging:
          consoleFormat: "json"
          consoleLogLevel: "INFO"
          consoleSource: "message,trace,accessLog,ffdc,audit"
          traceFormat: "ENHANCED"
          traceSpecification: "*=info"
          messageFormat: "simple"
          maxFiles: 10
          maxFileSize: 50
          enableFilebeat: true
          filebeatOutputSecret: wfps-filebeat-secret

Configuring Workflow Process Service for federation

You can configure Workflow Process Service to be federated by Process Federation Server when both are in the same namespace. Federation in Workflow Process Service requires the full text search feature. For more information about configuring full text search, see "Deploying Workflow Process Service" step 2.d in Installing Workflow Process Service deployments.
  1. Configure your Process Federation Server deployment by completing the steps in Installing Process Federation Server deployments.
  2. Update your custom resource (CR) to enable both federate and fullTextSearch. For example, a section of your CR might look like:
    spec: 
      capabilities: 
        fullTextSearch: 
          enable: true 
          adminGroups: 
          - example_group 
          esStorage:
            storageClassName: BlockStorageClassName
            size: 50Gi
          esSnapshotStorage:
            storageClassName: BlockStorageClassName
            size: 10Gi
        federate:
          enable: true