OpenStack Antelope : कंप्यूट नोड्स जोड़ें (GPU)2023/09/08 |
वर्चुअल मशीन इंस्टेंसेस पर GPU का उपयोग करने के लिए GPU संलग्न कंप्यूट नोड्स जोड़ें।
इस उदाहरण पर, [node02.srv.world] को इस प्रकार जोड़ें।
------------+--------------------------+--------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached Nginx | | Neutron Server | | Nova Compute | | Keystone httpd | | OVN-Northd | | Open vSwitch | | Glance Nova API | | Nginx | | OVN Metadata Agent | | | | | | OVN-Controller | +-----------------------+ +-----------------------+ +-----------------------+ ------------+------------ | eth0|10.0.0.52 +-----------+-----------+ | [ node02.srv.world ] | | (Compute Node (GPU)) | | | | Libvirt | | Nova Compute | | Open vSwitch | | OVN Metadata Agent | | OVN-Controller | +-----------------------+ |
[1] |
GPU के साथ नए नोड पर,
GPU पासथ्रू सेटिंग कॉन्फ़िगर करें, यहां [1] देखें।
|
[2] |
GPU के साथ नए नोड पर,
इसे Openstack क्लस्टर में कंप्यूट नोड के रूप में जोड़ें, यहां देखें।.
|
[3] | GPU के साथ नए नोड पर, Nova Compute के लिए अतिरिक्त सेटिंग्स कॉन्फ़िगर करें। |
root@node02:~# lspci -nn | grep -i nvidia 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 680] [10de:1180] (rev a1) 02:00.1 Audio device [0403]: NVIDIA Corporation GK104 HDMI Audio Controller [10de:0e0a] (rev a1)
root@node02:~#
vi /etc/nova/nova.conf
# अंत में जोड़ें
# पासथ्रू डिवाइस का [vendor_id], [product_id] जोड़ें
[pci]
passthrough_whitelist = { "vendor_id": "10de", "product_id": "1180" }
systemctl restart nova-compute
|
[4] | नियंत्रण नोड पर, Nova सेटिंग्स बदलें। |
root@dlp ~(keystone)#
vi /etc/nova/nova.conf
# अंत में जोड़ें
# [vendor_id], [product_id] जोड़ें जो कंप्यूट नोड पर समान हैं
# [name] के लिए, अपनी पसंद का कोई भी नाम सेट करें
[pci]
alias: { "vendor_id":"10de", "product_id":"1180", "device_type":"type-PCI", "name":"GTX-680" }
[filter_scheduler]
enabled_filters = PciPassthroughFilter
root@dlp ~(keystone)#
systemctl restart nova-api nova-scheduler
# GPU उदाहरण के लिए [flavor] बनाएं root@dlp ~(keystone)# openstack flavor create --id 4 --vcpus 4 --ram 8192 --disk 20 --property "pci_passthrough:alias"="GTX-680:1" gpu1.small +----------------------------+-----------------------------------+ | Field | Value | +----------------------------+-----------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | description | None | | disk | 20 | | id | 4 | | name | gpu1.small | | os-flavor-access:is_public | True | | properties | pci_passthrough:alias='GTX-680:1' | | ram | 8192 | | rxtx_factor | 1.0 | | swap | | | vcpus | 4 | +----------------------------+-----------------------------------+root@dlp ~(keystone)# openstack flavor list +----+------------+------+------+-----------+-------+-----------+ | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+------------+------+------+-----------+-------+-----------+ | 1 | m1.small | 2048 | 10 | 0 | 1 | True | | 2 | m1.medium | 4096 | 10 | 0 | 2 | True | | 3 | m1.large | 8192 | 20 | 10 | 4 | True | | 4 | gpu1.small | 8192 | 20 | 0 | 4 | True | +----+------------+------+------+-----------+-------+-----------+ |
[5] | किसी भी Openstack उपयोगकर्ता के साथ GPU इंस्टेंस बनाने के लिए सेटिंग्स सत्यापित करें। |
ubuntu@dlp ~(keystone)$ openstack network list +--------------------------------------+---------+--------------------------------------+ | ID | Name | Subnets | +--------------------------------------+---------+--------------------------------------+ | 5352e6c0-47b3-4df2-84f4-ca048f141e1d | public | ca5539a8-0291-4684-9fb3-0f448efacebf | | ce6e88bc-107a-446b-b2ab-255bab7269fe | private | feb337ec-215e-406e-8871-196fed2c4207 | +--------------------------------------+---------+--------------------------------------+ubuntu@dlp ~(keystone)$ netID=$(openstack network list | grep private | awk '{ print $2 }')
ubuntu@dlp ~(keystone)$
ubuntu@dlp ~(keystone)$ openstack server create --flavor gpu1.small --image Ubuntu2204 --security-group secgroup01 --nic net-id=$netID --key-name mykey Ubuntu-2204GPU
openstack server list +--------------------------------------+----------------+---------+-------------------------------------+------------+------------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+----------------+---------+-------------------------------------+------------+------------+ | 1a3f3521-42e4-4628-a73d-606916ce40c1 | Ubuntu-2204GPU | ACTIVE | private=192.168.100.119 | Ubuntu2204 | gpu1.small | | 11987eec-fb38-4de1-a386-3d1d6001bbd3 | Ubuntu-2204 | SHUTOFF | private=10.0.0.252, 192.168.100.100 | Ubuntu2204 | m1.medium | +--------------------------------------+----------------+---------+-------------------------------------+------------+------------+ubuntu@dlp ~(keystone)$ openstack floating ip create public +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | created_at | 2023-03-27T04:04:56Z | | description | | | dns_domain | | | dns_name | | | fixed_ip_address | None | | floating_ip_address | 10.0.0.244 | | floating_network_id | 5352e6c0-47b3-4df2-84f4-ca048f141e1d | | id | d3315a3f-dba5-45fd-9160-3908a505b752 | | name | 10.0.0.244 | | port_details | None | | port_id | None | | project_id | e294bd7c00314facacdb46c36fb54ee9 | | qos_policy_id | None | | revision_number | 0 | | router_id | None | | status | DOWN | | subnet_id | None | | tags | [] | | updated_at | 2023-03-27T04:04:56Z | +---------------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack server add floating ip Ubuntu-2204GPU 10.0.0.244 ubuntu@dlp ~(keystone)$ ssh ubuntu@10.0.0.244
The authenticity of host '10.0.0.244 (10.0.0.244)' can't be established.
ED25519 key fingerprint is SHA256:7eWknomqH6PO2pVaiEIuK6jcatrxM1on6fhFayq54FI.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.0.244' (ED25519) to the list of known hosts.
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-67-generic x86_64)
.....
.....
ubuntu@ubuntu-2204gpu:~$ubuntu@ubuntu-2204gpu:~$ lspci | grep -i nvidia 00:05.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 680] (rev a1) |
Sponsored Link |
|