About this task
To set up
NetApp Trident for
IBM Software
Hub, you must:
- Create a storage class with read, write, and execute permissions on the local file system.
- Create a volume snapshot storage class for backing up IBM Software
Hub.
Remember: Storage classes are cluster-wide resources.
Procedure
-
Log in to Red Hat
OpenShift Container Platform as a user with sufficient permissions to
complete the
task.
${OC_LOGIN}
Remember:
OC_LOGIN is an alias for the oc login command.
- Set the following environment variables:
- Set the
NETAPP_USERNAME environment variable to
the username of the user who provisioned the storage.
export NETAPP_USERNAME=<username>
- Set the
NETAPP_PASSWORD environment variable to the
password of the user who provisioned the storage.
export NETAPP_PASSWORD=<password>
- Set the
TRIDENT_OPERATOR_NAMESPACE environment
variable to the OpenShift project where
the NetApp Trident operator is installed.
export TRIDENT_OPERATOR_NAMESPACE=<operator-namespace>
- Set the
MANAGEMENT_LIF environment variable to the IP
address associated with the NetApp Trident
LIF.
For more information, see Display LIF information in the NetApp Trident documentation.
export MANAGEMENT_LIF=<management-lif>
- Set the
STORAGE_VM environment variable to the
storage virtual machine (SVM) that you want to set up.
- Create a secret for the backend:
cat <<EOF |oc apply -f -
apiVersion: v1
kind: Secret
metadata:
name: backend-tbc-ontap-nas-advanced-secret
namespace: ${TRIDENT_OPERATOR_NAMESPACE}
type: Opaque
stringData:
username: ${NETAPP_USERNAME}
password: ${NETAPP_PASSWORD}
EOF
- Create the backend.
Run the appropriate command for your storage type.
Self-managed NetApp Trident
cat <<EOF |oc apply -f -
apiVersion: trident.netapp.io/v1
kind: TridentBackendConfig
metadata:
name: backend-tbc-ontap-nas-advanced
namespace: ${TRIDENT_OPERATOR_NAMESPACE}
spec:
version: 1
storageDriverName: ontap-nas
managementLIF: ${MANAGEMENT_LIF}
backendName: tbc-ontap-nas-advanced
svm: ${STORAGE_VM}
credentials:
name: backend-tbc-ontap-nas-advanced-secret
nfsMountOptions: nfsvers=3,nolock
autoExportPolicy: true
defaults:
spaceReserve: none
deletionPolicy: delete
EOF
Amazon FSx for NetApp ONTAP
cat <<EOF |oc apply -f -
apiVersion: trident.netapp.io/v1
kind: TridentBackendConfig
metadata:
name: backend-fsx-ontap-nas
namespace: ${TRIDENT_OPERATOR_NAMESPACE}
spec:
version: 1
backendName: tbc-ontap-nas-advanced
storageDriverName: ontap-nas
managementLIF: ${MANAGEMENT_LIF}
svm: ${STORAGE_VM}
credentials:
name: backend-tbc-ontap-nas-advanced-secret
nfsMountOptions: nfsvers=3,nolock
EOF
- Check whether the
TridentBackendConfig custom resource was successfully
created and bound. Run the appropriate command for your storage type.
Self-managed NetApp Trident
oc get tbc backend-tbc-ontap-nas-advanced \
--namespace=${TRIDENT_OPERATOR_NAMESPACE}
Amazon FSx for NetApp ONTAP
oc get tbc backend-fsx-ontap-nas \
--namespace=${TRIDENT_OPERATOR_NAMESPACE}
- Create the storage class.
The following sample includes the minimum required information for the storage class:
cat <<EOF |oc apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ontap-nas
provisioner: csi.trident.netapp.io
parameters:
backendType: ontap-nas
storagePools: "tbc-ontap-nas-advanced:.*"
fsType: "nfs"
allowVolumeExpansion: true
mountOptions:
- nfsvers=3
- nolock
EOF
- Create the following volume snapshot storage class:
cat << EOF | oc apply -f -
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-snapclass
labels:
velero.io/csi-volumesnapshot-class: "true"
driver: csi.trident.netapp.io
deletionPolicy: Retain
EOF
What to do next
Now that you've created the storage class, you are ready to complete Creating custom security context constraints for services.