2015-09-23 05:48:39 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
$script = <<SCRIPT
|
|
|
|
# Update apt and get dependencies
|
|
|
|
sudo apt-get update
|
2015-10-14 15:50:03 +00:00
|
|
|
sudo apt-get install -y unzip curl wget vim
|
2015-09-23 05:48:39 +00:00
|
|
|
|
|
|
|
# Download Nomad
|
|
|
|
echo Fetching Nomad...
|
|
|
|
cd /tmp/
|
2016-08-18 21:58:14 +00:00
|
|
|
curl -sSL https://releases.hashicorp.com/nomad/0.4.1/nomad_0.4.1_linux_amd64.zip -o nomad.zip
|
2015-09-23 05:48:39 +00:00
|
|
|
|
|
|
|
echo Installing Nomad...
|
2015-09-29 22:40:12 +00:00
|
|
|
unzip nomad.zip
|
2015-09-23 05:48:39 +00:00
|
|
|
sudo chmod +x nomad
|
|
|
|
sudo mv nomad /usr/bin/nomad
|
|
|
|
|
2015-11-30 14:59:30 +00:00
|
|
|
sudo mkdir -p /etc/nomad.d
|
2015-09-23 05:48:39 +00:00
|
|
|
sudo chmod a+w /etc/nomad.d
|
|
|
|
|
|
|
|
SCRIPT
|
|
|
|
|
|
|
|
Vagrant.configure(2) do |config|
|
|
|
|
config.vm.box = "puphpet/ubuntu1404-x64"
|
|
|
|
config.vm.hostname = "nomad"
|
|
|
|
config.vm.provision "shell", inline: $script, privileged: false
|
2015-10-02 05:24:17 +00:00
|
|
|
config.vm.provision "docker" # Just install it
|
2015-09-23 05:48:39 +00:00
|
|
|
|
2015-10-02 17:43:30 +00:00
|
|
|
# Increase memory for Parallels Desktop
|
|
|
|
config.vm.provider "parallels" do |p, o|
|
|
|
|
p.memory = "1024"
|
|
|
|
end
|
|
|
|
|
2015-09-23 05:48:39 +00:00
|
|
|
# Increase memory for Virtualbox
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
|
|
vb.memory = "1024"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Increase memory for VMware
|
|
|
|
["vmware_fusion", "vmware_workstation"].each do |p|
|
|
|
|
config.vm.provider p do |v|
|
|
|
|
v.vmx["memsize"] = "1024"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|