4.3. Deploying the Containers


Execute the following commands to deploy the Red Hat Gluster Storage container on the nodes:
  1. 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
  2. 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.
  3. 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
  4. 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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.