Configure Compute service notifications

You can configure the Compute service (nova) to provide notifications to Telemetry services in your Red Hat OpenStack Services on OpenShift (RHOSO) environment. The Compute service supports designating one RabbitMQ replica as a notification server.

Before you begin

  • You have the oc command line tool installed on your workstation.
  • You are logged on to a workstation that has access to the RHOSO control plane as a user with cluster-admin privileges.

Procedure

  1. Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml, on your workstation.
  2. Update the rabbitmq service configuration to provide Compute service notifications.

    The following example creates a single notifications server:

    spec:
        rabbitmq:
            enabled: true
            templates:
            ...
                <rabbitmq_notification_server>:
                    delayStartSeconds: 30
                    override:
                        service:
                            metadata:
                                annotations:
                                    metallb.universe.tf/address-pool: internalapi
                                    metallb.universe.tf/loadBalancerIPs: <ip_address>
                            spec:
                                type: LoadBalancer
    • Replace <rabbitmq_notification_server> with the name of your notification server, for example, rabbitmq-notifications.
    • Replace <ip_address> with the appropriate IP address. Adjust this value accordingly based on your networking plan and configuration.
  3. Register the notification server with the Compute service:
    spec:
         nova:
    	  template:
                   ...
                      apiMessageBusInstance: rabbitmq
                      notificationsBusInstance: <rabbitmq_notification_server>
    • Replace <rabbitmq_notification_server> with the name of the notification server created in the previous step.
  4. Save openstack_control_plane.yaml.
  5. Update the control plane:
    $ oc apply -f openstack_control_plane.yaml -n openstack
  6. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:
    $ oc get openstackcontrolplane -n openstack

    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.
  7. 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.
  8. Optional: Verify the notification transporturl is properly configured.

    The following is an example of performing this verification:

    $ oc get transporturl
    NAME                          STATUS   MESSAGE
    ...
    nova-api-transport            True     Setup complete
    nova-cell1-transport          True     Setup complete
    nova-notification-transport   True     Setup complete
  9. Create a new OpenStackDataPlaneDeployment CR to configure notifications on the data plane nodes and deploy the data plane. Save the CR to a file named compute_notifications_deploy.yaml on your workstation:
    apiVersion: dataplane.openstack.org/v1beta1
    kind: OpenStackDataPlaneDeployment
    metadata:
      name: nova-notifications
      namespace: openstack
    spec:
       nodeSets:
       - openstack-edpm
       - ...
       - <nodeSet_name>
    • Replace <nodeSet_name> with the names of the OpenStackDataPlaneNodeSet CRs that you want to include in your data plane deployment. Note

      The following example demonstrates how to obtain information about your data plane deployment and use that information to obtain a list of nodesets.

      $ oc get openstackdataplanedeployment
      NAME              NODESETS             STATUS   MESSAGE
      edpm-deployment   ["openstack-edpm"]   True     Setup complete
      
      $ oc get openstackdataplanedeployment edpm-deployment -o jsonpath='{.spec.nodeSets}'["openstack-edpm"]
  10. Save the compute_notifications_deploy.yaml deployment file.
  11. Deploy the data plane updates:
    $ oc create -f compute_notifications_deploy.yaml
  12. Verify that the data plane is deployed:
    $ oc get openstackdataplanenodeset
    
    NAME                STATUS MESSAGE
    nova-notifications  True   Deployed
  13. Access the remote shell for openstackclient and verify that the deployed Compute nodes are visible on the control plane:
    $ oc rsh -n openstack openstackclient
    
    $ openstack hypervisor list