Skip to content

Commit e4b539a

Browse files
committed
Vagrantfile: add env vars for VM's CPU & RAM
Signed-off-by: Cristian Staretu <[email protected]>
1 parent 5732e53 commit e4b539a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Vagrantfile

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ nightly_release = ENV['NIGHTLY_RELEASE'] || ''
2929
node_os = ENV['CONTIV_NODE_OS'] || 'centos'
3030
base_ip = ENV['CONTIV_IP_PREFIX'] || '192.168.2.'
3131
num_nodes = ENV['CONTIV_NODES'].to_i == 0 ? 3 : ENV['CONTIV_NODES'].to_i
32+
num_vm_cpus = (ENV['CONTIV_CPUS'] || 4).to_i
33+
vm_memory = (ENV['CONTIV_MEMORY'] || 2048).to_i
3234
legacy_docker = docker_version >= "17.03" ? 0 : 1
3335

3436
provision_common_once = <<SCRIPT
@@ -264,6 +266,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
264266
end
265267
config.vm.provider 'virtualbox' do |v|
266268
v.linked_clone = true if Vagrant::VERSION >= "1.8"
269+
v.memory = vm_memory
270+
v.cpus = num_vm_cpus
267271
end
268272

269273
node_ips = num_nodes.times.collect { |n| base_ip + "#{n+10}" }

0 commit comments

Comments
 (0)