Installing the Undercloud Red Hat OpenStack Platform 16.2

Ach.Chusnul Chikam
7 min readApr 18, 2022

The Red Hat OpenStack Platform (RHOSP) director is a toolset for installing and managing a complete RHOSP environment. Director is based primarily on the OpenStack project TripleO. With director you can install a fully operational, lean, and robust RHOSP environment that can provision and control baremetal systems to use as OpenStack nodes.

Director uses two main concepts: an undercloud and an overcloud. First you install the undercloud, and then use the undercloud as a tool to install and configure the overcloud. The undercloud is the main management node that contains the Red Hat OpenStack Platform director toolset. It is a single-system OpenStack installation that includes components for provisioning and managing the OpenStack nodes that form your OpenStack environment (the overcloud).

Undercloud components

The undercloud uses OpenStack components as its base toolset. Each component operates within a separate container on the undercloud:

  • OpenStack Identity (keystone)
    Provides authentication and authorization for the director components.
  • OpenStack Bare Metal (ironic) and OpenStack Compute (nova)
    Manages bare metal nodes.
  • OpenStack Networking (neutron) and Open vSwitch
    Control networking for bare metal nodes.
  • OpenStack Image Service (glance)
    Stores images that director writes to bare metal machines.
  • OpenStack Orchestration (heat) and Puppet
    Provides orchestration of nodes and configuration of nodes after director writes the overcloud image to disk.
  • OpenStack Workflow Service (mistral)
    Provides a set of workflows for certain director-specific actions, such as importing and deploying plans.
  • OpenStack Messaging Service (zaqar)
    Provides a messaging service for the OpenStack Workflow Service.
  • OpenStack Object Storage (swift)
    Provides object storage for various OpenStack Platform components, including:
    * Image storage for OpenStack Image Service
    * Introspection data for OpenStack Bare Metal
    * Deployment plans for OpenStack Workflow Service

Mandatory to have Red Hat OpenStack Subscription to successfully Install Undercloud RHOSP
See Red Hat OpenStack Platform subscription

Some additional requirements:

OS Version RHEL 8.4
Minimal 2 Net Interface. NIC for Provisioning and NIC for External

Preparing for director installation

To install and configure director, completed some preparation tasks to ensure you have registered the undercloud to the Red Hat Customer Portal and installed the director packages, and configured a container image source for the director to pull container images during installation.

1. Preparing the undercloud

Set hostname for director

sudo hostnamectl set-hostname undercloud.example.com
sudo hostnamectl set-hostname undercloud.example.com --transient
exec bash

Create stack user and configure passwordless then create directories for system images and heat templates

useradd stack
passwd stack
echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
chmod 0440 /etc/sudoers.d/stack
su - stack
mkdir ~/images ~/templates

Edit the /etc/hosts and include an entry for the system hostname.

sudo echo "192.168.1.23"  director.kinton.lab director" >> /etc/hosts

Setup /etc/resolve.conf

2. Registering the undercloud and attaching subscriptions

Before install director, run subscription-manager to register the undercloud and attach a valid Red Hat OpenStack Platform subscription. Register undercloud system either with the Red Hat Content Delivery Network or with a Red Hat Satellite. Find the entitlement pool ID for Red Hat OpenStack Platform (RHOSP) director and attach the Red Hat OpenStack Platform 16.2 entitlement.

[stack@director ~]$ sudo subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: XXXXXXX
Password:
The system has been registered with ID: XXXXXXXXXXXXXX
The registered system name is: director.kinton.lab
[stack@director ~]$
[stack@director ~]$ sudo subscription-manager list --available --all --matches="Red Hat OpenStack"
[stack@director ~]$ sudo subscription-manager attach --pool=POOL_ID

Lock the undercloud to Red Hat Enterprise Linux 8.4:

[stack@director ~]$ sudo subscription-manager release --set=8.4
Release set to: 8.4
[stack@director ~]$
[stack@director ~]$ sudo subscription-manager release
Release: 8.4

3. Enabling repositories for the undercloud

Enable the repositories that are required for the undercloud, and update the system packages to the latest versions.

Disable all default repositories, and enable the required Red Hat Enterprise Linux repositories for Undercloud:

