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

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  fedora = 'hansode/fedora-21-server-x86_64'
  script = "provision.sh"
  config.hostmanager.enabled = true

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

  config.vm.provider "virtualbox" do |v|
     v.memory = 3000
     v.cpus = 1
  end

  config.vm.define "kube0" do |kube0|
    kube0.vm.box = fedora
    kube0.vm.hostname = "kube0.ha"
    kube0.vm.synced_folder ".", "/vagrant"
    kube0.vm.network :private_network, ip: "192.168.4.100"
    kube0.vm.provision "shell", path:script
  end

  config.vm.define "kube1" do |kube1|
    kube1.vm.box = fedora
    kube1.vm.hostname = "kube1.ha"
    kube1.vm.synced_folder ".", "/vagrant"
    kube1.vm.network :private_network, ip: "192.168.4.101"
    kube1.vm.provision "shell", path:script
  end

  config.vm.define "kube2" do |kube2|
    kube2.vm.box = fedora
    kube2.vm.hostname = "kube2.ha"
    kube2.vm.network :private_network, ip: "192.168.4.102"
    kube2.vm.synced_folder ".", "/vagrant"
    kube2.vm.provision "shell", path:script
  end

end
