diff --git a/contrib/dind/README.md b/contrib/dind/README.md index af0bf30ba..4eb334a54 100644 --- a/contrib/dind/README.md +++ b/contrib/dind/README.md @@ -150,3 +150,27 @@ kube-system weave-net-xr46t 2/2 Running 0 $ docker exec kube-node1 curl -s http://localhost:31081/api/v1/connectivity_check {"Message":"All 10 pods successfully reported back to the server","Absent":null,"Outdated":null} ~~~ + +## Using ./run-test-distros.sh + +You can use `./run-test-distros.sh` to run a set of tests via DIND, +and excerpt from this script, to get an idea: + +~~~ +# The SPEC file(s) must have two arrays as e.g. +# DISTROS=(debian centos) +# EXTRAS=( +# 'kube_network_plugin=calico' +# 'kube_network_plugin=flannel' +# 'kube_network_plugin=weave' +# ) +# that will be tested in a "combinatory" way (e.g. from above there'll be +# be 6 test runs), creating a sequenced -nn.out with each output. +# +# Each $EXTRAS element will be whitespace split, and passed as --extra-vars +# to main kubespray ansible-playbook run. +~~~ + +See e.g. `test-some_distros-most_CNIs.env` and +`test-some_distros-kube_router_combo.env` in particular for a richer +set of CNI specific `--extra-vars` combo. diff --git a/contrib/dind/run-test-distros.sh b/contrib/dind/run-test-distros.sh index 6c2d4cbc6..0e3510fd0 100755 --- a/contrib/dind/run-test-distros.sh +++ b/contrib/dind/run-test-distros.sh @@ -52,15 +52,18 @@ NETCHECKER_HOST=localhost : ${OUTPUT_DIR:=./out} mkdir -p ${OUTPUT_DIR} -# We expect the SPEC file(s) to have below two arrays as e.g. +# The SPEC file(s) must have two arrays as e.g. # DISTROS=(debian centos) # EXTRAS=( # 'kube_network_plugin=calico' # 'kube_network_plugin=flannel' # 'kube_network_plugin=weave' # ) -# that we'll test in a "combinatory" way (e.g. above will be 6 tests), -# creating a sequenced -nn.out with each output +# that will be tested in a "combinatory" way (e.g. from above there'll be +# be 6 test runs), creating a sequenced -nn.out with each output. +# +# Each $EXTRAS element will be whitespace split, and passed as --extra-vars +# to main kubespray ansible-playbook run. SPECS=${*:?Missing SPEC files, e.g. test-most_distros-some_CNIs.env} for spec in ${SPECS}; do