Skip to content

Commit

Permalink
feat(local-vagrant): add setting for video_memory
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanwalther committed May 23, 2017
1 parent 7122463 commit e334181
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion local-vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ settings = YAML.load_file 'config.yml'
NUM_OF_MANAGERS=settings['NUM_OF_MANAGERS']
NUM_OF_WORKERS=settings['NUM_OF_WORKERS']
MEMORY=settings['MEMORY']
VIDEO_MEMORY=settings['VIDEO_MEMORY']
NUM_CPUS=settings['NUM_CPUS']
DEPLOY_STACK=settings['DEPLOY_STACK']
UPDATE_MACHINES=settings['UPDATE_MACHINES']
Expand Down Expand Up @@ -109,6 +110,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
v.memory = MEMORY
v.cpus = NUM_CPUS
v.name = "manager-#{mgrNumber}"
v.customize ["modifyvm", :id, "--vram", VIDEO_MEMORY]
end

if (UPDATE_MACHINES)
Expand All @@ -123,12 +125,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "worker-#{workerNumber}" do |node|
node.vm.hostname = "worker-#{workerNumber}"
node.vm.network "private_network", ip: "192.168.50.#{149+workerNumber}"

node.vm.provider "virtualbox" do |v|
v.memory = MEMORY
v.cpus = NUM_CPUS
v.name = "worker-#{workerNumber}"
v.customize ["modifyvm", :id, "--vram", VIDEO_MEMORY]
end

if (UPDATE_MACHINES)
node.vm.provision "shell", inline: "sudo apt-get update"
end #if
Expand Down
1 change: 1 addition & 0 deletions local-vagrant/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NUM_OF_MANAGERS: 3
NUM_OF_WORKERS: 2
MEMORY: 1024
VIDEO_MEMORY: 25
NUM_CPUS: 2

# Update the machines (sudo apt-get), takes more time
Expand Down

0 comments on commit e334181

Please sign in to comment.