CSI driver set up and installation
Before installing the driver, complete the following preinstallation setup activities:
-
Make sure the following tools are installed on your system before the CSI driver installation:
- Docker
- Helm CLI
-
Login to the IBM Cloud Container Registry via HELM by running the following command:
helm registry login icr.io -u iamapikey -p <your-api-key>When prompted, enter your IBM Cloud API key as the password.
-
Create a local copy of values.yaml file and edit the required fields using the following command:
helm show values oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> > values.yamlHere is an example:
helm show values oci://icr.io/cephaas-helm-charts/cephaas-csi --version 1.0.0 > values.yaml -
Create a Secret using the following command:
oc create secret docker-registry <secret-name> \ --docker-server=icr.io \ --docker-username=<your-username> \ --docker-password=<your-password-or-api-key>Create the secret in the same namespace where the CSI driver will be installed.
-
Edit the following parameters in the values.yaml:
- Add
csiConfig.Deploymentdetails in this format:https://<deployment-url> - Update
externalSnapshotter.enabledtotrue - Update
LicenseAcceptedastrue - Add your API Key in
csiSecret.Token - Add secret name created in previous step under
imagePullSecrets.name
- Add
-
To view the chart metadata, README, and values.yaml of a Helm chart, run the following commands:
helm show chart oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> helm show readme oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> helm show values oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here>You can view the chart details, including license information, by running
helm show chart oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here>. -
Before installing the chart, you can optionally review the rendered Kubernetes manifest files generated from the values.yaml using the following command:
helm template cephaas-csi oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> -f values.yaml -
Install the CSI driver using the Helm chart and your updated values.yaml file:
helm install cephaas-csi oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> -f values.yaml --namespace <your-namespace>To upgrade an existing CSI driver installation, run the following command:
helm upgrade cephaas-csi oci://icr.io/cephaas-helm-charts/cephaas-csi --version <specify-tag-here> -f values.yaml --namespace <your-namespace>To verify that the CSI driver was installed successfully, run
helm status <chart-name> --namespace <your-namespace>.
Important information for OpenShift
When deploying the CSI driver on OpenShift, you may encounter PodSecurity violation warnings, which can cause the CSI driver installation to fail. These warnings occur because the CSI driver requires elevated permissions, including:
privileged: truehostNetwork: truehostPathvolumes
To resolve this, grant the appropriate Security Context Constraints (SCCs) to the CSI driver service accounts after deploying the driver:
oc adm policy add-scc-to-user privileged -z cephaascsi-node-sa -n <your-namespace>
oc adm policy add-scc-to-user privileged -z cephaascsi-controller-sa -n <your-namespace>