OpenStack Caracal : कंप्यूट नोड्स जोड़ें (GPU)2024/05/21 |
वर्चुअल मशीन इंस्टेंसेस पर 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 | | Neutron L2/L3 Agent | | Libvirt | | Memcached Nginx | | Neutron Metadata | | Nova Compute | | Keystone httpd | | Open vSwitch | | Neutron L2 Agent | | Glance Nova API | | | | Open vSwitch | | Neutron Server | | | | | | Neutron Metadata | | | | | +-----------------------+ +-----------------------+ +-----------------------+ ------------+------------ | eth0|10.0.0.52 +-----------+-----------+ | [ node02.srv.world ] | | (Compute Node (GPU)) | | | | Libvirt | | Nova Compute | | Neutron L2 Agent | | Open vSwitch | +-----------------------+ |
[1] |
GPU के साथ नए नोड पर, GPU पासथ्रू सेटिंग कॉन्फ़िगर करें, यहां [1] देखें। |
[2] |
GPU के साथ नए नोड पर, इसे Openstack क्लस्टर में कंप्यूट नोड के रूप में जोड़ें, यहां देखें।. |
[3] | GPU के साथ नए नोड पर, Nova Compute के लिए अतिरिक्त सेटिंग्स कॉन्फ़िगर करें। |
root@node02:~# lspci -nn | grep -i nvidia 81:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3060] [10de:2487] (rev a1) 81:00.1 Audio device [0403]: NVIDIA Corporation GA104 High Definition Audio Controller [10de:228b] (rev a1)
root@node02:~#
vi /etc/nova/nova.conf
# अंत में जोड़ें
# पासथ्रू डिवाइस का [vendor_id], [product_id] जोड़ें
[pci]
passthrough_whitelist = { "vendor_id": "10de", "product_id": "2487" }
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":"2487", "device_type":"type-PCI", "name":"RTX-3060" }
[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 | 5 | | name | gpu1.small | | os-flavor-access:is_public | True | | properties | pci_passthrough:alias='RTX-3060:1' | | ram | 8192 | | rxtx_factor | 1.0 | | swap | 0 | | vcpus | 4 | +----------------------------+------------------------------------+root@dlp ~(keystone)# openstack flavor list +----+------------+------+------+-----------+-------+-----------+ | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+------------+------+------+-----------+-------+-----------+ | 1 | m1.tiny | 2048 | 10 | 0 | 1 | True | | 2 | m1.small | 4096 | 10 | 0 | 2 | True | | 3 | m1.medium | 8192 | 10 | 0 | 4 | True | | 4 | m2.medium | 8192 | 10 | 10 | 4 | True | | 5 | gpu1.small | 8192 | 20 | 0 | 4 | True | +----+------------+------+------+-----------+-------+-----------+ |
[5] | किसी भी Openstack उपयोगकर्ता के साथ GPU इंस्टेंस बनाने के लिए सेटिंग्स सत्यापित करें। |
ubuntu@dlp ~(keystone)$ openstack network list +---------------------------------+---------+----------------------------------+ | ID | Name | Subnets | +---------------------------------+---------+----------------------------------+ | 5e99fe3a-c28a-47b3-ae5f- | public | 5f767674-473e-402c-ba60- | | 504fa513709b | | cc6d6b9e5513 | | 78a330d7-074f-491d-a820- | private | 5ac5f7dc-c275-48a1-aaac- | | 2b5e87f5602f | | 745dd2f61ea7 | +---------------------------------+---------+----------------------------------+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 | +-------------+-------------+---------+--------------+------------+------------+ | 0217da81- | Ubuntu- | ACTIVE | private=192. | Ubuntu2404 | gpu1.small | | 0411-4bcf- | 2404GPU | | 168.100.46 | | | | b646- | | | | | | | 2bb35b37a66 | | | | | | | 6 | | | | | | | 7fbc24c1- | Ubuntu-2404 | SHUTOFF | private=10.0 | Ubuntu2404 | m1.small | | c0d1-43d6- | | | .0.208, 192. | | | | 87aa- | | | 168.100.130 | | | | 68df83597b5 | | | | | | | 7 | | | | | | +-------------+-------------+---------+--------------+------------+------------+ubuntu@dlp ~(keystone)$ openstack floating ip create public +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | created_at | 2024-05-21T08:19:24Z | | description | | | dns_domain | None | | dns_name | None | | fixed_ip_address | None | | floating_ip_address | 10.0.0.224 | | floating_network_id | 5e99fe3a-c28a-47b3-ae5f-504fa513709b | | id | 279aaa49-a7dc-4919-a82e-86505ddbfe12 | | name | 10.0.0.224 | | port_details | None | | port_id | None | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | qos_policy_id | None | | revision_number | 0 | | router_id | None | | status | DOWN | | subnet_id | None | | tags | [] | | updated_at | 2024-05-21T08:19:24Z | +---------------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack server add floating ip Ubuntu-2404GPU 10.0.0.224 ubuntu@dlp ~(keystone)$ ssh ubuntu@10.0.0.224
The authenticity of host '10.0.0.224 (10.0.0.224)' can't be established.
ED25519 key fingerprint is SHA256:mX/ZrNCojy+4xAyKdj13bGUrGTRqms/l/MhrIjrGrj4.
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.224' (ED25519) to the list of known hosts.
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-31-generic x86_64)
.....
.....
ubuntu@ubuntu-2404gpu:~$ubuntu@ubuntu-2404gpu:~$ lspci | grep -i nvidia 00:05.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3060] (rev a1) |
Sponsored Link |
|