-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
90 lines (78 loc) · 2.99 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
81
82
83
84
85
86
87
88
89
90
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 256
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
end
# Django
config.vm.define "web1" do |app|
app.vm.hostname = "data-web1.dev"
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.61.4"
app.vm.network "forwarded_port", guest: 22, host: 2227, id: 'ssh'
app.vm.network "forwarded_port", guest: 80, host: 8080
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
# Celery & queue server (RabbitMQ)
config.vm.define "celery1" do |app|
app.vm.hostname = "data-celery1.dev"
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.61.5"
app.vm.network "forwarded_port", guest: 22, host: 2228, id: 'ssh'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
# PostgreSQL (db) & Apache Cassandra (Cache)
config.vm.define "db1" do |app|
app.vm.hostname = "data-db.dev"
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.61.6"
app.vm.network "forwarded_port", guest: 22, host: 2229, id: 'ssh'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
# collector
config.vm.define "collector1" do |app|
app.vm.hostname = "data-collector.dev"
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.61.7"
app.vm.network "forwarded_port", guest: 22, host: 2230, id: 'ssh'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
# Elasticsearch
config.vm.define "elastic1" do |app|
app.vm.hostname = "data-elastic.dev"
app.vm.box = "ubuntu/trusty64"
app.vm.network :private_network, ip: "192.168.61.8"
app.vm.network "forwarded_port", guest: 22, host: 2231, id: 'ssh'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
end
end