Skip to content

Commit

Permalink
Rename VAGRANT_NUM_NODES to KUBEVIRT_NUM_NODES
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed May 2, 2018
1 parent 05f838a commit d945573
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $use_nfs = ENV['VAGRANT_USE_NFS'] == 'true'
$use_rng = ENV['VAGRANT_USE_RNG'] == 'true'
$cache_docker = ENV['VAGRANT_CACHE_DOCKER'] == 'true'
$cache_rpm = ENV['VAGRANT_CACHE_RPM'] == 'true'
$nodes = (ENV['VAGRANT_NUM_NODES'] || 0).to_i
$nodes = (ENV['KUBEVIRT_NUM_NODES'] || 0).to_i
$vagrant_pool = (ENV['VAGRANT_POOL'] unless
(ENV['VAGRANT_POOL'].nil? or ENV['VAGRANT_POOL'].empty?))
# Used for matrix builds to similar setups on the same node without vagrant
Expand Down
2 changes: 1 addition & 1 deletion automation/check-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ setup_vagrant_env() {
export VAGRANT_USE_NFS=false
export VAGRANT_CACHE_RPM=true
export VAGRANT_CACHE_DOCKER=true
export VAGRANT_NUM_NODES=1
export KUBEVIRT_NUM_NODES=1
}

setup_go_dirs() {
Expand Down
2 changes: 1 addition & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
export PROVIDER="k8s-1.9.3"
fi

export VAGRANT_NUM_NODES=1
export KUBEVIRT_NUM_NODES=1
export NFS_WINDOWS_DIR=${NFS_WINDOWS_DIR:-/home/nfs/images/windows2016}

kubectl() { cluster/kubectl.sh "$@"; }
Expand Down
4 changes: 2 additions & 2 deletions cluster/ephemeral-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function _registry_volume() {

function _add_common_params() {
# Add one, 0 here means no node at all, but in the kubevirt repo it means master-only
local num_nodes=${VAGRANT_NUM_NODES-0}
local num_nodes=${KUBEVIRT_NUM_NODES-0}
num_nodes=$((num_nodes + 1))
local params="--nodes ${num_nodes} --random-ports --background --prefix $provider_prefix --registry-volume $(_registry_volume) --base "kubevirtci/${image}""
if [ -d "$NFS_WINDOWS_DIR" ]; then
Expand Down Expand Up @@ -61,7 +61,7 @@ function build() {
container="${container} ${manifest_docker_prefix}/${name}:${docker_tag}"
container_alias="${container_alias} ${manifest_docker_prefix}/${name}:${docker_tag} kubevirt/${name}:${docker_tag}"
done
local num_nodes=${VAGRANT_NUM_NODES-0}
local num_nodes=${KUBEVIRT_NUM_NODES-0}
num_nodes=$((num_nodes + 1))
for i in $(seq 1 ${num_nodes}); do
${_cli} ssh --prefix $provider_prefix "node$(printf "%02d" ${i})" "echo \"${container}\" | xargs --max-args=1 sudo docker pull"
Expand Down
2 changes: 1 addition & 1 deletion cluster/k8s-1.9.3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local machine and are the pushed to a registry which is exposed at

```bash
export PROVIDER=k8s-1.9.3
export VAGRANT_NUM_NODES=1 # master + one nodes
export KUBEVIRT_NUM_NODES=1 # master + one nodes
make cluster-up
```

Expand Down
4 changes: 2 additions & 2 deletions cluster/os-3.9.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local machine and are the pushed to a registry which is exposed at

```bash
export PROVIDER=os-3.9.0
export VAGRANT_NUM_NODES=1 # master + one nodes
export KUBEVIRT_NUM_NODES=1 # master + one nodes
make cluster-up
```

Expand All @@ -31,7 +31,7 @@ node02 Ready <none> 46s v1.9.1+a0ce1bc657
## Bringing the cluster down

```bash
export PROVIDER=os-3.9.0
export KUBEVIRT_PROVIDER=os-3.9.0
make cluster-down
```

Expand Down
2 changes: 1 addition & 1 deletion cluster/vagrant-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It will deploy k8s only first time when you start a VM.

```bash
export PROVIDER=vagrant-kubernetes
export VAGRANT_NUM_NODES=1
export KUBEVIRT_NUM_NODES=1
make cluster-up
```

Expand Down
2 changes: 1 addition & 1 deletion cluster/vagrant-openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It will deploy OpenShift only first time when you start a VM.

```bash
export PROVIDER=vagrant-openshift
export VAGRANT_NUM_NODES=1
export KUBEVIRT_NUM_NODES=1
make cluster-up
```

Expand Down
2 changes: 1 addition & 1 deletion docs/env-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Usage:

```bash
export PROVIDER=vagrant-kubernetes # choose this provider
export VAGRANT_NUM_NODES=2 # master + two nodes
export KUBEVIRT_NUM_NODES=2 # master + two nodes
make cluster-up
```

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dockerizied environment:

This will create a VM called `node01` which acts as Kubernetes master and then
deploy KubeVirt there. To create one or more nodes which will register
themselves on master, you can use the `VAGRANT_NUM_NODES` environment variable.
themselves on master, you can use the `KUBEVIRT_NUM_NODES` environment variable.
This would create a master and one node:

```bash
export VAGRANT_NUM_NODES=1
export KUBEVIRT_NUM_NODES=1
make cluster-up
```

Expand Down

0 comments on commit d945573

Please sign in to comment.