11.2.2. Designating Compute nodes for vGPU
To designate Compute nodes for vGPU workloads, you must create a new role file to configure the vGPU role, and configure a new flavor to use to tag the GPU-enabled Compute nodes.
Procedure
To create the new
ComputeGpurole file, copy the file/usr/share/openstack-tripleo-heat-templates/roles/Compute.yamlto/usr/share/openstack-tripleo-heat-templates/roles/ComputeGpu.yamland edit or add the following file sections:Expand 表11.1 ComputeGpu role file edits Section/Parameter Current value New value Role comment
Role: ComputeRole: ComputeGpuRole name
name: Computename: ComputeGpudescriptionBasic Compute Node roleGPU Compute Node roleImageDefaultn/a
overcloud-full-gpuHostnameFormatDefault-compute--computegpu-deprecated_nic_config_namecompute.yamlcompute-gpu.yamlThe following example shows the
ComputeGpurole details:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Generate a new roles data file named
roles_data_gpu.yamlthat includes theController,Compute, andComputeGpuroles:openstack overcloud roles \ generate -o /home/stack/templates/roles_data_gpu.yaml \ ComputeGpu Compute Controller
(undercloud) [stack@director templates]$ openstack overcloud roles \ generate -o /home/stack/templates/roles_data_gpu.yaml \ ComputeGpu Compute ControllerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Register the node for the overcloud. For more information, see Registering nodes for the overcloud in the Director Installation and Usage guide.
- Inspect the node hardware. For more information, see Inspecting the hardware of nodes in the Director Installation and Usage guide.
Create the
compute-vgpu-nvidiaflavor to use to tag nodes that you want to designate for vGPU workloads:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Tag each node that you want to designate for GPU workloads with the
compute-vgpu-nvidiaprofile.openstack baremetal node set --property capabilities='profile:compute-vgpu-nvidia,boot_option:local' <node>
(undercloud) [stack@director templates]$ openstack baremetal node set --property capabilities='profile:compute-vgpu-nvidia,boot_option:local' <node>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<node>with the ID of the baremetal node.To verify the role is created, enter the following command:
openstack overcloud profiles list
(undercloud) [stack@director templates]$ openstack overcloud profiles listCopy to Clipboard Copied! Toggle word wrap Toggle overflow