2014-04-11 00:34:10 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
$script = <<SCRIPT
|
|
|
|
|
2014-04-19 11:34:28 +00:00
|
|
|
echo Installing dependencies...
|
2014-04-11 00:34:10 +00:00
|
|
|
sudo apt-get install -y unzip
|
|
|
|
|
|
|
|
echo Fetching Consul...
|
|
|
|
cd /tmp/
|
|
|
|
wget https://dl.bintray.com/mitchellh/consul/0.1.0_linux_amd64.zip -O consul.zip
|
|
|
|
|
|
|
|
echo Installing Consul...
|
|
|
|
unzip consul.zip
|
|
|
|
sudo chmod +x consul
|
|
|
|
sudo mv consul /usr/bin/consul
|
|
|
|
|
|
|
|
SCRIPT
|
|
|
|
|
|
|
|
# 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 = "hashicorp/precise64"
|
|
|
|
|
|
|
|
config.vm.provision "shell", inline: $script
|
|
|
|
|
|
|
|
config.vm.define "n1" do |n1|
|
2014-04-20 12:04:43 +00:00
|
|
|
n1.vm.hostname = "n1"
|
2014-04-11 00:34:10 +00:00
|
|
|
n1.vm.network "private_network", ip: "172.20.20.10"
|
|
|
|
end
|
|
|
|
|
|
|
|
config.vm.define "n2" do |n2|
|
2014-04-20 12:04:43 +00:00
|
|
|
n2.vm.hostname = "n2"
|
2014-04-11 00:34:10 +00:00
|
|
|
n2.vm.network "private_network", ip: "172.20.20.11"
|
|
|
|
end
|
|
|
|
end
|