Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to install Red Hat OpenShift 3.11 on OpenStack 13

April 9, 2019
Mohammad Ahmad
Related topics:
Kubernetes
Related products:
Red Hat OpenShift Container Platform

Share:

    Red Hat OpenShift Container Platform is a platform-as-a-service (PaaS). It orchestrates and manages containerized applications through Kubernetes. Although OpenShift Container Platform supports cloud-native applications, it also supports custom-built applications. OpenShift Container Platform can run on a hybrid cloud configuration providing the flexibility to expand and grow.

    Red Hat OpenStack Platform is an infrastructure-as-a-service (IaaS). This means it is a cloud-based platform that provides virtual servers and other resources. Users either manage it through a web-based dashboard, through command-line tools, or through RESTful web services.

    If you are considering Red Hat OpenShift Container Platform on OpenStack Platform, there are several advantages, including easily increasing the number of compute nodes and using dynamic storage.

    In this article, I will outline the main points required to successfully install Red Hat OpenShift Container Platform on OpenStack Platform. Because my OpenStack knowledge is limited, I reached out to my colleagues for help and will not address too many OpenStack technical details here.

    Prerequisites

    Before beginning your installation, you will need an OpenStack Platform environment provisioned with certain requirements. These are mainly authentication and Red Hat subscription requirements. The following sections address these.

    OpenStack Environment

    Basically, you need an environment set up as per the link below:

    https://docs.openshift.com/container-platform/3.11/install_config/configuring_openstack.html

    Therefore, before proceeding, ensure you have the following:

    1. Access to a deployment instance with all the required repositories enabled, and the correct ssh keys to access your nodes
    2. Valid keystone authentication credentials
    3. Enough computing resources to create the cluster you need, as well as any potential growth requirements
    4. DNS services that automatically add new hosts that are provisioned (Personally, I had some challenges here)

    OpenStack keystone authentication requirements

    There are specific requirements for keystone authentication. This is to allow the OpenStack Platform cloud provider can authenticate with OpenStack Platform (primarily for Cinder storage).

    The main requirement is that your OpenStack Platform user and project exist in the same domain. If you do not have them in the same domain, the installation will fail (as of OpenShift Container Platform 3.11.69).

    Therefore, before attempting installation, ensure you can authenticate with the project ID and user via the following command:

    $ openstack \
    --os-identity-api-version "3" \
    --os-auth-url "https://openstack-default.mydomain:13000/v3" \
    --os-username "myorgusername" \
    --os-password "mypassword" \
    --os-project-id "myprojectid" \
    --os-domain-name "myorg" \
    server list

    If the above command fails (even if you don't have any servers installed), then your OpenShift Container Platform installation will fail. This is due to the OpenShift Container Platform cloud provider being unable to authenticate for projects in a different domain to the user.

    When you are running this command, please ensure you have NOT sourced the rc file (which contains all of the above details), because you will get false results.

    Populate your Red Hat OpenShift inventory with your values

    Here are some inventory values that will be required:

    $ cat inventory/group_vars/all.yml |grep rhsub
    rhsub_server: 'satellite.mydomain'
    rhsub_ak: 'openshift'
    rhsub_orgid: 'MyOrg'
    rhsub_pool: '123456789012345678901234567890'

    Provision your base stack

    If you have all the required OpenStack settings, running the following playbook will create all the nodes required (as you have specified their numbers in your all.yml file):

    $ source openrc.sh
    $ ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/provision.yml

    This will create your OpenShift nodes (as per your all.yml file). In this example, the following settings here used:

    openshift_openstack_num_masters: 3
    openshift_openstack_num_infra: 3
    openshift_openstack_num_cns: 0
    openshift_openstack_num_nodes: 3
    openshift_openstack_num_etcd: 0

    Check your base stack

    After the previous playbook is complete, check whether your dynamic inventory has been updated:

    $ soruce openrc.sh
    $ /usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py –list

    Your dynamic inventory must be set in your ansible.cfg file. You should also make sure all nodes are contactable and have correct DNS settings.

    Most of the problems I encountered during the installations were due to DNS. Please make sure the hostname for all your OpenShift nodes is the fqdn hostname. All nodes must be able to resolve via DNS.

    Start your installation

    To begin your installation, run the following commands (I have personally increased the timeout for my Ansible playbooks):

    $ ansible-playbook --timeout=120 /usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/prerequisites.yml
    $ ansible-playbook --timeout=120 /usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/install.yml

    Scaling up compute nodes

    If you are scaling up OpenShift Container Platform compute nodes on a different platform, then you may follow the standard recommended procedure to add a new node to your OpenShift Container Platform cluster.

    However, when you are running on OpenStack Platform, you need to get these new nodes into the dynamic inventory first, before you can actually perform a joining of a node. Performing this latter task on OpenStack Platform is not an obvious task.

    The only place I have been able to find documentation for this is in the following file (on the deployment instance/jump host):

    /usr/share/ansible/openshift-ansible/playbooks/openstack/configuration.md

    Here I provide an excerpt contained within the file above. This excerpt refers to the exact instructions required to perform a node scale-up on OpenStack Platform:

    Section: ### 2. Scale the Cluster ==>
    
    ```
    $ ansible-playbook --user openshift \
    -i openshift-ansible/playbooks/openstack/scaleup_inventory.py \
    -i inventory \
    openshift-ansible/playbooks/openstack/openshift-cluster/node-scaleup.yml
    ```
    
    This will create the new OpenStack nodes, optionally create the DNS records
    and subscribe them to RHN, configure the `new_masters`, `new_nodes` and
    `new_etcd` groups and run the OpenShift scaleup tasks.
    
    When the playbook finishes, you should have new nodes up and running.
    
    Run `oc get nodes` to verify.
    
    

    In my case, I was interested in scaling up from three compute nodes to five compute nodes. To do that, the node count in the all.yml file must be updated.

    Step 1: Update the all.yml file (example shown here):

    $ cat inventory/group_vars/all.yml | grep openshift_openstack_num_nodes
    openshift_openstack_num_nodes: 3

    to:

    $ cat inventory/group_vars/all.yml | grep openshift_openstack_num_nodes
    openshift_openstack_num_nodes: 5

    Step 2: Run the OSP specific node-scaleup.yml playbook:

    $ ansible-playbook \ -i /home/cloud-user/inventory \ -i /usr/share/ansible/openshift-ansible/playbooks/openstack/scaleup_inventory.py \ /usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/node-scaleup.yml

    Infra-node scaleup requires additional adjustments, which are available in /usr/share/ansible/openshift-ansible/playbooks/openstack/configuration.md.

    I have not attempted to scale up master nodes and have not tested this.

    Dynamic storage

    OpenStack Platform Cinder storage is available to an OpenShift Container Platform cluster configured to utilize OpenStack Platform features.

    However, you should understand that Cinder storage is a read-write-once type of storage, which means multiple pods cannot share the same storage. This aspect must be considered when designing your Red Hat OpenShift Container Platform cluster and the applications that run on them.

    Conclusion

    Installing Red Hat OpenShift Container Platform on OpenStack Platform provides many features and benefits. One main benefit is being able to scale up nodes with relative ease, and another is the ability to use OpenStack Platform Cinder storage.

    Although good documentation is available on how to install a base cluster, the documentation on scaling up was more difficult to find. My aim in this article was to highlight all the information required to successfully install and scale up a Red Hat OpenShift cluster.

    I didn't address OpenStack Platform technical details here primarily because of my own lack of expertise, but I did find that setting up Red Hat OpenShift Container Platform on OpenStack Platform is relatively straightforward once you have all the right information and have all the infrastructure services up and running (mainly DNS).

    I thank my colleagues for their selfless help in completing this procedure.

    Last updated: May 1, 2019

    Recent Posts

    • How Kafka improves agentic AI

    • How to use service mesh to improve AI model security

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue