Configuring Content-Aware Storage (CAS) through CLI

You can use the CRs to configure CAS.

Ensure all the prerequisites are met. See Planning and prerequisites. To install CAS from the user interface of IBM Fusion, see Installing Content-Aware Storage (CAS).

Create a Scale datasource

oc apply -f - <<EOF
apiVersion: cas.isf.ibm.com/v1beta1
kind: DataSource
metadata:
  name: <datasource name>
spec:  
 scale:
  fileSystemName: <filesystem name>
  path: <fileset path>
EOF

Create a S3 datasource

For prerequisites, create a key/value secret from the OpenShift® console in CAS namespace. For other prerequisites, see Prerequisites for S3 type data source.

The following example is based on Amazon AWS.
apiVersion: cas.isf.ibm.com/v1beta1
kind: DataSource
metadata:
  name: <datasource name>
  namespace: ibm-cas
spec:  
 s3:
  bucket: <bucket name>
  endpoint: <endpoint>
  credentials:
    accessKeyRef:
      key: ""
    secretKeyRef:
      key: ""
    secretName: <Secret name>
  fileSystemName: <filesystem name>
  provider: aws
If a Group ID is defined for the underlying fileset, run the following command to add the annotation to the previously created datasource previously:
oc annotate DataSource <datasource name> group-id='310' --overwrite
Where, <datasource name> and 310 are example values that can change depending on the datasource name and the GID set in Scale.

Create a domain and add datasource to it

kubectl apply -f - <<EOF
apiVersion: cas.isf.ibm.com/v1beta1
kind: Domain
metadata:
  name: <domain name>
spec: 
  dataSources: 
  - <datasource name>
  collections:
  - name: "<domain name>"
EOF

Create a document processor

oc apply -f - <<EOF
apiVersion: cas.isf.ibm.com/v1beta1
kind: DocumentProcessor
metadata:
  name: <domain name>
spec:
  type: nvidia_multimodal
  domains:
  - <domain name>
EOF