Developed from https://access.redhat.com/articles/5683981
Labeling the storage nodes allows us to create an LSO LocalVolumeSet only for storage nodes
You will need to change the node names to match your cluster.
oc label node openshift-worker-3.testme.libvirt2.smh
cluster.ocs.openshift.io/openshift-storage=''
oc label node openshift-worker-4.testme.libvirt2.smh
cluster.ocs.openshift.io/openshift-storage=''
oc label node openshift-worker-5.testme.libvirt2.smh
cluster.ocs.openshift.io/openshift-storage=''
You will need to change the node names to match your cluster.
-
oc label node openshift-worker-3.testme.libvirt2.smh
node-role.kubernetes.io/infra=""
oc label node openshift-worker-4.testme.libvirt2.smh node-role.kubernetes.io/infra=""
oc label node openshift-worker-5.testme.libvirt2.smh node-role.kubernetes.io/infra="" -
oc adm taint node openshift-worker-3.testme.libvirt2.smh
node.ocs.openshift.io/storage="true":NoSchedule
oc adm taint node openshift-worker-4.testme.libvirt2.smh node.ocs.openshift.io/storage="true":NoSchedule
oc adm taint node openshift-worker-5.testme.libvirt2.smh node.ocs.openshift.io/storage="true":NoSchedule
-
Create openshift-local-storage namespace\
oc create -f ODF-CLI/lso-namespace.yaml
-
Create openshift-local-storage-cliinstall oporatorgroup\
oc create -f ODF-CLI/lso-opgroup.yaml
-
Create LSO subscription\
oc create -f ODF-CLI/lso-sub.yaml
-
Wait for subscription to finish installing\
CSVname=`oc get ClusterServiceVersion -n openshift-local-storage |grep -v NAME| cut -d' ' -f1`
while [ "`oc get ClusterServiceVersion $CSVname -n openshift-local-storage -o jsonpath='{.status.phase}{"\n"}'`" != "Succeeded" ] ; do echo -n "." && sleep 10 ; done
echo -
Create localvolumeset\
oc create -f ODF-CLI/lso-localvolset.yaml
-
Create the openshift-storage namespace\
oc create -f ODF-CLI/odf-namespace.yaml
-
Create the openshift-storage-operatorgroup for the Operator\
oc create -f ODF-CLI/odf-operatorgroup.yaml
-
Subscribe to the odf-operator\
oc create -f ODF-CLI/odf-sub.yaml
-
Enable console plugin
oc patch console.operator cluster -n openshift-storage --type json -p '[{"op": "add", "path": "/spec/plugins", "value": ["odf-console"]}]'
-
Wait for subscription to finish installing\
CSVname=`oc get ClusterServiceVersion -n openshift-storage |grep -v NAME| cut -d' ' -f1`
while [ "`oc get ClusterServiceVersion $CSVname -n openshift-storage -o jsonpath='{.status.phase}{"\n"}'`" != "Succeeded" ] ; do echo -n "." && sleep 10 ; done
echo -
Create Storage System and Storage cluster\
oc create -f ODF-CLI/odf-storagesystem.yaml
-
Wait for storage cluster to be ready\
while [ "`oc get StorageCluster ocs-storagecluster -n openshift-storage -o jsonpath='{.status.phase}{"\n"}'`" != "Succeeded" ] ; do echo -n "." && sleep 10 ; done
echo -
Set default storage class (optional if you already have a default
storage class set)
oc patch storageclass ocs-storagecluster-ceph-rbd -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
- Verify