Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
749ae3d6
Commit
749ae3d6
authored
Feb 08, 2015
by
Ryan Fowler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vagrant VM memory environment variable.
Has Vagrant try to read `KUBERNETES_MEMORY` environment varilable when setting $vm_mem. fixes #3792
parent
0059c392
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
Vagrantfile
Vagrantfile
+2
-2
vagrant.md
docs/getting-started-guides/vagrant.md
+9
-0
No files found.
Vagrantfile
View file @
749ae3d6
...
@@ -50,11 +50,11 @@ else # sorry Windows folks, I can't help you
...
@@ -50,11 +50,11 @@ else # sorry Windows folks, I can't help you
$vm_cpus
=
2
$vm_cpus
=
2
end
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.
# 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.
# 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.)
# 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
|
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
def
customize_vm
(
config
)
def
customize_vm
(
config
)
...
...
docs/getting-started-guides/vagrant.md
View file @
749ae3d6
...
@@ -307,5 +307,14 @@ You can control the number of minions that are instantiated via the environment
...
@@ -307,5 +307,14 @@ You can control the number of minions that are instantiated via the environment
export NUM_MINIONS=1
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!
#### I ran vagrant suspend and nothing works!
```vagrant suspend```
seems to mess up the network. It's not supported at this time.
```vagrant suspend```
seems to mess up the network. It's not supported at this time.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment