-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
46 lines (34 loc) · 1.15 KB
/
Vagrantfile
File metadata and controls
46 lines (34 loc) · 1.15 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
$memory = "1024"
Vagrant.configure("2") do |config|
config.vm.box = "boxcutter/ubuntu1604"
config.vm.provider "virtualbox" do |vb|
vb.memory = $memory
end
config.vm.provider "parallels" do |p, o|
p.memory = $memory
end
config.vm.synced_folder ".", "/src/consul-gateway"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install curl unzip make g++ -y
echo Downlaoding consul...
cd /tmp
curl -sSL https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip -o consul.zip
echo Installing consul...
unzip consul.zip
mv consul /usr/bin/consul
echo Installing node...
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g npm
npm install -g mocha
cd /src/consul-gateway
consul agent -dev >> /var/log/consul.log &
SHELL
end