Skip to content

Commit

Permalink
add variable for setting memory size for node
Browse files Browse the repository at this point in the history
  • Loading branch information
ksimon1 committed Nov 14, 2018
1 parent eaed64f commit 7974207
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster/ephemeral-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function _registry_volume() {
}

function _add_common_params() {
local params="--nodes ${KUBEVIRT_NUM_NODES} --memory 4096M --cpu 5 --random-ports --background --prefix $provider_prefix --registry-volume $(_registry_volume) kubevirtci/${image} ${KUBEVIRT_PROVIDER_EXTRA_ARGS}"
local params="--nodes ${KUBEVIRT_NUM_NODES} --memory ${KUBEVIRT_MEMORY_SIZE} --cpu 5 --random-ports --background --prefix $provider_prefix --registry-volume $(_registry_volume) kubevirtci/${image} ${KUBEVIRT_PROVIDER_EXTRA_ARGS}"
if [[ $TARGET =~ windows.* ]]; then
params="--memory 8192M --nfs-data $WINDOWS_NFS_DIR $params"
params=" --nfs-data $WINDOWS_NFS_DIR $params"
elif [[ $TARGET =~ openshift.* ]]; then
params="--memory 4096M --nfs-data $RHEL_NFS_DIR $params"
params=" --nfs-data $RHEL_NFS_DIR $params"
fi
echo $params
}
Expand Down
9 changes: 9 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ export KUBEVIRT_NUM_NODES=2 # schedulable master + one additional node
make cluster-up
```

You can use the `KUBEVIRT_MEMORY_SIZE` environment
variable to increase memory size per node. Normally you don't need it,
because default node memory size is set.

```bash
export KUBEVIRT_MEMORY_SIZE=8192M # node has 8GB memory size
make cluster-up
```

You could also run some build steps individually:

```bash
Expand Down
1 change: 1 addition & 0 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function build_func_tests() {

KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.10.4}
KUBEVIRT_NUM_NODES=${KUBEVIRT_NUM_NODES:-1}
KUBEVIRT_MEMORY_SIZE=${KUBEVIRT_MEMORY_SIZE:-5120M}

# Use this environment variable to set a custom pkgdir path
# Useful for cross-compilation where the default -pkdir for cross-builds may not be writable
Expand Down

0 comments on commit 7974207

Please sign in to comment.