forked from p4lang/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
56 lines (50 loc) · 2.76 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-20.04"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.hostname = "p4"
config.vm.provision "file", source: "p4-logo.png", destination: "/home/vagrant/p4-logo.png"
config.vm.provision "file", source: "p4_16-mode.el", destination: "/home/vagrant/p4_16-mode.el"
config.vm.provision "file", source: "p4.vim", destination: "/home/vagrant/p4.vim"
config.vm.define "dev", autostart: false do |dev|
dev.vm.provider "virtualbox" do |v|
v.name = "P4 Tutorial Development" + Time.now.strftime(" %Y-%m-%d")
end
dev.vm.provision "file", source: "py3localpath.py", destination: "/home/vagrant/py3localpath.py"
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/py3localpath.py"
dev.vm.provision "file", source: "patches/disable-Wno-error-and-other-small-changes.diff", destination: "/home/vagrant/patches/disable-Wno-error-and-other-small-changes.diff"
dev.vm.provision "file", source: "patches/behavioral-model-use-correct-libssl-pkg.patch", destination: "/home/vagrant/patches/behavioral-model-use-correct-libssl-pkg.patch"
dev.vm.provision "file", source: "patches/mininet-dont-install-python2-2022-apr.patch", destination: "/home/vagrant/patches/mininet-dont-install-python2-2022-apr.patch"
dev.vm.provision "file", source: "clean.sh", destination: "/home/vagrant/clean.sh"
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/clean.sh"
dev.vm.provision "shell", path: "root-dev-bootstrap.sh"
dev.vm.provision "shell", path: "root-common-bootstrap.sh"
dev.vm.provision "shell", privileged: false, path: "user-dev-bootstrap.sh"
dev.vm.provision "shell", privileged: false, path: "user-common-bootstrap.sh"
end
config.vm.define "release", primary: true do |release|
release.vm.provider "virtualbox" do |v|
v.name = "P4 Tutorial Release" + Time.now.strftime(" %Y-%m-%d")
end
release.vm.provision "file", source: "patches/mininet-dont-install-python2-2022-apr.patch", destination: "/home/vagrant/patches/mininet-dont-install-python2-2022-apr.patch"
release.vm.provision "shell", path: "root-release-bootstrap.sh"
release.vm.provision "shell", path: "root-common-bootstrap.sh"
release.vm.provision "shell", privileged: false, path: "user-common-bootstrap.sh"
end
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = 2048
vb.cpus = 2
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
vb.customize [
"storageattach", :id,
"--storagectl", "IDE Controller",
"--port", "0",
"--device", "0",
"--type", "dvddrive",
"--medium", "emptydrive"
]
vb.customize ["modifyvm", :id, "--vram", "32"]
end
end