-
Notifications
You must be signed in to change notification settings - Fork 21
/
Vagrantfile
62 lines (58 loc) · 2.38 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION=2
PROJECT_NAME = "lehaproxy"
CLIENT_MEMORY=1024
CLIENT_CPU_COUNT = 2
CLIENT_IOAPIC = "on"
CLIENT_NAT_DNS_HOSTRESOLVER="on"
SERVER_MEMORY=2048
SERVER_CPU_COUNT = 2
SERVER_IOAPIC = "on"
SERVER_NAT_DNS_HOSTRESOLVER="on"
ENVS = {
'PROJECT_NAME' => PROJECT_NAME,
'PROJECT_TZ' => "Europe/Amsterdam",
'PROJECT_CLIENT_HOSTNAME' => PROJECT_NAME + ".local",
'PROJECT_SERVER_HOSTNAME' => "boulder.local",
'PROJECT_SERVER_IP' => "192.168.33.111",
'PROJECT_CLIENT_IP' => "192.168.33.222"
}
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#config.hostmanager.enabled = true
#config.hostmanager.manage_host = true
config.vbguest.auto_update = true
config.vbguest.no_remote = false
config.vm.define "boulder", autostart: true do |server|
server.vm.box = "debian/jessie64"
server.vm.hostname = "boulder.local"
server.vm.network :private_network, ip: ENVS['PROJECT_SERVER_IP']
server.vm.synced_folder ".", "/boulder/", type: "virtualbox"
server.vm.provision "shell" do |s|
s.path = './provisioning_server.sh'
s.env = ENVS
end
server.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", SERVER_MEMORY]
vb.customize ["modifyvm", :id, "--cpus", SERVER_CPU_COUNT]
vb.customize ["modifyvm", :id, "--ioapic", SERVER_IOAPIC]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", SERVER_NAT_DNS_HOSTRESOLVER]
end
end
config.vm.define "lehaproxy", autostart: true do |client|
client.vm.box = "debian/jessie64"
client.vm.hostname = PROJECT_NAME + ".local"
client.vm.network :private_network, ip: ENVS['PROJECT_CLIENT_IP']
client.vm.synced_folder ".", "/" + PROJECT_NAME + "/", type: "virtualbox"
client.vm.provision "shell" do |s|
s.path = './provisioning_client.sh'
s.env = ENVS
end
client.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", CLIENT_MEMORY]
vb.customize ["modifyvm", :id, "--cpus", CLIENT_CPU_COUNT]
vb.customize ["modifyvm", :id, "--ioapic", CLIENT_IOAPIC]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", CLIENT_NAT_DNS_HOSTRESOLVER]
end
end
end