### Deploy HPE CSI Driver v2.5.1 Example Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This snippet provides the YAML configuration for deploying HPE CSI Driver version 2.5.1. It outlines the specific image versions for CSI components and configuration details for controllers, nodes, and CSPs, intended for deployment via `oc apply`. ```yaml # oc apply -n hpe-storage -f https://scod.hpedev.io/csi_driver/examples/deployment/hpecsidriver-v2.5.1-sample.yaml apiVersion: storage.hpe.com/v1 kind: HPECSIDriver metadata: name: hpecsidriver-sample spec: # Default values copied from /helm-charts/hpe-csi-driver/values.yaml controller: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] csp: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] disable: alletra6000: false alletra9000: false alletraStorageMP: false nimble: false primera: false disableHostDeletion: false disableNodeConfiguration: false disableNodeConformance: false disableNodeGetVolumeStats: false disableNodeMonitor: false disablePreInstallHooks: false imagePullPolicy: IfNotPresent images: csiAttacher: registry.k8s.io/sig-storage/csi-attacher:v4.8.0 csiControllerDriver: quay.io/hpestorage/csi-driver:v2.5.1 csiExtensions: quay.io/hpestorage/csi-extensions:v1.2.8 csiNodeDriver: quay.io/hpestorage/csi-driver:v2.5.1 csiNodeDriverRegistrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 csiProvisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 csiResizer: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 csiSnapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0 csiVolumeGroupProvisioner: quay.io/hpestorage/volume-group-provisioner:v1.0.7 csiVolumeGroupSnapshotter: quay.io/hpestorage/volume-group-snapshotter:v1.0.7 csiVolumeMutator: quay.io/hpestorage/volume-mutator:v1.3.7 nfsProvisioner: quay.io/hpestorage/nfs-provisioner:v3.0.6 nimbleCSP: quay.io/hpestorage/alletra-6000-and-nimble-csp:v2.5.1 primera3parCSP: quay.io/hpestorage/alletra-9000-primera-and-3par-csp:v2.5.1 iscsi: chapSecretName: "" kubeletRootDir: /var/lib/kubelet logLevel: info maxVolumesPerNode: 100 node: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] ``` -------------------------------- ### Deploy HPE CSI Driver v3.0.1 Example Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This snippet shows the YAML configuration for deploying HPE CSI Driver version 3.0.1. It specifies image versions for various CSI components and configurations for controllers, nodes, and storage CSPs. It is applied using `oc apply`. ```yaml apiVersion: storage.hpe.com/v1 kind: HPECSIDriver metadata: name: hpecsidriver-sample spec: # Default values copied from /helm-charts/hpe-csi-driver/values.yaml controller: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] csp: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] disable: alletra6000: false alletra9000: false alletraStorageMP: false b10000FileService: false nimble: false primera: false disableHostDeletion: false disableNodeConfiguration: false disableNodeConformance: false disableNodeGetVolumeStats: false disableNodeMonitor: false disablePreInstallHooks: false imagePullPolicy: IfNotPresent images: b10000FileServiceCSP: quay.io/hpestorage/alletrastoragemp-b10000-nfs-csp:v1.0.0 csiAttacher: registry.k8s.io/sig-storage/csi-attacher:v4.9.0 csiControllerDriver: quay.io/hpestorage/csi-driver:v3.0.0 csiExtensions: quay.io/hpestorage/csi-extensions:v1.2.9 csiNodeDriver: quay.io/hpestorage/csi-driver:v3.0.0 csiNodeDriverRegistrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.14.0 csiProvisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.3.0 csiResizer: registry.k8s.io/sig-storage/csi-resizer:v1.13.2 csiSnapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.1 csiVolumeGroupProvisioner: quay.io/hpestorage/volume-group-provisioner:v1.0.8 csiVolumeGroupSnapshotter: quay.io/hpestorage/volume-group-snapshotter:v1.0.8 csiVolumeMutator: quay.io/hpestorage/volume-mutator:v1.3.8 nfsProvisioner: quay.io/hpestorage/nfs-provisioner:v3.0.8 nimbleCSP: quay.io/hpestorage/alletra-6000-and-nimble-csp:v3.0.0 primera3parCSP: quay.io/hpestorage/alletra-9000-primera-and-3par-csp:v3.0.1 iscsi: chapSecretName: "" kubeletRootDir: /var/lib/kubelet logLevel: info maxVolumesPerNode: 100 node: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] ``` -------------------------------- ### Deploy HPE CSI Driver v2.5.2 Example Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This snippet displays the YAML configuration for deploying HPE CSI Driver version 2.5.2. It details the image versions for CSI components and settings for controllers, nodes, and CSPs. The deployment is performed using `oc apply`. ```yaml apiVersion: storage.hpe.com/v1 kind: HPECSIDriver metadata: name: hpecsidriver-sample spec: # Default values copied from /helm-charts/hpe-csi-driver/values.yaml controller: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] csp: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] disable: alletra6000: false alletra9000: false alletraStorageMP: false nimble: false primera: false disableHostDeletion: false disableNodeConfiguration: false disableNodeConformance: false disableNodeGetVolumeStats: false disableNodeMonitor: false disablePreInstallHooks: false imagePullPolicy: IfNotPresent images: csiAttacher: registry.k8s.io/sig-storage/csi-attacher:v4.8.0 csiControllerDriver: quay.io/hpestorage/csi-driver:v2.5.2 csiExtensions: quay.io/hpestorage/csi-extensions:v1.2.8 csiNodeDriver: quay.io/hpestorage/csi-driver:v2.5.2 csiNodeDriverRegistrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 csiProvisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 csiResizer: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 csiSnapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.2.0 csiVolumeGroupProvisioner: quay.io/hpestorage/volume-group-provisioner:v1.0.7 csiVolumeGroupSnapshotter: quay.io/hpestorage/volume-group-snapshotter:v1.0.7 csiVolumeMutator: quay.io/hpestorage/volume-mutator:v1.3.7 nfsProvisioner: quay.io/hpestorage/nfs-provisioner:v3.0.6 nimbleCSP: quay.io/hpestorage/alletra-6000-and-nimble-csp:v2.5.2 primera3parCSP: quay.io/hpestorage/alletra-9000-primera-and-3par-csp:v2.5.2 iscsi: chapSecretName: "" kubeletRootDir: /var/lib/kubelet logLevel: info maxVolumesPerNode: 100 node: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] ``` -------------------------------- ### Kubectl: Get Resource Examples Source: https://scod.hpedev.io/learn/persistent_storage/index Demonstrates how to retrieve information about Kubernetes resources like nodes. It covers fetching all nodes or a specific node by its name. These commands are fundamental for inspecting the state of your cluster. ```bash kubectl get nodes kubectl get node ``` -------------------------------- ### Deploy HPE CSI Driver v2.5.1 Example Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This YAML configuration deploys version 2.5.1 of the HPE CSI Driver. It specifies various parameters for controller, CSP, and node components, including resource requests and limits, image configurations, and disable flags for different HPE storage types. It's applied using the `oc apply` command with the `-n hpe-storage` namespace. ```yaml apiVersion: storage.hpe.com/v1 kind: HPECSIDriver metadata: name: hpecsidriver-sample spec: # Default values copied from /helm-charts/hpe-csi-driver/values.yaml controller: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] csp: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] disable: alletra6000: false alletra9000: false alletraStorageMP: false nimble: false primera: false disableHostDeletion: false disableNodeConfiguration: false disableNodeConformance: false disableNodeGetVolumeStats: false disableNodeMonitor: false imagePullPolicy: IfNotPresent images: csiAttacher: registry.k8s.io/sig-storage/csi-attacher:v4.6.1 csiControllerDriver: quay.io/hpestorage/csi-driver:v2.5.0 csiExtensions: quay.io/hpestorage/csi-extensions:v1.2.7 csiNodeDriver: quay.io/hpestorage/csi-driver:v2.5.0 csiNodeDriverRegistrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.1 csiProvisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 csiResizer: registry.k8s.io/sig-storage/csi-resizer:v1.11.1 csiSnapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.0.1 csiVolumeGroupProvisioner: quay.io/hpestorage/volume-group-provisioner:v1.0.6 csiVolumeGroupSnapshotter: quay.io/hpestorage/volume-group-snapshotter:v1.0.6 csiVolumeMutator: quay.io/hpestorage/volume-mutator:v1.3.6 nfsProvisioner: quay.io/hpestorage/nfs-provisioner:v3.0.5 nimbleCSP: quay.io/hpestorage/alletra-6000-and-nimble-csp:v2.5.0 primera3parCSP: quay.io/hpestorage/alletra-9000-primera-and-3par-csp:v2.5.0 iscsi: chapSecretName: "" kubeletRootDir: /var/lib/kubelet logLevel: info node: affinity: {} labels: {} nodeSelector: {} resources: limits: cpu: 2000m memory: 1Gi requests: cpu: 100m memory: 128Mi tolerations: [] ``` -------------------------------- ### Deploy HPE CSI Driver v2.4.2 Example Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This YAML configuration applies version 2.4.2 of the HPE CSI Driver. It outlines parameters for controller, CSP, and node configurations, including affinities, labels, and tolerations. It also specifies image pull policy and iSCSI CHAP credentials. The deployment is initiated with `oc apply` in the `hpe-storage` namespace. ```yaml # oc apply -n hpe-storage -f https://scod.hpedev.io/csi_driver/examples/deployment/hpecsidriver-v2.4.2-sample.yaml apiVersion: storage.hpe.com/v1 kind: HPECSIDriver metadata: name: hpecsidriver-sample spec: # Default values copied from /helm-charts/hpe-csi-driver/values.yaml controller: affinity: {} labels: {} nodeSelector: {} tolerations: [] csp: affinity: {} labels: {} nodeSelector: {} tolerations: [] disable: alletra6000: false alletra9000: false alletraStorageMP: false nimble: false primera: false disableNodeConfiguration: false disableNodeConformance: false disableNodeGetVolumeStats: false imagePullPolicy: IfNotPresent iscsi: chapPassword: "" chapUser: "" kubeletRootDir: /var/lib/kubelet/ logLevel: info node: affinity: {} labels: {} nodeSelector: {} tolerations: [] registry: quay.io ``` -------------------------------- ### Kubectl: Describe Resource Example Source: https://scod.hpedev.io/learn/persistent_storage/index Shows how to get detailed information about a specific Kubernetes resource, such as a node. The 'describe' command provides in-depth attributes and status, useful for troubleshooting. ```bash kubectl describe node ``` -------------------------------- ### Configure NetworkPolicy Backend Endpoints Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index Defines backend network endpoints for NetworkPolicies, specifying IP addresses and ports for communication with storage systems. This example configures access for Nimble Storage and Alletra 5000/6000 series at IP '192.168.1.67' on ports 443 and 5392. ```yaml # Nimble Storage and Alletra 5000/6000 - to: - ipBlock: cidr: 192.168.1.67/32 ports: - port: 443 protocol: TCP - port: 5392 protocol: TCP ``` -------------------------------- ### Create Subscription for HPE CSI Operator Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This YAML defines a Subscription to the HPE CSI Operator from the 'certified-operators' channel. It specifies manual approval for installations and the source namespace within the OpenShift marketplace. ```yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: hpe-csi-operator namespace: hpe-storage spec: channel: stable installPlanApproval: Manual name: hpe-csi-operator source: certified-operators sourceNamespace: openshift-marketplace ``` -------------------------------- ### Install HPE Cloud Volumes Plugin on Debian Source: https://scod.hpedev.io/docker_volume_plugins/hpe_cloud_volumes/index Commands for installing and configuring the HPE Cloud Volumes Plugin on Debian 9.x (stable). It covers package installation, plugin setup with specific paths for iscsiadm and glibc, and service management. ```bash apt-get install -y open-iscsi multipath-tools xfsprogs modprobe xfs sed -i"" -e "$axfs" /etc/modules docker plugin install --disable --grant-all-permissions --alias cvblock store/hpestorage/cvblock:3.1.0 docker plugin set cv PROVIDER_IP=cloudvolumes.hpe.com PROVIDER_USERNAME= PROVIDER_PASSWORD= iscsiadm.source=/usr/bin/iscsiadm glibc_libs.source=/lib/x86_64-linux-gnu docker plugin enable cvblock systemctl daemon-reload systemctl restart open-iscsi multipath-tools ``` -------------------------------- ### Nimble Volume Driver JSON Configuration Example Source: https://scod.hpedev.io/docker_volume_plugins/hpe_nimble_storage/index Example of the `/etc/hpe-storage/volume-driver.json` file, demonstrating the structure for global, defaults, and overrides sections. This file configures runtime parameters and default settings for Docker volumes managed by the HPE Nimble Storage driver. ```json { "global": { "nameSuffix": ".docker" }, "defaults": { "description": "Volume provisioned by Docker", "protectionTemplate": "Retain-90Daily" }, "overrides": { "folder": "docker-prod" } } ``` -------------------------------- ### Approve HPE CSI Operator Installation Plan Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This command approves the pending installation plan for the HPE CSI Operator, allowing the deployment process to proceed after the Subscription has been created. It targets the 'hpe-storage' namespace. ```bash oc -n hpe-storage patch $(oc get installplans -n hpe-storage -o name) -p '{"spec":{"approved":true}}' --type merge ``` -------------------------------- ### Setup Working Directory and Environment Variables (Shell) Source: https://scod.hpedev.io/csi_driver/deployment Creates a working directory and sets environment variables for the private registry and CSI driver version. This is a prerequisite for subsequent steps. ```shell mkdir hpe-csi-driver cd hpe-csi-driver export MY_REGISTRY=registry.enterprise.example.com export MY_CSI_DRIVER=3.0.1 ``` -------------------------------- ### Kubernetes Pod Description Output Example Source: https://scod.hpedev.io/learn/persistent_storage/index This is an example output of the `kubectl describe pod` command for a running NGINX Pod. It provides detailed information about the Pod's status, node assignment, container details, volumes, and events, which is useful for troubleshooting. ```text Name: first-nginx-pod-8d7bb985-rrdv8 Namespace: default Priority: 0 Node: kube-group1/10.90.200.11 Start Time: Mon, 01 Nov 2021 13:37:59 -0500 Labels: pod-template-hash=8d7bb985 run=nginx-first-pod Annotations: cni.projectcalico.org/podIP: 192.168.162.9/32 cni.projectcalico.org/podIPs: 192.168.162.9/32 Status: Running IP: 192.168.162.9 IPs: IP: 192.168.162.9 Controlled By: ReplicaSet/first-nginx-pod-8d7bb985 Containers: nginx: Container ID: docker://3610d71c054e6b8fdfffbf436511fda048731a456b9460ae768ae7db6e831398 Image: nginx Image ID: docker-pullable://nginx@sha256:644a70516a26004c97d0d85c7fe1d0c3a67ea8ab7ddf4aff193d9f301670cf36 Port: Host Port: State: Running Started: Mon, 01 Nov 2021 13:38:06 -0500 Ready: True Restart Count: 0 Environment: Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-w7sbw (ro) Conditions: Type Status Initialized True Ready True ContainersReady True PodScheduled True Volumes: kube-api-access-w7sbw: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: DownwardAPI: true QoS Class: BestEffort Node-Selectors: Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 5m14s default-scheduler Successfully assigned default/first-nginx-pod-8d7bb985-rrdv8 to kube-group1 Normal Pulling 5m13s kubelet Pulling image "nginx" Normal Pulled 5m7s kubelet Successfully pulled image "nginx" in 5.95086952s Normal Created 5m7s kubelet Created container nginx Normal Started 5m7s kubelet Started container nginx ``` -------------------------------- ### Install Specific HPE CSI Driver Operator Version (v2.4.2 and older) Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index Installs a specific version of the HPE CSI Driver Operator bundle, prior to and including v2.4.2, using the Operator SDK. Ensure a recent version of `operator-sdk` is available and no HPE CSI Driver is currently installed. ```shell operator-sdk run bundle --timeout 5m -n hpe-storage quay.io/hpestorage/csi-driver-operator-bundle:v2.4.2 ``` -------------------------------- ### Kubectl: Create Resource Example Source: https://scod.hpedev.io/learn/persistent_storage/index Illustrates creating Kubernetes resources from a file or URL using kubectl. This command is essential for deploying applications and configurations defined in YAML. ```bash kubectl create -f ``` -------------------------------- ### Install Specific HPE CSI Driver Operator Version (v2.5.0 and newer) Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index Installs a specific version of the HPE CSI Driver Operator bundle, after and including v2.5.0, using the Operator SDK with restricted security context configuration. Ensure a recent version of `operator-sdk` is available and no HPE CSI Driver is currently installed. ```shell operator-sdk run bundle --security-context-config=restricted --timeout 5m -n hpe-storage quay.io/hpestorage/csi-driver-operator-bundle-ocp:v3.0.1 ``` -------------------------------- ### Verify Pod Status with kubectl Source: https://scod.hpedev.io/csi_driver/using This command retrieves the status of the 'my-pod' Pod. It is used to verify that the Pod has started successfully and is running, indicating that the volume has been attached, formatted, and mounted as expected. ```bash kubectl get pod my-pod ``` -------------------------------- ### Install HPE CSI Driver Helm Chart (Newer Versions) (Shell) Source: https://scod.hpedev.io/csi_driver/deployment Installs the HPE CSI Driver Helm chart for versions 2.5.0 and newer, using a custom 'my-values.yaml' file that specifies the private registry. ```shell helm install my-hpe-csi-driver hpe-storage/hpe-csi-driver \ -n hpe-storage --version ${MY_CSI_DRIVER} \ -f my-values.yaml ``` -------------------------------- ### Run Ansible Playbook for HPE 3PAR Volume Driver Installation Source: https://scod.hpedev.io/flexvolume_driver/hpe_3par_primera_installer/index This command executes the Ansible playbook to install the HPE 3PAR volume driver. It requires navigating to the playbook's directory and using the `ansible-playbook` command with the appropriate inventory file (`hosts`) and playbook name (`install_hpe_3par_volume_driver.yml`). ```bash cd python-hpedockerplugin/ansible_3par_docker_plugin/ ansible-playbook -i hosts install_hpe_3par_volume_driver.yml ``` -------------------------------- ### Create OpenShift Project for HPE CSI Operator Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This command creates a new OpenShift project named 'hpe-storage' to host the HPE CSI Operator. It's a foundational step for isolating the operator's resources. ```bash oc new-project hpe-storage --display-name="HPE CSI Operator for OpenShift" ``` -------------------------------- ### Install HPE CSI Driver Helm Chart (Older Versions) (Shell) Source: https://scod.hpedev.io/csi_driver/deployment Installs the HPE CSI Driver Helm chart for versions 2.4.2 or earlier, specifying the private registry using the `--set registry` parameter. ```shell helm install my-hpe-csi-driver hpe-storage/hpe-csi-driver -n hpe-storage --version v2.4.2 --set registry=${MY_REGISTRY} ``` -------------------------------- ### Upgrade HPE Dynamic Provisioner Driver Source: https://scod.hpedev.io/flexvolume_driver/hpe_3par_primera_installer/index This example shows how to upgrade the HPE Dynamic Provisioner driver by modifying the volume plugin version in the Ansible configuration file and re-running the installation playbook. Ensure you use the latest image tag from Docker Hub. ```yaml volume_plugin: hpestorage/legacyvolumeplugin:3.3 Change to: volume_plugin: hpestorage/legacyvolumeplugin:3.3.1 ``` -------------------------------- ### HPE Nimble Docker Plugin Installation - Debian Source: https://scod.hpedev.io/docker_volume_plugins/hpe_nimble_storage/index Installs and configures the HPE Nimble Storage Volume Plugin on Debian 9.x. This process involves installing necessary packages, setting up the module for XFS, installing the plugin, specifying the iscsiadm source, configuring provider details, enabling the plugin, and restarting services. ```bash apt-get install -y open-iscsi multipath-tools xfsprogs modprobe xfs sed -i"" -e "$axfs" /etc/modules docker plugin install --disable --grant-all-permissions --alias nimble store/nimblestorage/nimble:3.1.0 docker plugin set nimble PROVIDER_IP=192.168.1.1 PROVIDER_USERNAME=admin PROVIDER_PASSWORD=admin iscsiadm.source=/usr/bin/iscsiadm glibc_libs.source=/lib/x86_64-linux-gnu docker plugin enable nimble systemctl daemon-reload systemctl restart open-iscsi multipath-tools ``` -------------------------------- ### HPE Nimble Docker Plugin Installation - Ubuntu Source: https://scod.hpedev.io/docker_volume_plugins/hpe_nimble_storage/index Installs and configures the HPE Nimble Storage Volume Plugin on Ubuntu 16.04 LTS or 18.04 LTS. This includes installing required packages, setting up the module for XFS, installing the plugin, configuring provider details, enabling it, and restarting relevant services. ```bash apt-get install -y open-iscsi multipath-tools xfsprogs modprobe xfs sed -i"" -e "$axfs" /etc/modules docker plugin install --disable --grant-all-permissions --alias nimble store/nimblestorage/nimble:3.1.0 docker plugin set nimble PROVIDER_IP=192.168.1.1 PROVIDER_USERNAME=admin PROVIDER_PASSWORD=admin glibc_libs.source=/lib/x86_64-linux-gnu docker plugin enable nimble systemctl daemon-reload systemctl restart open-iscsi multipath-tools ``` -------------------------------- ### Install CSI Snapshot CRDs and Controller (Kubernetes 1.28-1.31) Source: https://scod.hpedev.io/filex_csi_driver/using This snippet demonstrates how to install the CSI snapshot CRDs and the common snapshot controller for Kubernetes versions 1.28 through 1.31. It involves cloning the external-snapshotter repository, checking out a specific tag, and applying the configurations using kubectl. ```bash # Kubernetes 1.28-1.31 git clone https://github.com/kubernetes-csi/external-snapshotter cd external-snapshotter git checkout tags/v8.0.1 -b hpe-greenlake-for-file-csi-driver-v1.0.0-beta kustomize client/config/crd | kubectl create -f- kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f- ``` -------------------------------- ### Patch HPE Volume Info CRD for Multi-Initiator VM Migration Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index This command patches the `hpevolumeinfo` Custom Resource Definition (CRD) to enable multi-initiator support, which is necessary for live VM migrations when a PVC is cloned from an OS image on Alletra Storage MP B10000 backends. ```shell oc patch hpevolumeinfo/${MY_PV_NAME} --type=merge --patch '{"spec": {"record": {"MultiInitiator": "true"}}}' ``` -------------------------------- ### List VolumeSnapshots Source: https://scod.hpedev.io/csi_driver/using Lists all available VolumeSnapshots in the current namespace. This command is used to verify if snapshots have been successfully created after a SnapshotGroup is processed. ```bash kubectl get volumesnapshots ``` -------------------------------- ### Install HPE GreenLake File CSI Driver Operator Bundle with operator-sdk Source: https://scod.hpedev.io/filex_csi_driver/deployment Installs the HPE GreenLake for File Storage CSI Driver Operator bundle using the 'operator-sdk' command. This command deploys the operator to the specified namespace ('hpe-storage') with a timeout of 5 minutes. ```bash operator-sdk run bundle --timeout 5m -n hpe-storage quay.io/hpestorage/filex-csi-driver-operator-bundle-ocp:v1.0.0-beta3 ``` -------------------------------- ### HPE Nimble Docker Plugin Installation - Red Hat/CentOS Source: https://scod.hpedev.io/docker_volume_plugins/hpe_nimble_storage/index Installs and configures the HPE Nimble Storage Volume Plugin on Red Hat 7.5+ or CentOS 7.5+. It installs necessary packages, the plugin itself, sets provider details, enables the plugin, and reloads system services. ```bash yum install -y iscsi-initiator-utils device-mapper-multipath docker plugin install --disable --grant-all-permissions --alias nimble store/nimblestorage/nimble:3.1.0 docker plugin set nimble PROVIDER_IP=192.168.1.1 PROVIDER_USERNAME=admin PROVIDER_PASSWORD=admin docker plugin enable nimble systemctl daemon-reload systemctl enable iscsid multipathd systemctl start iscsid multipathd ``` -------------------------------- ### HPE Storage Volume Driver Configuration Source: https://scod.hpedev.io/docker_volume_plugins/hpe_cloud_volumes/index Example JSON configuration file for the HPE Storage Volume Driver. This file defines global, default, and override options for volume creation. ```json { "global": { "snapPrefix": "BaseFor", "initiators": ["eth0"], "automatedConnection": true, "existingCloudSubnet": "10.1.0.0/24", "region": "us-east-1", "privateCloud": "vpc-data", "cloudComputeProvider": "Amazon AWS" }, "defaults": { "limitIOPS": 1000, "fsOwner": "0:0", "fsMode": "600", "description": "Volume provisioned by the HPE Volume Driver for Kubernetes FlexVolume Plugin", "perfPolicy": "Other", "protectionTemplate": "twicedaily:4", "encryption": true, "volumeType": "PF", "destroyOnRm": true }, "overrides": { } } ``` -------------------------------- ### Install HPE CSI Driver on MicroK8s using Helm Source: https://scod.hpedev.io/csi_driver/partners/canonical/index Installs the HPE CSI Driver for Kubernetes on MicroK8s using the Helm chart. It requires specifying the `kubeletRootDir` to ensure proper functionality with MicroK8s' snap confinement. This method is recommended over advanced YAML installations. ```bash microk8s helm install --create-namespace \ --set kubeletRootDir=/var/snap/microk8s/common/var/lib/kubelet \ -n hpe-storage my-hpe-csi-driver hpe-storage/hpe-csi-driver ``` -------------------------------- ### Install HPE 3PAR Volume Driver with Ansible Source: https://scod.hpedev.io/flexvolume_driver/hpe_3par_primera_installer/index This command executes the Ansible playbook to install the HPE 3PAR volume driver on the Kubernetes cluster, using the specified hosts inventory. ```bash $ ansible-playbook -i hosts install_hpe_3par_volume_driver.yml ``` -------------------------------- ### Create SnapshotGroup from VolumeGroup Source: https://scod.hpedev.io/csi_driver/using Creates a SnapshotGroup resource using a VolumeGroup as the source. It references a SnapshotGroupClass and a VolumeSnapshotClass to manage snapshots of the entire group. ```yaml apiVersion: storage.hpe.com/v1 kind: SnapshotGroup metadata: name: my-snapshot-group-1 spec: source: kind: VolumeGroup apiGroup: storage.hpe.com name: my-volume-group snapshotGroupClassName: my-snapshot-group-class volumeSnapshotClassName: hpe-snapshot ``` -------------------------------- ### Install Ansible using pip Source: https://scod.hpedev.io/flexvolume_driver/hpe_3par_primera_installer/index Installs the Ansible package using pip. Ensure Ansible version 2.5 to 2.8 is installed on the deployment machine. This command does not require installation on the Kubernetes cluster itself. ```bash pip install ansible ansible --version ``` -------------------------------- ### Verify HPE 3PAR Volume Driver Installation with Docker Source: https://scod.hpedev.io/flexvolume_driver/hpe_3par_primera_installer/index This command verifies the installation of the HPE 3PAR volume plugin containers across multiple nodes using SSH. It checks for running `plugin_container` instances associated with the `hpestorage/legacyvolumeplugin` image. This step is crucial for confirming the plugin's operational status in a distributed environment. ```bash $ docker ps | grep plugin; ssh "docker ps | grep plugin";ssh "docker ps | grep plugin";ssh "docker ps | grep plugin";ssh "docker ps | grep plugin" ``` -------------------------------- ### Install HPE Cloud Volumes Plugin on Ubuntu Source: https://scod.hpedev.io/docker_volume_plugins/hpe_cloud_volumes/index Commands to install and configure the HPE Cloud Volumes Plugin on Ubuntu 16.04 LTS and 18.04 LTS. This involves installing required packages, enabling the plugin with specific configurations, and restarting relevant services. ```bash apt-get install -y open-iscsi multipath-tools xfsprogs modprobe xfs sed -i"" -e "$axfs" /etc/modules docker plugin install --disable --grant-all-permissions --alias cvblock store/hpestorage/cvblock:3.1.0 docker plugin set cv PROVIDER_IP=cloudvolumes.hpe.com PROVIDER_USERNAME= PROVIDER_PASSWORD= glibc_libs.source=/lib/x86_64-linux-gnu docker plugin enable cvblock systemctl daemon-reload systemctl restart open-iscsi multipath-tools ``` -------------------------------- ### Install HPE CSI Driver Helm Chart Source: https://scod.hpedev.io/learn/persistent_storage/index Creates the 'hpe-storage' namespace and installs the HPE CSI Driver Helm chart named 'my-hpe-csi-driver'. This deploys the necessary components for the CSI driver in the Kubernetes cluster. ```bash kubectl create ns hpe-storage helm install my-hpe-csi-driver hpe-storage/hpe-csi-driver -n hpe-storage ``` -------------------------------- ### Install HPE CSI Driver with Helm Source: https://context7.com/context7/scod_hpedev_io/llms.txt Installs the HPE CSI Driver for Kubernetes using Helm charts. This method requires adding the HPE Storage Helm repository, creating a namespace, and setting up a Kubernetes Secret with backend storage credentials. The installation is verified by checking the status of controller and node pods. ```bash # Add the HPE Storage Helm repository helm repo add hpe-storage https://hpe-storage.github.io/co-deployments/ # Create the namespace kubectl create ns hpe-storage # Create backend storage Secret kubectl create secret generic hpe-backend \ --from-literal=serviceName=alletra-9000-1.example.com \ --from-literal=servicePort=443 \ --from-literal=username=admin \ --from-literal=password=MySecurePassword123 \ --from-literal=backend=192.168.1.50 \ -n hpe-storage # Install the CSI driver with version 3.0.1 helm install my-hpe-csi-driver hpe-storage/hpe-csi-driver \ -n hpe-storage \ --version 3.0.1 # Verify the installation kubectl get pods -n hpe-storage # Expected output shows controller and node pods in Running state: # NAME READY STATUS RESTARTS AGE # hpe-csi-controller-7d9cd6b855-zzmd9 9/9 Running 0 45s # hpe-csi-node-dk5t4 2/2 Running 0 45s # nimble-csp-546c9c4dd4-5lsdt 1/1 Running 0 45s ``` -------------------------------- ### Install HPE CSI Operator using kubectl Source: https://scod.hpedev.io/csi_driver/deployment This command installs the HPE CSI Operator from operatorhub.io using kubectl. Ensure you have OLM installed and operational before running this command. ```bash kubectl create -f https://operatorhub.io/install/hpe-csi-operator.yaml ``` -------------------------------- ### Install HPE Cloud Volumes Plugin on Red Hat Source: https://scod.hpedev.io/docker_volume_plugins/hpe_cloud_volumes/index Commands to install and configure the HPE Cloud Volumes Plugin on Red Hat 7.5+ and CentOS 7.5+. It includes installing necessary packages, enabling the plugin, setting provider details, and managing system services. ```bash yum install -y iscsi-initiator-utils device-mapper-multipath docker plugin install --disable --grant-all-permissions --alias cvblock store/hpestorage/cvblock:3.1.0 docker plugin set cv PROVIDER_IP=cloudvolumes.hpe.com PROVIDER_USERNAME= PROVIDER_PASSWORD= docker plugin enable cvblock systemctl daemon-reload systemctl enable iscsid multipathd systemctl start iscsid multipathd ``` -------------------------------- ### Nimble Volume Driver CLI Help Output Source: https://scod.hpedev.io/docker_volume_plugins/hpe_nimble_storage/index Output from the `docker volume create -d nimble -o help` command, detailing all available options for creating and configuring Nimble Storage-backed Docker volumes. This includes universal, create, and volume-specific options. ```bash $ docker volume create -d nimble -o help Nimble Storage Docker Volume Driver: Create Help Create or Clone a Nimble Storage backed Docker Volume or Import an existing Nimble Volume or Clone of a Snapshot into Docker. Universal options: -o mountConflictDelay=X X is the number of seconds to delay a mount request when there is a conflict (default is 0) Create options: -o sizeInGiB=X X is the size of volume specified in GiB -o size=X X is the size of volume specified in GiB (short form of sizeInGiB) -o fsOwner=X X is the user id and group id that should own the root directory of the filesystem, in the form of [userId:groupId] -o fsMode=X X is 1 to 4 octal digits that represent the file mode to be applied to the root directory of the filesystem -o description=X X is the text to be added to volume description (optional) -o perfPolicy=X X is the name of the performance policy (optional) Performance Policies: Exchange 2003 data store, Exchange log, Exchange 2007 data store, SQL Server, SharePoint, Exchange 2010 data store, SQL Server Logs, SQL Server 2012, Oracle OLTP, Windows File Server, Other Workloads, DockerDefault, General, MariaDB, Veeam Backup Repository, Backup Repository -o pool=X X is the name of pool in which to place the volume Needed with -o folder (optional) -o folder=X X is the name of folder in which to place the volume Needed with -o pool (optional). -o encryption indicates that the volume should be encrypted (optional, dedupe and encryption are mutually exclusive) -o thick indicates that the volume should be thick provisioned (optional, dedupe and thick are mutually exclusive) -o dedupe indicates that the volume should be deduplicated -o limitIOPS=X X is the IOPS limit of the volume. IOPS limit should be in range [256, 4294967294] or -1 for unlimited. -o limitMBPS=X X is the MB/s throughput limit for this volume. If both limitIOPS and limitMBPS are specified, limitMBPS must not be hit before limitIOPS -o destroyOnRm indicates that the Nimble volume (including snapshots) backing this volume should be destroyed when this volume is deleted -o syncOnUnmount only valid with "protectionTemplate", if the protectionTemplate includes a replica destination, unmount calls will snapshot and transfer the last delta to the destination. (optional) ``` -------------------------------- ### Cleanup HPE CSI Operator Installation Source: https://scod.hpedev.io/csi_driver/partners/redhat_openshift/index Removes the HPE CSI Operator and its associated resources from the specified namespace using the Operator SDK. This command is used when the unsupported installation is no longer needed. ```shell operator-sdk cleanup -n hpe-storage hpe-csi-operator ```