Connect external storage cluster to NSP

Purpose

Perform this procedure to connect an external storage cluster to NSP.

In this procedure, the following terms are used:

  • External storage cluster—Ceph configured that is managed outside an NSP cluster.

  • Source cluster—Ceph cluster that is providing data to the NSP cluster in the external configuration. This is the external source cluster.

  • Consumer cluster—NSP Kubernetes cluster that is consuming data from the external source cluster in the external configuration

The examples in the following procedure include sample names.

Steps
 

Log in as the root user on the NSP cluster host.


Open a console window.


On the source cluster
 

Ensure the volumes are attached to the source cluster.


Deploy the Rook operator and Ceph source cluster; see https://rook.io/docs/rook/latest/Getting-Started/quickstart/ for detailed procedures.


Execute the commands in "Commands on the source Ceph cluster" section of the following document:

https://www.rook.io/docs/rook/v1.12/CRDs/Cluster/external-cluster/

Note: Set the hostNetwork: true line in the network section of rook-ceph-cluster values.yaml to configure the Ceph pods to use the host network namespace instead of creating their own isolated network.

# Network configuration, see: https://github.com/rook/rook/blob/master/Documentation/CRDs/Cluster/ceph-cluster-crd.md#network-configuration-settings network:

  hostNetwork: true


On the consumer cluster
 

Execute the commands in "Commands on the source Ceph cluster" section of the following document:

https://www.rook.io/docs/rook/v1.12/CRDs/Cluster/external-cluster/


Configure storage classes from Step 6 in nsp-config.yaml file before installing NSP:

  1. Open the following file using a plain-text editor such as vi:

    /opt/nsp/NSP-CN-DEP-old-release-ID/NSP-CN-old-release-ID/config/nsp-config.yml

  2. Edit the following line in the platform section, kubernetes subsection to read:

    kubernetes:

      storage:

        readWriteOnceLowIOPSClass: "ceph-rbd"

        readWriteOnceHighIOPSClass: "ceph-rbd"

        readWriteOnceClassForDatabases: "ceph-rbd"

        readWriteManyLowIOPSClass: "cephfs"

        readWriteManyHighIOPSClass: "cephfs"

    where

    ceph-rbd is the storage class created in Step 6

    cephfs is the storage class created in Step 6

  3. Save and close the file.


Check PVC and PV creation using storage classes in Step 7:

# cat fs_pvc.yaml

kind: PersistentVolumeClaim

apiVersion: v1

metadata:

  name: test-rwx-cephfs-pvc

spec:

  accessModes:

    - ReadWriteMany

  storageClassName: cephfs

  resources:

    requests:

      storage: 10Gi

# kubectl create -f fs_pvc.yaml

persistentvolumeclaim/test-rwx-cephfs-pvc created

# kubectl get pvc -A

NAMESPACE   NAME   STATUS   VOLUME      CAPACITY   ACCESS MODES   STORAGECLASS   AGE

default     name   Bound    volume_id   size       RWX            cephfs         4s

End of steps