-
Notifications
You must be signed in to change notification settings - Fork 91
/
Vagrantfile
44 lines (39 loc) · 1.27 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
# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# create mgmt node
config.vm.define :mgmt do |mgmt_config|
mgmt_config.vm.box = "ubuntu/trusty64"
mgmt_config.vm.hostname = "mgmt"
mgmt_config.vm.network :private_network, ip: "10.0.15.10"
mgmt_config.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
mgmt_config.vm.provision :shell, path: "bootstrap-mgmt.sh"
end
# create load balancer
config.vm.define :lb do |lb_config|
lb_config.vm.box = "ubuntu/trusty64"
lb_config.vm.hostname = "lb"
lb_config.vm.network :private_network, ip: "10.0.15.11"
lb_config.vm.network "forwarded_port", guest: 80, host: 8080
lb_config.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
end
# create some web servers
# https://docs.vagrantup.com/v2/vagrantfile/tips.html
(1..2).each do |i|
config.vm.define "web#{i}" do |node|
node.vm.box = "ubuntu/trusty64"
node.vm.hostname = "web#{i}"
node.vm.network :private_network, ip: "10.0.15.2#{i}"
node.vm.network "forwarded_port", guest: 80, host: "808#{i}"
node.vm.provider "virtualbox" do |vb|
vb.memory = "256"
end
end
end
end