4.3. Deploying the Containers
Execute the following commands to deploy the Red Hat Gluster Storage container on the nodes:
- List out the hostnames of the nodes on which the Red Hat Gluster Storage container has to be deployed:
# oc get nodes
For example:# oc get nodes NAME STATUS AGE node1.example.com Ready 12d node2.example.com Ready 12d node3.example.com Ready 12d master.example.com Ready,SchedulingDisabled 12d
- Deploy a Red Hat Gluster Storage container on a node by executing the following command:
# oc process glusterfs -v GLUSTERFS_NODE=<node_hostname> | oc create -f -
For example:# oc process glusterfs -v GLUSTERFS_NODE=node1.example.com | oc create -f - deploymentconfig "glusterfs-dc-node1.example.com" created
Repeat the step of deploying the Red Hat Gluster Storage container on each node.Note
This command deploys a single Red Hat Gluster Storage container on the node. This does not initialize the hardware or create trusted storage pools. That aspect will be taken care by Heketi which is explained in the further steps. - Execute the following command to deploy heketi:
# oc process deploy-heketi -v \ HEKETI_KUBE_NAMESPACE=<Project name> \ HEKETI_KUBE_APIHOST='<OpenShift master endpoint address>' \ HEKETI_KUBE_INSECURE=y \ HEKETI_KUBE_USER=<user name> \ HEKETI_KUBE_PASSWORD=<password> | oc create -f -
For example:# oc process deploy-heketi -v \ HEKETI_KUBE_NAMESPACE=storage-project \ HEKETI_KUBE_APIHOST='https://master.example.com:8443' \ HEKETI_KUBE_INSECURE=y \ HEKETI_KUBE_USER=test-admin \ HEKETI_KUBE_PASSWORD=admin | oc create -f - service "deploy-heketi" created route "deploy-heketi" created deploymentconfig "deploy-heketi" created
- Execute the following command to verify that the containers are running:
# oc get pods
For example:# oc get pods NAME READY STATUS RESTARTS AGE storage-project-router-1-lyxog 1/1 Running 0 1d glusterfs-dc-node1.example.com-ghyta 1/1 Running 0 1m glusterfs-dc-node2.example.com-gdfhr 1/1 Running 0 1m glusterfs-dc-node3.example.com-nhtsa 1/1 Running 0 1m deploy-heketi 1/1 Running 0 1m