fluencelabs / nox

Rust implementation of the Fluence network peer
https://fluence.network
GNU Affero General Public License v3.0
992 stars 187 forks source link

feat(vm): setup network for a single VM and allow only one VM on a peer [BRND-60] #2352

Closed kmd-fl closed 2 months ago

kmd-fl commented 2 months ago

Description

Setup networking for a single VM

Proposed Changes

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/"
linear[bot] commented 2 months ago

BRND-60 Port mapping option for networking part of the Nox-managed VM

kmd-fl commented 2 months ago

Used the changes in another PR https://github.com/fluencelabs/nox/pull/2356