improve contrib/dind/README.md

This commit is contained in:
JuanJo Ciarlante 2018-10-16 21:25:17 -03:00
parent 635261eb12
commit 7fe7357154
No known key found for this signature in database
GPG key ID: A3F7E24966727177
2 changed files with 30 additions and 3 deletions

View file

@ -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 $ 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} {"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 <spec_filename>-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.

View file

@ -52,15 +52,18 @@ NETCHECKER_HOST=localhost
: ${OUTPUT_DIR:=./out} : ${OUTPUT_DIR:=./out}
mkdir -p ${OUTPUT_DIR} 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) # DISTROS=(debian centos)
# EXTRAS=( # EXTRAS=(
# 'kube_network_plugin=calico' # 'kube_network_plugin=calico'
# 'kube_network_plugin=flannel' # 'kube_network_plugin=flannel'
# 'kube_network_plugin=weave' # 'kube_network_plugin=weave'
# ) # )
# that we'll test in a "combinatory" way (e.g. above will be 6 tests), # that will be tested in a "combinatory" way (e.g. from above there'll be
# creating a sequenced <spec_filename>-nn.out with each output # be 6 test runs), creating a sequenced <spec_filename>-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} SPECS=${*:?Missing SPEC files, e.g. test-most_distros-some_CNIs.env}
for spec in ${SPECS}; do for spec in ${SPECS}; do