-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathVagrantfile
39 lines (37 loc) · 1.11 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell", inline: <<-SHELL
echo Installing dependencies...
sudo apt-get update -y
sudo apt-get install -y unzip curl
echo Fetching Consul...
cd /tmp/
curl -s https://releases.hashicorp.com/consul/0.7.1/consul_0.7.1_linux_amd64.zip -o consul.zip
echo Installing Consul...
unzip consul.zip
sudo chmod +x consul
sudo mv consul /usr/bin/consul
sudo mkdir /etc/consul.d
sudo chmod a+w /etc/consul.d
sudo apt install fsharp -y
SHELL
config.vm.define 'n1' do |n1|
n1.vm.hostname = 'n1'
n1.vm.network "private_network", ip: "172.20.20.10"
end
config.vm.define 'n2' do |n1|
n1.vm.hostname = 'n2'
n1.vm.network "private_network", ip: "172.20.20.11"
end
config.vm.define 'n3' do |n1|
n1.vm.hostname = 'n3'
n1.vm.network "private_network", ip: "172.20.20.12"
end
config.vm.define 'lb' do |n1|
n1.vm.hostname = 'lb'
n1.vm.network "private_network", ip: "172.20.20.20"
n1.vm.synced_folder ".", "/vagrant"
end
end