Chapter 5. Creating overcloud nodes with director Operator
A Red Hat OpenStack Platform (RHOSP) overcloud consists of multiple nodes, such as Controller nodes to provide control plane services and Compute nodes to provide computing resources. For a functional overcloud with high availability, you must have 3 Controller nodes and at least one Compute node. You can create Controller nodes with the OpenStackControlPlane Custom Resource Definition (CRD) and Compute nodes with the OpenStackBaremetalSet CRD.
Red Hat OpenShift Container Platform (RHOCP) does not autodiscover issues on RHOCP worker nodes, or perform autorecovery of worker nodes that host RHOSP Controller VMs if the worker node fails or has an issue. You must enable health checks on your RHOCP cluster to automatically relocate Controller VM pods when a host worker node fails. For information on how to autodiscover issues on RHOCP worker nodes, see Deploying machine health checks.
5.1. Creating a control plane with the OpenStackControlPlane CRD Copy linkLink copied to clipboard!
The Red Hat OpenStack Platform (RHOSP) control plane contains the RHOSP services that manage the overcloud. The default control plane consists of 3 Controller nodes. You can use composable roles to manage services on dedicated controller virtual machines (VMs). For more information on composable roles, see Composable services and custom roles.
Define an OpenStackControlPlane custom resource (CR) to create the Controller nodes as OpenShift Virtualization virtual machines (VMs).
Use the following commands to view the OpenStackControlPlane CRD definition and specification schema:
oc describe crd openstackcontrolplane oc explain openstackcontrolplane.spec
$ oc describe crd openstackcontrolplane
$ oc explain openstackcontrolplane.spec
Prerequisites
-
You have used the
OpenStackNetConfigCR to create a control plane network and any additional isolated networks.
Procedure
Create a file named
openstack-controller.yamlon your workstation. Include the resource specification for the Controller nodes. The following example defines a specification for a control plane that consists of 3 Controller nodes:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The name of the overcloud control plane, for example,
overcloud. - 2
- The OSPdO namespace, for example,
openstack. - 3
- The configuration for the control plane.
- 4
- Optional: The
Secretresource that provides root access on each node to users with the password. - 5
- The name of the data volume that stores the base operating system image for your Controller VMs. For more information on creating the data volume, see Creating a data volume for the base operating system.
- 6
- For information on configuring Red Hat OpenShift Container Platform (RHOCP) storage, see Dynamic provisioning.
-
Save the
openstack-controller.yamlfile. Create the control plane:
oc create -f openstack-controller.yaml -n openstack
$ oc create -f openstack-controller.yaml -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Wait until RHOCP creates the resources related to
OpenStackControlPlaneCR. OSPdO also creates anOpenStackClientpod that you can access through a remote shell to run RHOSP commands.
Verification
View the resource for the control plane:
oc get openstackcontrolplane/overcloud -n openstack
$ oc get openstackcontrolplane/overcloud -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow View the
OpenStackVMSetresources to verify the creation of the control plane VM set:oc get openstackvmsets -n openstack
$ oc get openstackvmsets -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow View the VMs to verify the creation of the control plane OpenShift Virtualization VMs:
oc get virtualmachines -n openstack
$ oc get virtualmachines -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Test access to the
openstackclientremote shell:oc rsh -n openstack openstackclient
$ oc rsh -n openstack openstackclientCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Creating a provisioning server with the OpenStackProvisionServer CRD Copy linkLink copied to clipboard!
Provisioning servers provide a specific Red Hat Enterprise Linux (RHEL) QCOW2 image for provisioning Compute nodes for the Red Hat OpenStack Platform (RHOSP). An OpenStackProvisionServer CR is automatically created for any OpenStackBaremetalSet CRs you create. You can create the OpenStackProvisionServer CR manually and provide the name to any OpenStackBaremetalSet CRs that you create.
The OpenStackProvisionServer CRD creates an Apache server on the Red Hat OpenShift Container Platform (RHOCP) provisioning network for a specific RHEL QCOW2 image.
Procedure
Create a file named
openstack-provision.yamlon your workstation. Include the resource specification for the Provisioning server. The following example defines a specification for a Provisioning server using a specific RHEL 9.2 QCOW2 images:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The name that identifies the
OpenStackProvisionServerCR. - 2
- The OSPdO namespace, for example,
openstack. - 3
- The initial source of the RHEL QCOW2 image for the Provisioning server. The image is downloaded from this remote source when the server is created.
- 4
- The Provisioning server port, set to 8080 by default. You can change it for a specific port configuration.
For further descriptions of the values you can use to configure your
OpenStackProvisionServerCR, view theOpenStackProvisionServerCRD specification schema:oc describe crd openstackprovisionserver
$ oc describe crd openstackprovisionserverCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
openstack-provision.yamlfile. Create the Provisioning Server:
oc create -f openstack-provision.yaml -n openstack
$ oc create -f openstack-provision.yaml -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the resource for the Provisioning server is created:
oc get openstackprovisionserver/openstack-provision-server -n openstack
$ oc get openstackprovisionserver/openstack-provision-server -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Creating Compute nodes with the OpenStackBaremetalSet CRD Copy linkLink copied to clipboard!
Compute nodes provide computing resources to your Red Hat OpenStack Platform (RHOSP) environment. You must have at least one Compute node in your overcloud and you can scale the number of Compute nodes after deployment.
Define an OpenStackBaremetalSet custom resource (CR) to create Compute nodes from bare-metal machines that the Red Hat OpenShift Container Platform (RHOCP) manages.
Use the following commands to view the OpenStackBareMetalSet CRD definition and specification schema:
oc describe crd openstackbaremetalset oc explain openstackbaremetalset.spec
$ oc describe crd openstackbaremetalset
$ oc explain openstackbaremetalset.spec
Prerequisites
-
You have used the
OpenStackNetConfigCR to create a control plane network and any additional isolated networks. -
You have created a control plane with the
OpenStackControlPlaneCRD. -
You have created a
BareMetalHostCR for each bare-metal node that you want to add as a Compute node to the overcloud. For information about how to create aBareMetalHostCR, see About the BareMetalHost resource in the Red Hat OpenShift Container Platform (RHOCP) Postinstallation configuration guide.
Procedure
Create a file named
openstack-compute.yamlon your workstation. Include the resource specification for the Compute nodes. The following example defines a specification for 1 Compute node:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
openstack-compute.yamlfile. Create the Compute nodes:
oc create -f openstack-compute.yaml -n openstack
$ oc create -f openstack-compute.yaml -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
View the resource for the Compute nodes:
oc get openstackbaremetalset/compute -n openstack
$ oc get openstackbaremetalset/compute -n openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow View the bare-metal machines that RHOCP manages to verify the creation of the Compute nodes:
oc get baremetalhosts -n openshift-machine-api
$ oc get baremetalhosts -n openshift-machine-apiCopy to Clipboard Copied! Toggle word wrap Toggle overflow