Refactor Vagrantfile to allow other providers

This patch includes the parallels provider as an example and
sets two top variables to control over the RAM and CPUs.

Change-Id: Ib3379721990863259cc9095a715ae663f9a8c5ca
This commit is contained in:
Miguel Angel Ajo 2015-11-19 13:17:30 +01:00
parent 964a8ea19c
commit 2a712c05e6
1 changed files with 14 additions and 6 deletions

View File

@ -1,15 +1,23 @@
VAGRANTFILE_API_VERSION = "2"
VM_MEMORY = 4096
VM_CPUS = 2
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "trusty"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.hostname = "devstack"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
config.vm.provider "virtualbox" do |vb, override|
override.vm.box = "trusty"
override.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
vb.memory = VM_MEMORY
vb.cpus = VM_CPUS
end
config.vm.provider "parallels" do |v, override|
override.vm.box = "boxcutter/ubuntu1404"
v.memory = VM_MEMORY
v.cpus = VM_CPUS
v.customize ["set", :id, "--nested-virt", "on"]
end
config.vm.provision :shell, :path => "vagrant.sh"