Fix the memory of the VM in VirtualBox
Also mount the grenade folder where it exists Change-Id: I7abf586b1280599c5954b641c95efaea1fd9cbc3
This commit is contained in:
parent
c76dd0e40b
commit
e2c5d0703c
14
contrib/vagrant/Vagrantfile
vendored
14
contrib/vagrant/Vagrantfile
vendored
@ -3,6 +3,8 @@ GITCONFIG = `cat $HOME/.gitconfig`
|
|||||||
|
|
||||||
Vagrant.require_version ">= 1.5"
|
Vagrant.require_version ">= 1.5"
|
||||||
|
|
||||||
|
VM_RAM_SIZE = "8192"
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.ssh.forward_agent = true
|
config.ssh.forward_agent = true
|
||||||
|
|
||||||
@ -10,7 +12,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.network "forwarded_port", guest: 5354, host: 5354, protocol: "udp"
|
config.vm.network "forwarded_port", guest: 5354, host: 5354, protocol: "udp"
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb, override|
|
config.vm.provider "virtualbox" do |vb, override|
|
||||||
vb.customize ["modifyvm", :id, "--memory", "2048"]
|
vb.customize ["modifyvm", :id, "--memory", VM_RAM_SIZE]
|
||||||
if not RUBY_PLATFORM.downcase.include?("mswin")
|
if not RUBY_PLATFORM.downcase.include?("mswin")
|
||||||
vb.customize ["modifyvm", :id, "--cpus", `awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp ]
|
vb.customize ["modifyvm", :id, "--cpus", `awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp ]
|
||||||
end
|
end
|
||||||
@ -34,6 +36,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
override.vm.synced_folder "../../../devstack", "/home/vagrant/devstack"
|
override.vm.synced_folder "../../../devstack", "/home/vagrant/devstack"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if File.directory?("../../../grenade")
|
||||||
|
override.vm.synced_folder "../../../grenade", "/opt/stack/grenade"
|
||||||
|
end
|
||||||
|
|
||||||
if File.directory?("../../../tempest")
|
if File.directory?("../../../tempest")
|
||||||
override.vm.synced_folder "../../../tempest", "/opt/stack/tempest"
|
override.vm.synced_folder "../../../tempest", "/opt/stack/tempest"
|
||||||
end
|
end
|
||||||
@ -46,7 +52,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.provider :libvirt do |lv, override|
|
config.vm.provider :libvirt do |lv, override|
|
||||||
lv.graphics_ip = '0.0.0.0'
|
lv.graphics_ip = '0.0.0.0'
|
||||||
lv.nested = true
|
lv.nested = true
|
||||||
lv.memory = 8192
|
lv.memory = Integer(VM_RAM_SIZE)
|
||||||
if not RUBY_PLATFORM.downcase.include?("mswin")
|
if not RUBY_PLATFORM.downcase.include?("mswin")
|
||||||
lv.cpus = `awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp
|
lv.cpus = `awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp
|
||||||
end
|
end
|
||||||
@ -66,6 +72,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
override.vm.synced_folder "../../../designate-tempest-plugin", "/opt/stack/designate-tempest-plugin", type: "nfs"
|
override.vm.synced_folder "../../../designate-tempest-plugin", "/opt/stack/designate-tempest-plugin", type: "nfs"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if File.directory?("../../../grenade")
|
||||||
|
override.vm.synced_folder "../../../grenade", "/opt/stack/grenade", type: "nfs"
|
||||||
|
end
|
||||||
|
|
||||||
if File.directory?("../../../devstack")
|
if File.directory?("../../../devstack")
|
||||||
override.vm.synced_folder "../../../devstack", "/home/vagrant/devstack", type: "nfs"
|
override.vm.synced_folder "../../../devstack", "/home/vagrant/devstack", type: "nfs"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user