Andy Bavier | 094e716 | 2016-11-02 17:01:22 -0400 | [diff] [blame^] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.configure(2) do |config| |
| 5 | |
| 6 | config.vm.box = "ubuntu/trusty64" |
| 7 | |
| 8 | config.vm.synced_folder "../", "/home/vagrant/service-profile" |
| 9 | config.vm.synced_folder "../../xos", "/home/vagrant/xos", create: true |
| 10 | config.vm.synced_folder "../../xos_services", "/home/vagrant/xos_services", create: true |
| 11 | config.vm.synced_folder ".", "/vagrant", disabled: true |
| 12 | |
| 13 | config.vm.define "arizona" do |d| |
| 14 | d.vm.network "forwarded_port", guest: 9999, host: 9990 |
| 15 | d.vm.network "private_network", ip: "192.168.33.10" |
| 16 | d.vm.provider "virtualbox" do |vb| |
| 17 | vb.memory = "1024" |
| 18 | end |
| 19 | end |
| 20 | |
| 21 | config.vm.define "global" do |d| |
| 22 | d.vm.network "forwarded_port", guest: 9999, host: 9999 |
| 23 | d.vm.network "private_network", ip: "192.168.33.2" |
| 24 | d.vm.provider "virtualbox" do |vb| |
| 25 | vb.memory = "1024" |
| 26 | end |
| 27 | end |
| 28 | |
| 29 | config.vm.provision "shell", privileged: false, inline: <<-SHELL |
| 30 | sudo apt-get update |
| 31 | sudo apt-get install -y apt-transport-https ca-certificates git |
| 32 | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
| 33 | echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | sudo tee /etc/apt/sources.list.d/docker.list |
| 34 | sudo apt-get update |
| 35 | sudo apt-get install -y git docker-engine python-pip |
| 36 | sudo pip install docker-compose |
| 37 | sudo groupadd docker |
| 38 | sudo usermod -aG docker vagrant |
| 39 | SHELL |
| 40 | end |