[stack@director ~]$ sudo subscription-manager repos --disable=*
[stack@director ~]$ sudo subscription-manager repos \
--enable=rhel-8-for-x86_64-baseos-eus-rpms \
--enable=rhel-8-for-x86_64-appstream-eus-rpms \
--enable=rhel-8-for-x86_64-highavailability-eus-rpms \
--enable=ansible-2.9-for-rhel-8-x86_64-rpms \
--enable=openstack-16.2-for-rhel-8-x86_64-rpms \
--enable=fast-datapath-for-rhel-8-x86_64-rpms \
--enable=rhceph-4-tools-for-rhel-8-x86_64-rpms
[stack@director ~]$
[stack@director ~]$ sudo sudo dnf clean all

Set the container-tools repository module to version 3.0


[stack@director ~]$ sudo dnf module disable -y container-tools:rhel8
[stack@director ~]$ sudo dnf module enable -y container-tools:3.0

Perform an update on your system to ensure that you have the latest base system packages

[stack@director ~]$ sudo dnf update -y
[stack@director ~]$ sudo reboot

(Optional) Remove old kernel after updating system

[stack@director ~]$ sudo dnf remove -y --oldinstallonly --setopt installonly_limit=1 kernel

4. Installing director packages and ceph-ansible

Install packages relevant to Red Hat OpenStack Platform director.
Install the command line tools for director installation and configuration.

[stack@director ~]$ sudo dnf install -y python3-tripleoclient

(Optional) ceph-ansible package is required when you use Ceph Storage with Red Hat OpenStack Platform.

[stack@director ~]$ sudo dnf install -y ceph-ansible

5. Preparing container images

The undercloud installation requires an environment file to determine where to obtain container images and how to store them. Generate the default container image preparation file.

[stack@director ~]$ sudo openstack tripleo container image prepare default --local-push-destination --output-env-file containers-prepare-parameter.yaml

Modify the containers-prepare-parameter.yaml to suit the requirements.

ContainerImageRegistryCredentials

Some container image registries require authentication to access images. In this situation, use the ContainerImageRegistryCredentials parameter in your containers-prepare-parameter.yaml environment file. The ContainerImageRegistryCredentials the parameter uses a set of keys based on the private registry URL. Each private registry URL uses its own key and value pair to define the username (key) and password (value). Default ContainerImagePrepare parameter pulls container images from registry.redhat.io, which requires authentication.

In this example used registry service accounts for authentication. See registry service accounts

6. Configuring director

To configure and install director, set the appropriate parameters in the undercloud.conf file and run the undercloud installation command. After you have installed director, import the overcloud images that director will use to write to bare metal nodes during node provisioning.

Copy the default template to the home directory of the stack user’s

[stack@director ~]$ cp \
/usr/share/python-tripleoclient/undercloud.conf.sample \
~/undercloud.conf

Edit the undercloud.conf file. This file contains settings to configure your undercloud.

local_interface
The chosen interface for the director Provisioning NIC. This is also the device that director uses for DHCP and PXE boot services. Change this value to your chosen device. To see which device is connected, use the ip addr command.

In this example, the External NIC uses ens3 and the Provisioning NIC uses ens4, which is currently not configured. In this case, set the local_interface to ens4.

Create additional configuration /home/stack/custom-undercloud-params.yaml and /home/stack/hieradata.yaml.

7. Installing director

Complete the following steps to install director and perform some basic post-installation tasks.

[stack@director ~]$ openstack undercloud install

This command launches the director configuration script. Director installs additional packages and configures its services according to the configuration in the undercloud.conf. This script takes several minutes to complete.

The script generates two files:

  • undercloud-passwords.conf
    A list of all passwords for the director services.
  • stackrc
    A set of initialization variables to help you access the director command-line tools.

The director installation is complete if you see similar output below

To initialize the stack user to use the command line tools, run source stackrc command. The prompt now indicates that OpenStack commands authenticate and execute against the undercloud

(undercloud) [stack@director ~]$

Verify images version on undercloud using command sudo podamn images and check container services using sudo podman ps

Next verify some OpenStack commands like openstack service list, openstack endpoint list ,openstack compute service list . A list of services on director will be displayed on terminal.

See other component like endpoint, network agent and compute service

See other content

References :

#RHEL8 #RedHat #OpenStack #Undercloud #Director

--

--

Ach.Chusnul Chikam

Cloud Consultant | RHCSA | CKA | AWS SAA | OpenStack Certified | OpenShift Certified | Google Cloud ACE | LinkedIn: https://www.linkedin.com/in/achchusnulchikam