# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  # define primary development box
  config.vm.define "sso", primary: true do |p|
    p.vm.box = "ubuntu/xenial64"
    p.vm.network "private_network", ip: "192.168.42.101"
    p.vm.network "forwarded_port", guest: 3838, host: 3838, auto_correct: true
    p.vm.provision :shell, path: "bootstrap-debian.sh"
    p.vm.provision :shell, path: "provision-sso.sh"
  end

  config.vm.define "nfs", autostart: false do |b|
    b.vm.box = "ubuntu/xenial64"
    b.vm.network "private_network", ip: "192.168.42.102"
    b.vm.provision :shell, path: "provision-nfs.sh"
  end

  # give machine liberal cpu & core resources for virtualbox (adjust to taste)
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "2048"
    vb.cpus = "2"
  end

  config.vm.synced_folder "../../", "/shiny-server"
  config.vm.synced_folder "../../", "/home/vagrant/shiny-server"
end
