Setting up manual provisioning for Flink

If you prefer to control the provisioning mode for Flink storage, you can create your own persistent volumes manually.

About this task

The default setting is dynamic provisioning.

For setting the same storage class for all Business Automation Insights pods that need a storage class, use the appropriate parameters in the shared_configuration section of the custom resource. For details, see Storage parameters in Checking the cluster configuration. For a finer-grain configuration, use the parameters of the bai_configuration section as described below.

Configuration parameters for IBM Cloud Pak® for Business Automation custom resources start with the spec.bai_configuration. prefix.

Procedure

  1. Create a persistent volume for Apache Flink.
    1. Before you install IBM Business Automation Insights, ensure that all paths exist.
      IBM Business Automation Insights does not automatically create the directories for you.
    2. Apply the Retain reclaim policy to make sure that data is not lost when you redeploy Business Automation Insights.
    3. For each additional replica of master or data nodes (Kubernetes pods), provision one more persistent volume.
  2. Optional: Create a persistent volume claim for Apache Flink.
    Use the following YAML file to create a persistent volume claim. Replace the placeholders with the appropriate values. The value of <FLINK_PVC_NAME> must match the name that is provided in the claimRef section of the persistent volume. The <STORAGE_SIZE> value must be smaller than or equal to the value of the persistent volume storage capacity. The persistent volume claim must provide enough space to fit the capacity set at installation time. The default capacity is 20Gi.
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: <FLINK_PVC_NAME>
      namespace: <NAMESPACE>
    spec:
      storageClassName: ""
      accessModes:
        - ReadWriteMany
      resources:
        requests:
          storage: <STORAGE_SIZE>
  3. If you want to refine the binding of the persistent volumes, provide a storageClassName value in the persistent volume pv.yaml file and then refer to it when you configure the deployment.

    Deploy the YAML file.

    oc apply -f pv.yaml

Results

You must use mode 770 as the access mode to directories for persistent volumes.

Example of a manual storage configuration

This example shows a storage configuration in the ICP4BA custom resource when dynamic provisioning is disabled. This configuration specifies the PersistentVolumeClaim resource to be used for Flink storage.
spec:
  bai_configuration:
    persistence:
      use_dynamic_provisioning: false
    flink_pv:
      existing_claim_name: "<FLINK_PVC_NAME>"