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
ComputeGpu
role file, copy the file/usr/share/openstack-tripleo-heat-templates/roles/Compute.yaml
to/usr/share/openstack-tripleo-heat-templates/roles/ComputeGpu.yaml
and edit or add the following file sections:Expand 表11.1 ComputeGpu role file edits Section/Parameter Current value New value Role comment
Role: Compute
Role: ComputeGpu
Role name
name: Compute
name: ComputeGpu
description
Basic Compute Node role
GPU Compute Node role
ImageDefault
n/a
overcloud-full-gpu
HostnameFormatDefault
-compute-
-computegpu-
deprecated_nic_config_name
compute.yaml
compute-gpu.yaml
The following example shows the
ComputeGpu
role details:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Generate a new roles data file named
roles_data_gpu.yaml
that includes theController
,Compute
, andComputeGpu
roles: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 Controller
Copy 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-nvidia
flavor 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-nvidia
profile.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 list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow