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:
parent
964a8ea19c
commit
2a712c05e6
20
contrib/vagrant/Vagrantfile
vendored
20
contrib/vagrant/Vagrantfile
vendored
@ -1,15 +1,23 @@
|
|||||||
VAGRANTFILE_API_VERSION = "2"
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
VM_MEMORY = 4096
|
||||||
|
VM_CPUS = 2
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
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.hostname = "devstack"
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
config.vm.provider "virtualbox" do |vb, override|
|
||||||
vb.customize ["modifyvm", :id, "--memory", "4096"]
|
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
|
end
|
||||||
|
|
||||||
config.vm.provision :shell, :path => "vagrant.sh"
|
config.vm.provision :shell, :path => "vagrant.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user