Vagrant VM memory environment variable.

Has Vagrant try to read `KUBERNETES_MEMORY` environment varilable when setting
$vm_mem.

fixes #3792
pull/6/head
Ryan Fowler 2015-02-08 17:53:35 -06:00
parent 0059c39211
commit 749ae3d661
2 changed files with 11 additions and 2 deletions

4
Vagrantfile vendored
View File

@ -50,11 +50,11 @@ else # sorry Windows folks, I can't help you
$vm_cpus = 2
end
# Give VM 1024MB of RAM
# Give VM 1024MB of RAM by default
# In Fedora VM, tmpfs device is mapped to /tmp. tmpfs is given 50% of RAM allocation.
# When doing Salt provisioning, we copy approximately 200MB of content in /tmp before anything else happens.
# This causes problems if anything else was in /tmp or the other directories that are bound to tmpfs device (i.e /run, etc.)
$vm_mem = 1024
$vm_mem = (ENV['KUBERNETES_MEMORY'] || 1024).to_i
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
def customize_vm(config)

View File

@ -307,5 +307,14 @@ You can control the number of minions that are instantiated via the environment
export NUM_MINIONS=1
```
#### I want my VMs to have more memory !
You can control the memory allotted to virtual machines with the `KUBERNETES_MEMORY` environment variable.
Just set it to the number of megabytes you would like the machines to have. For example:
```
export KUBERNETES_MEMORY=2048
```
#### I ran vagrant suspend and nothing works!
```vagrant suspend``` seems to mess up the network. It's not supported at this time.