-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathVagrantfile
More file actions
95 lines (75 loc) · 3.19 KB
/
Vagrantfile
File metadata and controls
95 lines (75 loc) · 3.19 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define "control" do |control|
control.vm.box = "ubuntu/trusty64"
control.vm.hostname = 'control'
control.vm.box = "ubuntu/trusty64"
control.vm.network :private_network, ip: "192.168.35.1"
control.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--name", "control"]
end
end
config.vm.define "web1" do |web1|
web1.vm.box = "ubuntu/trusty64"
web1.vm.hostname = 'web1'
web1.vm.box = "ubuntu/trusty64"
web1.vm.network :private_network, ip: "192.168.35.101"
web1.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 256]
v.customize ["modifyvm", :id, "--name", "web1"]
end
web1.ssh.private_key_path = ["keys/key", "~/.vagrant.d/insecure_private_key"]
web1.ssh.insert_key = false
web1.vm.provision "file", source: "keys/key.pub", destination: "~/.ssh/authorized_keys"
end
config.vm.define "web2" do |web2|
web2.vm.box = "ubuntu/trusty64"
web2.vm.hostname = 'web2'
web2.vm.box = "ubuntu/trusty64"
web2.vm.network :private_network, ip: "192.168.35.102"
web2.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 256]
v.customize ["modifyvm", :id, "--name", "web2"]
end
web2.ssh.private_key_path = ["keys/key", "~/.vagrant.d/insecure_private_key"]
web2.ssh.insert_key = false
web2.vm.provision "file", source: "keys/key.pub", destination: "~/.ssh/authorized_keys"
end
config.vm.define "app" do |app|
app.vm.box = "ubuntu/trusty64"
app.vm.hostname = 'app'
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.35.103"
app.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 256]
v.customize ["modifyvm", :id, "--name", "app"]
end
app.ssh.private_key_path = ["keys/key", "~/.vagrant.d/insecure_private_key"]
app.ssh.insert_key = false
app.vm.provision "file", source: "keys/key.pub", destination: "~/.ssh/authorized_keys"
end
config.vm.define "db" do |db|
db.vm.box = "ubuntu/trusty64"
db.vm.hostname = 'db'
db.vm.box = "ubuntu/trusty64"
db.vm.network :private_network, ip: "192.168.35.104"
db.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 256]
v.customize ["modifyvm", :id, "--name", "db"]
end
db.ssh.private_key_path = ["keys/key", "~/.vagrant.d/insecure_private_key"]
db.ssh.insert_key = false
db.vm.provision "file", source: "keys/key.pub", destination: "~/.ssh/authorized_keys"
end
end