Setting up PersistentVolume(s)

A PersistentVolume (PV) is a piece of storage in the cluster that is provisioned by an administrator or dynamically provisioned using storage classes.

You need to create a PersistentVolume to provide the required environment-specific external resources like database drivers, JCE policy files, Key Stores, and Trust Stores to enable SSL connections to the database server, MQ server, and so on.
This volume is further referenced as resources volume.

You can redirect the application logs to console, which is the recommended option, or written to a file system or a storage location outside the application containers, in which case, you need to create an additional PersistentVolume for logs.
This volume is further referenced as logs volume.

Similarly, you must map additional volumes to externalize data generated by the application during runtime, for example, documents.
To accommodate additional PersistentVolumes, the application Helm chart values.yaml provides extension points through extraVolumes and extraVolumeMounts to extend the deployment and to create additional PersistentVolume claims and volume mounts matching the additional PersistentVolumes.

For more information, see:
Prerequisites for application deployment on a container platform:
  1. Create a PersistentVolume for resources with Access mode as ReadOnlyMany and Storage less than or equal to 100Mi (can vary based on set of jars/files to be provided externally).
  2. If applicable, Create a PersistentVolume for logs with Access mode as ReadWriteMany and Storage less than or equal to 1Gi (can vary based on the log files usage and purge intervals).
  3. If applicable, Create a PersistentVolume(s) for additional values with Access mode as suitable and storage limit as suitable for the applicable use case(s).

When creating PersistentVolumes, you need to make a note of the storage class and metadata labels, which is required to configure the respective PersistentVolume claim’s storage class and label selector in the Helm chart configuration (Refer configuration section for more details) so that the claims are bound to the PersistentVolumes based on the match.

A few sample PersistentVolume templates are bundled in the Helm charts and are available under ./ibm-b2bi-prod (or ibm-sfg-prod)/ibm_cloud_pak/pak_extensions/pre-install/volume/resources-pv( or logs-pv or documents-pv).yaml. This is only for reference and can be modified as per the selected storage option/location/size and other available platform options.
You can use the container platform command line or UI to create or update PersistentVolumes.
You can use the below command to create a new PersistentVolume after the template is defined as below:

Template:
kind: PersistentVolumeapiVersion: v1metadata: name: resources-pv labels: intent: resourcesspec:
storageClassName: "standard" capacity: storage: 500Mi accessModes:- ReadOnlyMany nfs: server: 
9.37.37.47 path: /mnt/nfs/data/b2bi_resources/
Command:
Kubernetes
Kubectl create -f /path/to/pv.yaml
Openshift
oc create -f /path/to/pv.yaml
Note: You need to provide the application containers appropriate access to the shared storage mapped through PersistentVolumes using fsGroup or supplemental group IDs, which are configurable using values.yaml.