Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 8. Setting up the Environment


This chapter outlines the details for setting up the environment for Red Hat Gluster Storage Container Converged in OpenShift.

8.1. Preparing the Red Hat OpenShift Container Platform Cluster

Execute the following steps to prepare the Red Hat OpenShift Container Platform cluster:
  1. On the master or client, execute the following command to login as the cluster admin user:
    # oc login
    Copy to Clipboard Toggle word wrap
    For example:
     oc login
    Authentication required for https://dhcp46-24.lab.eng.blr.redhat.com:8443 (openshift)
    Username: test
    Password:
    Login successful.
    
    You have access to the following projects and can switch between them with 'oc project <project_name>':
    
      * default
        kube-system
        logging
        management-infra
        openshift
        openshift-infra
      
    
    Using project "default".
    
    Copy to Clipboard Toggle word wrap
  2. On the master or client, execute the following command to create a project, which will contain all the containerized Red Hat Gluster Storage services:
    # oc new-project <project_name>
    Copy to Clipboard Toggle word wrap
    For example:
    # oc new-project storage-project
    
    Now using project "storage-project" on server "https://master.example.com:8443"
    Copy to Clipboard Toggle word wrap
  3. After the project is created, execute the following command on the master node to enable the deployment of the privileged containers as Red Hat Gluster Storage container can only run in the privileged mode.
    # oadm policy add-scc-to-user privileged -z default
    Copy to Clipboard Toggle word wrap
  4. Execute the following steps on the master to set up the router:

    Note

    If a router already exists, proceed to Step 5. To verify if the router is already deployed, execute the following command:
    # oc get dc --all-namespaces
    Copy to Clipboard Toggle word wrap
    1. Execute the following command to enable the deployment of the router:
      # oadm policy add-scc-to-user privileged -z router
      
      Copy to Clipboard Toggle word wrap
    2. Execute the following command to deploy the router:
      # oadm router storage-project-router --replicas=1
      Copy to Clipboard Toggle word wrap
    3. Edit the subdomain name in the config.yaml file located at /etc/origin/master/master-config.yaml.
      For example:
      subdomain: "cloudapps.mystorage.com"
      Copy to Clipboard Toggle word wrap
    4. Restart the master OpenShift services by executing the following command:
      # systemctl restart atomic-openshift-master
      Copy to Clipboard Toggle word wrap
      For OpenShift Container Platform 3.7 execute the following command to restart the services :
      # systemctl restart atomic-openshift-master-api atomic-openshift-master-controllers
      Copy to Clipboard Toggle word wrap

      Note

      If the router setup fails, use the port forward method as described in Appendix C, Client Configuration using Port Forwarding .
  5. Execute the following command to verify if the router is running:
    # oc get dc <router_name>
    Copy to Clipboard Toggle word wrap
    For example:
    # oc get dc storage-project-router
    NAME                   REVISION   DESIRED   CURRENT   TRIGGERED BY
    storage-project-router   1          1         1         config
    Copy to Clipboard Toggle word wrap

    Note

    Ensure you do not edit the /etc/dnsmasq.conf file until the router has started.
  6. After the router is running, the client has to be setup to access the services in the OpenShift cluster. Execute the following steps on the client to set up the DNS.
    1. Execute the following command to find the IP address of the router:
      # oc get pods -o wide --all-namespaces | grep router
      storage-project storage-project-router-1-cm874        1/1       Running   119d       10.70.43.132   dhcp43-132.lab.eng.blr.redhat.com
      Copy to Clipboard Toggle word wrap
    2. Edit the /etc/dnsmasq.conf file and add the following line to the file:
      address=/.cloudapps.mystorage.com/<Router_IP_Address>
      Copy to Clipboard Toggle word wrap
      where, Router_IP_Address is the IP address of the node where the router is running.
    3. Restart the dnsmasq service by executing the following command:
      # systemctl restart dnsmasq
      Copy to Clipboard Toggle word wrap
    4. Edit /etc/resolv.conf and add the following line:
      nameserver 127.0.0.1
      Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat