This repository was archived by the owner on Nov 2, 2023. It is now read-only.
forked from NVIDIA/deepops
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile-ubuntu22.04-large-slurm
115 lines (103 loc) · 3.32 KB
/
Vagrantfile-ubuntu22.04-large-slurm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
VAGRANTFILE_API_VERSION = "2"
BOX_IMAGE = "generic/ubuntu2204"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.ssh.private_key_path = ["~/.ssh/id_rsa", "~/.vagrant.d/insecure_private_key"]
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
config.vm.define "virtual-wm01" do |mgmt|
mgmt.vm.provider "libvirt" do |v|
v.memory = 2048
v.cpus = 2
end
mgmt.vm.box = BOX_IMAGE
mgmt.vm.network :private_network, ip: "10.0.0.2"
end
config.vm.define "virtual-wm02" do |mgmt|
mgmt.vm.provider "libvirt" do |v|
v.memory = 2048
v.cpus = 2
end
mgmt.vm.box = BOX_IMAGE
mgmt.vm.network :private_network, ip: "10.0.0.3"
end
config.vm.define "virtual-login01" do |login|
login.vm.provider "libvirt" do |v|
v.memory = 6144
v.cpus = 2
end
login.vm.box = BOX_IMAGE
login.vm.network :private_network, ip: "10.0.0.4"
end
config.vm.define "virtual-login02" do |login|
login.vm.provider "libvirt" do |v|
v.memory = 6144
v.cpus = 2
end
login.vm.box = BOX_IMAGE
login.vm.network :private_network, ip: "10.0.0.5"
end
config.vm.define "virtual-cache01" do |cache|
cache.vm.provider "libvirt" do |v|
v.memory = 6144
v.cpus = 2
end
cache.vm.box = BOX_IMAGE
cache.vm.network :private_network, ip: "10.0.0.6"
end
config.vm.define "virtual-cache02" do |cache|
cache.vm.provider "libvirt" do |v|
v.memory = 6144
v.cpus = 2
end
cache.vm.box = BOX_IMAGE
cache.vm.network :private_network, ip: "10.0.0.7"
end
config.vm.define "virtual-metric01" do |metric|
metric.vm.provider "libvirt" do |v|
v.memory = 6144
v.cpus = 2
end
metric.vm.box = BOX_IMAGE
metric.vm.network :private_network, ip: "10.0.0.8"
end
config.vm.define "virtual-gpu01" do |gpu|
config.vm.provider "libvirt" do |v|
v.memory = 16384
v.cpus = 2
v.machine_type = "q35"
v.cpu_mode = "host-passthrough"
# comment in for pci passthrough (and change bus according
# to local hw setup - `lspci -nnk | grep NVIDIA`)
# BUS-GPU01 is a magic string used by automation, this should be removed
#BUS-GPU01 v.pci :bus => '0x08', :slot => '0x00', :function => '0x0'
end
gpu.vm.box = BOX_IMAGE
gpu.vm.network :private_network, ip: "10.0.0.9"
end
config.vm.define "virtual-gpu02" do |gpu|
config.vm.provider "libvirt" do |v|
v.memory = 16384
v.cpus = 2
v.machine_type = "q35"
v.cpu_mode = "host-passthrough"
# comment in for pci passthrough (and change bus according
# to local hw setup - `lspci -nnk | grep NVIDIA`)
# BUS-GPU02 is a magic string used by automation, this should be removed
#BUS-GPU02 v.pci :bus => '0x08', :slot => '0x00', :function => '0x0'
end
gpu.vm.box = BOX_IMAGE
gpu.vm.network :private_network, ip: "10.0.0.10"
end
config.vm.define "virtual-nfs01" do |mgmt|
mgmt.vm.provider "libvirt" do |v|
v.memory = 2048
v.cpus = 2
end
mgmt.vm.box = BOX_IMAGE
mgmt.vm.network :private_network, ip: "10.0.0.11"
end
config.vm.provision "shell", inline: <<-SHELL
sed -i -e 's/4\.2\.2\.1/8.8.8.8/g' -e 's/4\.2\.2\.2/8.8.4.4/g' /etc/netplan/01-netcfg.yaml
netplan apply
SHELL
end