Chapter 1. Customizing the control plane The Red Hat OpenStack Services on OpenShift (RHOSO) control plane contains the RHOSO services that manage the cloud. The RHOSO services run as a Red Hat OpenShift Container Platform (RHOCP) workload. You can customize your deployed control plane with the services required for your environment. 1.1. Prerequisites The RHOSO environment is deployed on a RHOCP cluster. For more information, see Deploying Red Hat OpenStack Services on OpenShift . You are logged on to a workstation that has access to the RHOCP cluster, as a user with cluster-admin privileges. 1.2. Enabling disabled services If you enable a service that is disabled by setting enabled: true , you must either create an empty template for the service by adding template: {} to the service definition to ensure that the default values for the service are set, or specify some or all of the template parameter values. For example, to enable the Dashboard service (horizon) with the default service values, add the following configuration to your OpenStackControlPlane custom resource (CR): If you want to set the values for specific service parameters, then add the following configuration to your OpenStackControlPlane custom resource (CR): Any parameters that you do not specify are set to the default value from the service template. 1.3. Adding Compute cells to the control plane You can use cells to divide Compute nodes in large deployments into groups. Each cell has a dedicated message queue, runs standalone copies of the cell-specific Compute services and databases, and stores instance metadata in a database dedicated to instances in that cell. By default, the control plane creates two cells: cell0 : The controller cell that manages global components and services, such as the Compute scheduler and the global conductor. This cell also contains a dedicated database to store information about instances that failed to be scheduled to a Compute node. You cannot connect Compute nodes to this cell. cell1 : The default cell that Compute nodes are connected to when you don't create and configure additional cells. You can add cells to your Red Hat OpenStack Services on OpenShift (RHOSO) environment when you create your control plane or at any time afterwards. Procedure Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml , on your workstation. Create a database server for each new cell that you want to add to your RHOSO environment: 1 The database used by most of the RHOSO services, including the Compute services nova-api and nova-scheduler , and cell0 . 2 The database to be used by cell1 . 3 The database to be used by cell2 . Create a message bus with unique IPs for the load balancer for each new cell that you want to add to your RHOSO environment: 1 The message bus used by most of the RHOSO services, including the Compute services nova-api and nova-scheduler , and cell0 . 2 The message bus to be used by cell1 . 3 The message bus to be used by cell2 . Add the new cells to the cellTemplates configuration in the nova service configuration: 1 The name of the new Compute cell. The name has a limit of 20 characters, and must contain only lowercase alphanumeric characters and the - symbol. For more information about the properties you can configure for a cell, view the definition for the Nova CRD: Update the control plane: Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status: The OpenStackControlPlane resources are created when the status is "Setup complete". Tip Append the -w option to the end of the get command to track deployment progress. Optional: Confirm that the control plane is deployed by reviewing the pods in the openstack namespace for each of the cells you created: The control plane is deployed when all the pods are either completed or running. Optional: Confirm that the new cells are created: 1.4. Enabling the Dashboard service (horizon) interface You can enable the Dashboard service (horizon) interface for cloud user access to the cloud through a web browser. Procedure Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml , on your workstation. Enable and configure the horizon service: 1 Set replicas to a minimum of 2 for high availability. Update the control plane: Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status: The OpenStackControlPlane resources are created when the status is "Setup complete". Tip Append the -w option to the end of the get command to track deployment progress. Confirm that the control plane is deployed by reviewing the pods in the openstack namespace: The control plane is deployed when all the pods are either completed or running. Retrieve the Dashboard service endpoint URL: Use this URL to access the Horizon interface. Verification To log in as the admin user, obtain the admin password from the AdminPassword parameter in the osp-secret secret: Open a web browser. Enter the Dashboard endpoint URL. Log in to the dashboard with your username and password. 1.5. Enabling the Orchestration service (heat) You can enable the Orchestration service (heat) in your Red Hat OpenStack Services on OpenShift (RHOSO) environment. Cloud users can use the Orchestration service to create and manage cloud resources such as storage, networking, instances, or applications. Procedure Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml , on your workstation. Enable and configure the heat service: Update the control plane: Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status: The OpenStackControlPlane resources are created when the status is "Setup complete". Tip Append the -w option to the end of the get command to track deployment progress. Confirm that the control plane is deployed by reviewing the pods in the openstack namespace: The control plane is deployed when all the pods are either completed or running. Verification Open a remote shell connection to the OpenStackClient pod: Confirm that the internal service endpoints are registered with each service: Exit the openstackclient pod: 1.6. Additional resources Kubernetes NMState Operator The Kubernetes NMState project Load balancing with MetalLB MetalLB documentation MetalLB in layer 2 mode Specify network interfaces that LB IP can be announced from Multiple networks Using the Multus CNI in OpenShift macvlan plugin whereabouts IPAM CNI plugin - Extended configuration About advertising for the IP address pools Dynamic provisioning

