Difficulty: beginner
Estimated Time: 5-15 minutes

This is a single node installation of StorageOS with OpenShift 3.7. From here you can see how pods and deployments interact with StorageOS.

StorageOS and OpenShift 3.7

Step 1 of 4

Install StorageOS

Prepare host

First, ensure all the pre-req kernel modules are enabled using the following Docker container.

docker run --name enable_lio \ --privileged \ --rm \ --cap-add=SYS_ADMIN \ --volume /lib/modules:/lib/modules \ --volume /sys:/sys:rshared \ storageos/init:0.1

Install StorageOS

Openshift 3.9 supports feature gates such as mount propagation, but this is not available in Openshift 3.7. As a result, the installation of StorageOS in this scenario is done via container install rather than using a DaemonSet

docker run -d --name storageos \ --env HOSTNAME \ --env ADVERTISE_IP=[[HOST_IP]] \ --env JOIN=[[HOST_IP]] \ --env DISABLE_TELEMETRY=true \ --pid=host \ --network=host \ --privileged \ --cap-add SYS_ADMIN \ --device /dev/fuse \ --volume /sys:/sys \ --volume /var/lib/storageos:/var/lib/storageos:rshared \ --volume /run/docker/plugins:/run/docker/plugins \ storageos/node:1.0.2 server

Create StorageClass

First, create a secret that specifies the StorageOS api endpoint.

APIADDRESS=$(echo -n "tcp://" | base64); sed -i "s/REPLACE/$APIADDRESS/g" secret.yaml

oc --as system:admin -n default create -f secret.yaml

Create fast StorageClass:

oc --as system:admin create -f storageclass.yaml