blob: a815112fda8a1367588d94adaff70d3c61bdc5cb [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001Vagrant.configure("2") do |config|
Scott Baker665839d2016-06-29 07:36:36 -07002 # base image
Scott Baker50421662016-06-27 22:09:48 -07003 config.vm.box = "ubuntu/trusty64"
4
Scott Baker665839d2016-06-29 07:36:36 -07005 # share the folder
Matteo Scandolo76d7bcd2016-11-30 17:08:17 -08006 config.vm.synced_folder "../../", "/home/vagrant/", create: true
Matteo Scandoloc217d702016-06-29 16:58:33 -07007 config.vm.synced_folder ".", "/vagrant", disabled: true
Scott Baker665839d2016-06-29 07:36:36 -07008
Matteo Scandolod23b7bd2016-11-18 15:52:45 -08009 # set the frontend vm
10 config.vm.define "frontend" do |d|
11 d.vm.network "forwarded_port", guest: 9999, host: 9999
12 d.vm.network "forwarded_port", guest: 6379, host: 6379
13 d.vm.network "private_network", ip: "192.168.46.100"
14 d.vm.provider "virtualbox" do |vb|
Matteo Scandoloaf2cd4f2016-12-22 13:27:10 -080015 vb.memory = "2048"
16 vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
17 vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
Matteo Scandolod23b7bd2016-11-18 15:52:45 -080018 end
Scott Baker665839d2016-06-29 07:36:36 -070019 end
20
Matteo Scandolod23b7bd2016-11-18 15:52:45 -080021 config.vm.provision "shell", privileged: false, inline: <<-SHELL
22 sudo apt-get update
23 sudo apt-get install -y apt-transport-https ca-certificates git
24 sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
25 echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | sudo tee /etc/apt/sources.list.d/docker.list
26 sudo apt-get update
Matteo Scandolo00219642017-01-13 14:03:11 -080027 sudo apt-get install -y git docker-engine python-pip python-dev build-essential
Matteo Scandolod23b7bd2016-11-18 15:52:45 -080028 sudo pip install docker-compose
29 sudo groupadd docker
30 sudo usermod -aG docker vagrant
31 SHELL
32
Scott Baker50421662016-06-27 22:09:48 -070033 end