-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
80 lines (71 loc) · 4.84 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
if Vagrant::VERSION < "2.0.0"
$stderr.puts "Must redirect to new repository for old Vagrant versions"
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
end
Vagrant.configure("2") do |config|
config.vm.define :testenv1 do |testenv1|
testenv1.vm.box = "ubuntu/xenial64"
testenv1.vm.network :private_network, ip: "192.168.31.101"
testenv1.vm.hostname = "box1.me"
testenv1.vm.provision :shell, path: "provision-box1", args: ENV['ARGS']
testenv1.vm.network :forwarded_port, guest: 3000, host: 3000, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network :forwarded_port, guest: 3001, host: 3001, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network :forwarded_port, guest: 3002, host: 3002, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network :forwarded_port, guest: 3003, host: 3003, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network :forwarded_port, guest: 3004, host: 3004, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network :forwarded_port, guest: 3005, host: 3005, id: "node", host_ip: "localhost", auto_correct: true
testenv1.vm.network "forwarded_port", guest: 80, host: 8080, id: "nginx"
testenv1.vm.synced_folder "shared/", "/home/vagrant/shared", create: true
testenv1.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", 20000]
end
end
config.vm.define :testenv2 do |testenv2|
testenv2.vm.box = "ubuntu/xenial64"
testenv2.vm.network :private_network, ip: "192.168.31.102"
testenv2.vm.hostname = "box2.me"
testenv2.vm.provision :shell, path: "provision-box2", args: ENV['ARGS']
testenv2.vm.network :forwarded_port, guest: 3000, host: 3000, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.network :forwarded_port, guest: 3001, host: 3001, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.network :forwarded_port, guest: 3002, host: 3002, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.network :forwarded_port, guest: 3003, host: 3003, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.network :forwarded_port, guest: 3004, host: 3004, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.network :forwarded_port, guest: 3005, host: 3005, id: "node", host_ip: "localhost", auto_correct: true
testenv2.vm.synced_folder "shared/", "/home/vagrant/shared", create: true
testenv2.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", 20000]
end
end
config.vm.define :testenv3 do |testenv3|
testenv3.vm.box = "ubuntu/xenial64"
testenv3.vm.network :private_network, ip: "192.168.31.103"
testenv3.vm.hostname = "box3.me"
testenv3.vm.provision :shell, path: "provision-box3", args: ENV['ARGS']
testenv3.vm.network :forwarded_port, guest: 3000, host: 3000, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.network :forwarded_port, guest: 3001, host: 3001, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.network :forwarded_port, guest: 3002, host: 3002, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.network :forwarded_port, guest: 3003, host: 3003, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.network :forwarded_port, guest: 3004, host: 3004, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.network :forwarded_port, guest: 3005, host: 3005, id: "node", host_ip: "localhost", auto_correct: true
testenv3.vm.synced_folder "shared/", "/home/vagrant/shared", create: true
testenv3.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", 20000]
end
end
config.vm.define :testenv4 do |testenv4|
testenv4.vm.box = "ubuntu/xenial64"
testenv4.vm.network :private_network, ip: "192.168.31.104"
testenv4.vm.hostname = "box4.me"
testenv4.vm.provision :shell, path: "provision-box4", args: ENV['ARGS']
testenv4.vm.network :forwarded_port, guest: 3000, host: 3000, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.network :forwarded_port, guest: 3001, host: 3001, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.network :forwarded_port, guest: 3002, host: 3002, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.network :forwarded_port, guest: 3003, host: 3003, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.network :forwarded_port, guest: 3004, host: 3004, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.network :forwarded_port, guest: 3005, host: 3005, id: "node", host_ip: "localhost", auto_correct: true
testenv4.vm.synced_folder "shared/", "/home/vagrant/shared", create: true
testenv4.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", 20000]
end
end
end