-
Notifications
You must be signed in to change notification settings - Fork 0
How to install DirectPV in local OpenShift
Cesar Celis Hernandez edited this page Oct 2, 2023
·
3 revisions
To document how DirectPV can be installed in local OpenShift and its current issues.
-
Get CRC Running with OpenShift.
-
Install OpenShift:
$ kubectl directpv install
███████████████████████████████████████████████████████████████████████████ 100%
┌──────────────────────────────────────┬──────────────────────────┐
│ NAME │ KIND │
├──────────────────────────────────────┼──────────────────────────┤
│ directpv │ Namespace │
│ directpv-min-io │ ServiceAccount │
│ directpv-min-io │ ClusterRole │
│ directpv-min-io │ ClusterRoleBinding │
│ directpv-min-io │ Role │
│ directpv-min-io │ RoleBinding │
│ directpvdrives.directpv.min.io │ CustomResourceDefinition │
│ directpvvolumes.directpv.min.io │ CustomResourceDefinition │
│ directpvnodes.directpv.min.io │ CustomResourceDefinition │
│ directpvinitrequests.directpv.min.io │ CustomResourceDefinition │
│ directpv-min-io │ CSIDriver │
│ directpv-min-io │ StorageClass │
│ node-server │ Daemonset │
│ controller │ Deployment │
└──────────────────────────────────────┴──────────────────────────┘
DirectPV installed successfully
- Give permissions to the accounts:
oc adm policy add-scc-to-user privileged -n directpv -z builder
oc adm policy add-scc-to-user privileged -n directpv -z default
oc adm policy add-scc-to-user privileged -n directpv -z deployer
oc adm policy add-scc-to-user privileged -n directpv -z directpv-min-io
-
Reduced replicas to 1 for single node scenario.
-
Check on the info:
$ kubectl directpv info
┌──────────────────────┬──────────┬───────────┬─────────┬────────┐
│ NODE │ CAPACITY │ ALLOCATED │ VOLUMES │ DRIVES │
├──────────────────────┼──────────┼───────────┼─────────┼────────┤
│ • crc-87z92-master-0 │ - │ - │ - │ - │
└──────────────────────┴──────────┴───────────┴─────────┴────────┘
- Discover Drives:
$ kubectl directpv discover
Discovered node 'crc-87z92-master-0' ✔
No drives are available to initialize
sh-4.4# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 0 loop
vda 252:0 0 31G 0 disk
|-vda1 252:1 0 1M 0 part
|-vda2 252:2 0 127M 0 part
|-vda3 252:3 0 384M 0 part /host/boot
`-vda4 252:4 0 30.5G 0 part /host/sysroot
sh-4.4#
- To address above issue I started a discussion in crc repo to see if adding more disks is possible: https://github.com/orgs/crc-org/discussions/3854