-
Notifications
You must be signed in to change notification settings - Fork 67
/
Vagrantfile
101 lines (100 loc) · 3.39 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
91
92
93
94
95
96
97
98
99
100
101
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=700,fmode=600"]
else
config.vm.synced_folder ".", "/vagrant"
end
config.vm.define "cd" do |d|
d.vm.box = "ubuntu/trusty64"
d.vm.hostname = "cd"
d.vm.network "private_network", ip: "10.100.198.200"
d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /vagrant/ansible/cd.yml -c local"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 2048
end
end
config.vm.define "prod" do |d|
d.vm.box = "ubuntu/trusty64"
d.vm.hostname = "prod"
d.vm.network "private_network", ip: "10.100.198.201"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 1024
end
end
config.vm.define "logging" do |d|
d.vm.box = "ubuntu/trusty64"
d.vm.hostname = "logging"
d.vm.network "private_network", ip: "10.100.198.202"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 1536
end
end
(1..3).each do |i|
config.vm.define "serv-disc-0#{i}" do |d|
d.vm.box = "ubuntu/trusty64"
d.vm.hostname = "serv-disc-0#{i}"
d.vm.network "private_network", ip: "10.100.194.20#{i}"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 1024
end
end
end
config.vm.define "proxy" do |d|
d.vm.box = "ubuntu/trusty64"
d.vm.hostname = "proxy"
d.vm.network "private_network", ip: "10.100.193.200"
d.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.memory = 1024
end
end
config.vm.define "swarm-master" do |d|
d.vm.box = "ubuntu/xenial-cloud"
d.vm.box_url = "http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
d.vm.hostname = "swarm-master"
d.vm.network "private_network", ip: "10.100.192.200"
d.vm.provision :shell, inline: "sudo apt-get install -y python"
d.vm.provider "virtualbox" do |v|
v.memory = 1024
end
end
(1..2).each do |i|
config.vm.define "swarm-node-#{i}" do |d|
d.vm.box = "ubuntu/xenial-cloud"
d.vm.box_url = "http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
d.vm.network "private_network", ip: "10.100.192.20#{i}"
d.vm.hostname = "swarm-node-#{i}"
d.vm.provision :shell, inline: "sudo apt-get install -y python"
d.vm.provider "virtualbox" do |v|
v.memory = 1536
v.cpus = 1
end
end
end
(1..2).each do |i|
config.vm.define "mesos-#{i}" do |d|
d.vm.box = "bento/centos-7.1"
d.vm.hostname = "mesos-#{i}"
d.vm.network "private_network", ip: "10.100.197.20#{i}"
d.vm.provider "virtualbox" do |v|
v.memory = 1536
v.cpus = 1
end
end
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
config.vbguest.no_install = true
config.vbguest.no_remote = true
end
end