Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60, PRO-721] #2356

Merged
merged 35 commits into from
Sep 2, 2024

Conversation

folex
Copy link
Member

@folex folex commented Sep 2, 2024

VM Networking

Description

Setup networking for a single VM

Proposed Changes

  • Setup iptables rules when creating VM
  • Clear iptables rules when destroying VM
  • Allow to install only one VM
  • Modify Nox config

New configuration for VMs

[vm]
libvirt_uri = "qemu:///system"
[vm.network]
bridge_name = "br422442"
public_ip = "1.1.1.1"
vm_ip = "2.2.2.2"
host_ssh_port = 2222
vm_ssh_port = 22
port_range.start = 1000
port_range.end = 65535

Additional Notes

  1. Note that now THERE CAN BE ONLY ONE VM ON A PEER
  2. Couldn't test locally

What's with ports?
In Nox's config we're setting the following local ports:

tcp_port = 7771
websocket_port = 9991
http_port = 18080 # this port is used for an HTTP endpoints (prometheus metrics, etc)  
[chain_listener_config]
ccp_endpoint = "http://0.0.0.0:9389/"

VM GPU

Description

Add all the GPUs to the XML of a newly created VM

Proposed changes

  1. When creating VMs, get the info about GPUs and add them to the VM XML
  2. Added the config setting that allows to enable/disable this functionallity
[vm]
allow_gpu = true

By default, GPUs are disabled

@folex folex requested a review from kmd-fl September 2, 2024 14:43
@folex folex changed the title feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60] Sep 2, 2024
Copy link

linear bot commented Sep 2, 2024

@folex folex changed the title feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60] feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60, ] Sep 2, 2024
@kmd-fl kmd-fl changed the title feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60, ] feat(vm, gpu): VM per peer, setup networking, add all GPUs to the VM [fixes BRND-60, PRO-721] Sep 2, 2024
Copy link

linear bot commented Sep 2, 2024

@folex folex merged commit 26d47b7 into master Sep 2, 2024
26 of 29 checks passed
@folex folex deleted the gpu_stable branch September 2, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants