10.2. Deploying the Real-time Compute Role
Red Hat OpenStack Platform Director provides the template for the ComputeRealTime
role, which you can then use to deploy Real-time Compute nodes. However, you must perform additional steps to designate Compute nodes for real-time.
Based on the /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-example.yaml file, create a compute-real-time.yaml environment file that sets the parameters for the
ComputeRealTime
role.cp /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-example.yaml /home/stack/templates/compute-real-time.yaml
cp /usr/share/openstack-tripleo-heat-templates/environments/compute-real-time-example.yaml /home/stack/templates/compute-real-time.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The file must include values for the following parameters:
-
IsolCpusList
andNovaVcpuPinSet
. List of isolated CPU cores and virtual CPU pins to reserve for real-time workloads. This value depends on the CPU hardware of your Real-time Compute nodes. -
KernelArgs
. Arguments to pass to the kernel of the Real-time Compute nodes. For example, you can usedefault_hugepagesz=1G hugepagesz=1G hugepages=<number_of_1G_pages_to_reserve> hugepagesz=2M hugepages=<number_of_2M_pages>
to define the memory requirements of guests that have huge pages with multiple sizes. In this example, the default size is 1GB but you can also reserve 2M huge pages.
-
Add the
ComputeRealTime
role to your roles data file and regenerate the file. For example:openstack overcloud roles generate -o /home/stack/templates/rt_roles_data.yaml Controller Compute ComputeRealTime
$ openstack overcloud roles generate -o /home/stack/templates/rt_roles_data.yaml Controller Compute ComputeRealTime
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command generates a
ComputeRealTime
role with contents similar to the following example, and also sets theImageDefault
option toovercloud-realtime-compute
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow For general information about custom roles and about the roles-data.yaml, see the Roles section.
Create the
compute-realtime
flavor to tag nodes that you want to designate for real-time workloads. For example:source ~/stackrc openstack flavor create --id auto --ram 6144 --disk 40 --vcpus 4 compute-realtime openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute-realtime" compute-realtime
$ source ~/stackrc $ openstack flavor create --id auto --ram 6144 --disk 40 --vcpus 4 compute-realtime $ openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute-realtime" compute-realtime
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Tag each node that you want to designate for real-time workloads with the
compute-realtime
profile.openstack baremetal node set --property capabilities='profile:compute-realtime,boot_option:local' <NODE UUID>
$ openstack baremetal node set --property capabilities='profile:compute-realtime,boot_option:local' <NODE UUID>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Map the
ComputeRealTime
role to thecompute-realtime
flavor by creating an environment file with the following content:parameter_defaults: OvercloudComputeRealTimeFlavor: compute-realtime
parameter_defaults: OvercloudComputeRealTimeFlavor: compute-realtime
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
openstack overcloud deploy
command with the-e
option and specify all the environment files that you created, as well as the new roles file. For example:openstack overcloud deploy -r /home/stack/templates/rt~/my_roles_data.yaml -e /home/stack/templates/compute-real-time.yaml <FLAVOR_ENV_FILE>
$ openstack overcloud deploy -r /home/stack/templates/rt~/my_roles_data.yaml -e /home/stack/templates/compute-real-time.yaml <FLAVOR_ENV_FILE>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注記If you want to run additional real-time instances on the same Compute node, you can change the priority of the instances in the
realtime_schedule_priority
paremeter in the nova.conf file.