blob: b67c7fafec27037e61f8a2c6dc4ffc2b370be413 [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 Scandolo4bb87be2016-10-27 11:10:00 +02006 config.vm.synced_folder "../", "/home/vagrant/service-profile"
7 config.vm.synced_folder "../../xos", "/home/vagrant/xos", create: true
Matteo Scandolod23b7bd2016-11-18 15:52:45 -08008 config.vm.synced_folder "../../xos_services", "/home/vagrant/xos_services", create: true
9 config.vm.synced_folder "../../xos_libraries", "/home/vagrant/xos_libraries", create: true
Matteo Scandoloc217d702016-06-29 16:58:33 -070010 config.vm.synced_folder ".", "/vagrant", disabled: true
Scott Baker665839d2016-06-29 07:36:36 -070011
Matteo Scandolod23b7bd2016-11-18 15:52:45 -080012 # set the frontend vm
13 config.vm.define "frontend" do |d|
14 d.vm.network "forwarded_port", guest: 9999, host: 9999
15 d.vm.network "forwarded_port", guest: 6379, host: 6379
16 d.vm.network "private_network", ip: "192.168.46.100"
17 d.vm.provider "virtualbox" do |vb|
18 vb.memory = "2048"
19 end
Scott Baker665839d2016-06-29 07:36:36 -070020 end
21
Matteo Scandolod23b7bd2016-11-18 15:52:45 -080022 config.vm.provision "shell", privileged: false, inline: <<-SHELL
23 sudo apt-get update
24 sudo apt-get install -y apt-transport-https ca-certificates git
25 sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
26 echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | sudo tee /etc/apt/sources.list.d/docker.list
27 sudo apt-get update
28 sudo apt-get install -y git docker-engine python-pip
29 sudo pip install docker-compose
30 sudo groupadd docker
31 sudo usermod -aG docker vagrant
32 SHELL
33
Scott Baker50421662016-06-27 22:09:48 -070034 end