This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
51 lines (40 loc) · 1.8 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
config.vm.provision "shell",
inline: "wget -qO- https://get.docker.com/ | sh ; sudo usermod -aG docker vagrant"
# Allow Mac OS X docker client to connect to Docker without TLS auth
config.vm.provision "shell",
inline: "sudo bash -c \'echo \"DOCKER_TLS=no\" > /etc/default/docker\'"
config.vm.provision "shell",
inline: "sudo bash -c \"echo DOCKER_OPTS='\\\"--dns 172.17.42.1 --dns 8.8.8.8 --dns-search=service.consul -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -r --insecure-registry registry.service.consul:5000\\\"' >> /etc/default/docker\""
config.vm.provision "shell",
inline: "sudo bash -c \"stop docker && sudo start docker\""
config.vm.define :tsuru do |tsuru|
tsuru.vm.hostname = 'tsuru'
tsuru.vm.network "private_network", ip: "192.168.33.10"
tsuru.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "4"]
end
end
config.vm.define :dockerNode01 do |node|
node.vm.hostname = 'dockerNode'
node.vm.network "private_network", ip: "192.168.33.11"
node.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
end
config.vm.define :dockerNode02 do |node|
node.vm.hostname = 'dockerNode'
node.vm.network "private_network", ip: "192.168.33.12"
node.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
end
end