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

Vagrant.configure(2) do |config|

  if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
    config.vm.synced_folder "..", "/cord", mount_options: ["dmode=700,fmode=600"]
  else
    config.vm.synced_folder "..", "/cord"
  end

  #By default, this variable is set to 2, such that Vagrantfile allows creation
  #of compute nodes up to 2. If the number of compute nodes to be supported more
  #than 2, set the environment variable NUM_COMPUTE_NODES to the desired value
  #before executing this Vagrantfile.
  num_compute_nodes = (ENV['NUM_COMPUTE_NODES'] || 2).to_i
  compute_ip_base = "10.6.1."
  compute_ips = num_compute_nodes.times.collect { |n| compute_ip_base + "#{n+2}" }

  config.vm.define "corddev" do |d|
    d.ssh.forward_agent = true
    d.vm.box = "ubuntu/trusty64"
    d.vm.synced_folder '.', '/vagrant', disabled: true
    d.vm.hostname = "corddev"
    d.vm.network "private_network", ip: "10.100.198.200"
    d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
    d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/corddev.yml -c local"
    d.vm.provider "virtualbox" do |v|
      v.memory = 2048
    end
    d.vm.provider :libvirt do |v, override|
      v.memory = 2048
      override.vm.synced_folder "..", "/cord", type: "nfs"
    end
  end

  config.vm.define "prod" do |d|
    d.vm.box = "ubuntu/trusty64"
    d.vm.synced_folder '.', '/vagrant', disabled: true
    d.vm.hostname = "prod"
    d.vm.network "forwarded_port", guest: 80, host: 80, host_ip: '*'
    d.vm.network "private_network", ip: "10.100.198.201"
    d.vm.network "private_network",
        ip: "0.0.0.0",
        auto_config: false,
        virtualbox__intnet: "cord-mgmt-network",
        libvirt__network_name: "cord-mgmt-network",
        libvirt__forward_mode: "none",
        libvirt__dhcp_enabled: false
    d.vm.network "private_network",
        ip: "10.6.1.201", # To set up the 10.6.1.1 IP address on bridge
        virtualbox__intnet: "cord-fabric-network",
        libvirt__network_name: "cord-fabric-network",
        libvirt__forward_mode: "nat",
        libvirt__dhcp_enabled: false
    d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
    d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/prod.yml -c local"
    d.vm.provider "virtualbox" do |v|
      v.memory = 2048
    end
    d.vm.provider :libvirt do |v, override|
      v.memory = 16384
      v.cpus = 8
      v.storage :file, :size => '100G', :type => 'qcow2'
      override.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/add-extra-drive.yml -c local"
    end
  end

  config.vm.define "switch" do |s|
    s.vm.box = "ubuntu/trusty64"
    s.vm.hostname = "fakeswitch"
    s.vm.network "private_network", ip: "10.100.198.253"
    s.vm.network "private_network",
        type: "dhcp",
        virtualbox__intnet: "cord-fabric-network",
        libvirt__network_name: "cord-fabric-network",
        mac: "cc37ab000001"
    s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
    s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/fakeswitch.yml -c local"
    s.vm.provider "virtualbox" do |v|
      v.memory = 1048
      v.name = "fakeswitch"
    end
  end

  config.vm.define "testbox" do |d|
    d.vm.box = "fgrehm/trusty64-lxc"
    d.ssh.forward_agent = true
    d.vm.hostname = "testbox"
    d.vm.network "private_network", ip: "10.0.3.100", lxc__bridge_name: 'lxcbr0'
    d.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
    d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/build/ansible/corddev.yml -c local"
    config.vm.provider :lxc do |lxc|
        # Same effect as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox
        lxc.customize 'cgroup.memory.limit_in_bytes', '2048M'
        lxc.customize 'aa_profile', 'unconfined'
        lxc.customize 'cgroup.devices.allow', 'b 7:* rwm'
        lxc.customize 'cgroup.devices.allow', 'c 10:237 rwm'
    end
  end

  num_compute_nodes.times do |n|
    config.vm.define "compute_node-#{n+1}" do |c|
      compute_ip = compute_ips[n]
      compute_index = n+1
      c.vm.synced_folder '.', '/vagrant', disabled: true
      c.vm.communicator = "none"
      c.vm.hostname = "computenode-#{compute_index}"
      c.vm.network "private_network",
        adapter: 1,
        ip: "0.0.0.0",
        auto_config: false,
        virtualbox__intnet: "cord-mgmt-network",
        libvirt__network_name: "cord-mgmt-network"
      c.vm.network "private_network",
        adapter: 2,
        ip: "#{compute_ip}",
        auto_config: false,
        virtualbox__intnet: "cord-fabric-network",
        libvirt__network_name: "cord-fabric-network",
        libvirt__forward_mode: "nat",
        libvirt__dhcp_enabled: false
      c.vm.provider :libvirt do |v|
        v.memory = 8192
        v.cpus = 4
        v.machine_virtual_size = 100
        v.storage :file, :size => '100G', :type => 'qcow2'
        v.boot 'network'
        v.boot 'hd'
        v.nested = true
      end
      c.vm.provider "virtualbox" do |v, override|
        override.vm.box = "clink15/pxe"
        v.memory = 1048
        v.gui = "true"
      end
    end
  end

  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end

end
