Accessing files for applications and configurations

In Cloud Pak for Business Automation, the file system is persistent and shared between pods only if you use persistent volumes (PVs).

There are many reasons that you might want to use the file system, for example:
  • Put a custom file into the pod for use in a configuration customization, such as a custom Liberty data source.
  • Put custom files into the pod for use with your application code.
  • Output files from your application code to a file location.

You can use the oc cp command to work with files in the PV in the pods or you can directly interact with your storage solution. You can customize your persistent volume claim (PVC) by using custom resource (CR) parameters. You can see all the available parameters under Custom resource configuration parameters.

The following examples show how to use oc cp.
  • Put a driver file into the PV for use in a custom data source:
    oc cp ./driverfile.jar <workflow server pod>:/opt/ibm/bawfile/
  • Pull application files from the PV:
    oc cp <workflow server pod>:/opt/ibm/bawfile/appoutputdirectory/ ./appoutput/
You can use oc rsh <pod name> and mkdir to create any needed directory structure in the persistent volume under the mount point. When you understand how to work with files in the PV, you can point your applications or configurations at the appropriate file locations inside the pod by using the mount point and any internal directory structure in the PV.

For Workflow

For Workflow components, a PV and associated persistent volume claim (PVC) are created by default for file storage based on the sc_medium_file_storage_classname StorageClass. You can create any needed directory structure at the mount point and put any needed files into the appropriate location.
Component Default PVC Name Suffix Default Size Mount Point
Workflow Runtime baw-file-storage-pvc 1 GB /opt/ibm/bawfile/
Workflow Authoring baw-file-storage-pvc 1 GB /opt/ibm/bawfile/
Studio bastudio-files-pvc 1 GB /opt/ibm/bawfile/
For Workflow components, the PVC and size can be customized with the custom resource (CR) parameters if you search for "filestore". When using workflow components in a starter deployment, the studio PVC is created by using the sc_dynamic_storage_classname and is impacted by the settings from workflow_authoring_configuration for the filestore PV.

For Workflow Process Service

For Workflow Process Service there is no default PVC created. You need to create the PVC manually, and add it as the node.customFilePVC parameter in your CR. This PVC can be used to contain custom files and is mounted at /opt/ibm/bawfile. The AccessMode of the PVC should be ROX or RWX. RWO is not recommended because it has an adverse effect on high availability since all pods are allocated to the same node.