Commands:
spec: horizon: apiOverride: {} enabled: true template: {}
spec: horizon: apiOverride: {} enabled: true template: customServiceConfig: "" memcachedInstance: memcached override: {} preserveJobs: false replicas: 2 resources: {} secret: osp-secret tls: {}
apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane metadata: name: openstack-control-plane namespace: openstack spec: secret: osp-secret galera: enabled: true templates: openstack: 1 storageRequest: 5G secret: cell0-secret replicas: 1 openstack-cell1: 2 storageRequest: 5G secret: cell1-secret replicas: 1 openstack-cell2: 3 storageRequest: 5G secret: cell2-secret replicas: 1
apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane metadata: name: openstack-control-plane spec: secret: osp-secret rabbitmq: templates: rabbitmq: 1 override: service: metadata: annotations: metallb.universe.tf/address-pool: internalapi metallb.universe.tf/loadBalancerIPs: 172.17.0.85 spec: type: LoadBalancer rabbitmq-cell1: 2 override: service: metadata: annotations: metallb.universe.tf/address-pool: internalapi metallb.universe.tf/loadBalancerIPs: 172.17.0.86 spec: type: LoadBalancer rabbitmq-cell2: 3 override: service: metadata: annotations: metallb.universe.tf/address-pool: internalapi metallb.universe.tf/loadBalancerIPs: 172.17.0.87 spec: type: LoadBalancer
nova: apiOverride: route: {} template: secret: osp-secret apiDatabaseAccount: nova-api cellTemplates: cell0: hasAPIAccess: true cellDatabaseAccount: nova-cell0 cellDatabaseInstance: openstack cellMessageBusInstance: rabbitmq cell1: hasAPIAccess: true cellDatabaseAccount: nova-cell1 cellDatabaseInstance: openstack-cell1 cellMessageBusInstance: rabbitmq-cell1 cell2: 1 hasAPIAccess: true cellDatabaseAccount: nova-cell2 cellDatabaseInstance: openstack-cell2 cellMessageBusInstance: rabbitmq-cell2
oc describe crd nova
oc apply -f openstack_control_plane.yaml -n openstack
oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
oc get pods -n openstack | grep cell2 nova-cell2-conductor-0 1/1 Running 2 5d20h nova-cell2-novncproxy-0 1/1 Running 2 5d20h openstack-cell2-galera-0 1/1 Running 2 5d20h rabbitmq-cell2-server-0 1/1 Running 2 5d20h
oc exec -it nova-cell0-conductor-0 /bin/bash nova-manage cell_v2 list_cells +-------+--------------------------------------+----------------------------------------------------------------------------------+------------------------------------------------------------+----------+| Name | UUID | Transport URL | Database Connection | Disabled |+-------+--------------------------------------+----------------------------------------------------------------------------------+------------------------------------------------------------+----------+| cell0 | 00000000-0000-0000-0000-000000000000 | rabbit: | mysql+pymysql://nova_cell0:****@openstack/nova_cell0 | False || cell1 | c5bf5e35-6677-40aa-80d0-33a440cac14e | rabbit://default_user_CuUVnXz-PvgzXvPxypU:****@rabbitmq-cell1.openstack.svc:5672 | mysql+pymysql://nova_cell1:****@openstack-cell1/nova_cell1 | False || cell2 | c5bf5e35-6677-40aa-80d0-33a440cac14e | rabbit://default_user_CuUVnXz-PvgzXvPxypU:****@rabbitmq-cell2.openstack.svc:5672 | mysql+pymysql://nova_cell2:****@openstack-cell2/nova_cell2| False |+-------+--------------------------------------+----------------------------------------------------------------------------------+------------------------------------------------------------+----------+
spec: horizon: apiOverride: {} enabled: true template: customServiceConfig: "" memcachedInstance: memcached override: {} preserveJobs: false replicas: 2 1 resources: {} secret: osp-secret tls: {}
oc apply -f openstack_control_plane.yaml -n openstack
oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
oc get pods -n openstack
oc get horizons horizon -o jsonpath='{.status.endpoint}'
oc get secret osp-secret -o jsonpath='{.data.AdminPassword}' | base64 -d
spec: heat: apiOverride: route: {} cnfAPIOverride: route: {} enabled: true template: databaseAccount: heat databaseInstance: openstack heatAPI: override: service: internal: metadata: annotations: metallb.universe.tf/address-pool: internalapi metallb.universe.tf/allow-shared-ip: internalapi metallb.universe.tf/loadBalancerIPs: 172.17.0.80 spec: type: LoadBalancer replicas: 1 resources: {} tls: api: internal: {} public: {} heatCfnAPI: override: {} replicas: 1 resources: {} tls: api: internal: {} public: {} heatEngine: replicas: 1 resources: {} memcachedInstance: memcached passwordSelectors: authEncryptionKey: HeatAuthEncryptionKey service: HeatPassword preserveJobs: false rabbitMqClusterName: rabbitmq secret: osp-secret serviceUser: heat
oc apply -f openstack_control_plane.yaml -n openstack
oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
oc get pods -n openstack
oc rsh -n openstack openstackclient
openstack endpoint list -c 'Service Name' -c Interface -c URL --service heat +--------------+-----------+---------------------------------------------------------------+ | Service Name | Interface | URL | +--------------+-----------+---------------------------------------------------------------+ | heat | internal | http://heat-internal.openstack.svc:9292 | | heat | public | http://heat-public-openstack.apps.ostest.test.metalkube.org | +--------------+-----------+---------------------------------------------------------------+
exit