One challenge customers often face is how to deal with files in a container environment. When you are not the builder of a container then you do not have knowledge or control over the filesystem. Additionally the filesystem isn't persistent or shared between pods unless you use persistent volumes. The persistent volumes available are also controlled by the person building the platform in an operator controlled environment. So it is important to know what persistent volumes are available and the intended usage for them.
In this article I would like to talk more in depth about a particular type of persistent volume and the usage of it for Workflow and BA Studio parts of the Cloud Pak for Business Automation. This would also apply to Business Automation Workflow(BAW) container deployments.
The following use cases can come up but it isn't always clear how to work with the file system.
- You need to place a custom file into the pod for use in a configuration customization like with a custom liberty datasource.
- You need to place custom files into the pod for use with your application code.
- You need to output files from your application code to some file location.
For the workflow components there is a persistent volume(PV) and associated persistent volume claim(PVC) created by default for file storage that can be used for these purpose. You can create any needed directory structure at the mount point and place any needed files into the appropriate location. The following table provides default details you need to interact with the filestore.
Component |
PVC Name Suffix |
Default Size |
Mount Point |
Workflow Runtime |
baw-file-storage-pvc |
1GB |
/opt/ibm/bawfile/ |
Workflow Authoring |
baw-file-storage-pvc |
1GB |
/opt/ibm/bawfile/ |
BA Studio |
bastudio-files-pvc |
1GB |
/opt/ibm/bawfile/ |
For Workflow components, the PVC and size can be customized with CR parameters mentioned in the linked reference pages if you search for filestore.
(New in 21.0.3) The BA Studio PVC uses the settings from for the filestore PV.
Note: Starting in 21.0.3, if you are using workflow in a starter pattern then it would run inside BA Studio pods.
You can use the
oc cp command to work with files in the PV via the pods or you can directly interact with your storage solution.
Here are some examples of
oc cp usage.
- Place a driver file into the PV for usage in a custom datasource.
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 make use of
oc rsh <pod name> and
mkdir to create any needed directory structure in the persistent volume under the mount point.
Once you understand how to work with files in the persistent volume, you can point your applications or configurations at the appropriate file locations inside the pod using the mount point and any internal directory structure in the persistent volume.