forked from lyw07/dbadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
41 lines (33 loc) · 888 Bytes
/
Vagrantfile
File metadata and controls
41 lines (33 loc) · 888 Bytes
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$forwarded_ports = {}
$num_instances = 4
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "debian/jessie64"
(1..$num_instances).each do |machine_id|
config.vm.define "machine#{machine_id}" do |config|
if machine_id == 1
ip = "192.168.33.9"
end
if machine_id == 2
ip = "192.168.33.10"
end
if machine_id == 3
ip = "192.168.33.11"
end
if machine_id == 4
ip = "192.168.33.12"
end
$forwarded_ports.each do |guest, host|
config.vm.network "forwarded_port", guest: guest, host: host, auto_correct: true
end
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.memory = 1024
vb.cpus = 1
end
config.vm.network "private_network", ip: ip
end
end
end