Closed marccarre closed 7 years ago
Does this replace #229?
Does this encompass #1747?
Does this replace #2018?
Does this encompass #2620?
Let's keep #1747, #2018 and #2620 as an individual issues though. #2647 is more of an "epic" or meta-issue.
Next: cross-version testing.
Note that cross-version testing of Kubernetes depends on kubernetes/release/issues/234.
Fixed by #2694
Summary
Re-factor the current smoke tests in order to:
This should hopefully:
Progress
pod
/a set of containers.Makefile
Details
Current state
Weave Net is currently integration-tested in two main ways:
test/Vagrantfile
) andmake run-smoketests
;git push
, using CircleCI and Google Cloud Platform (GCP -- seecircle.yml
andtest/gce.sh
)Software used during the build & testing currently is:
build/Dockerfile
andvagrant-common.rb
)Makefile
)cd weave; vagrant up; vagrant ssh; docker --version
)cd weave/test; vagrant up; vagrant ssh host1; docker --version
)cd weave; vagrant up; vagrant ssh; cat /etc/*-release
andcd weave/test; vagrant up; vagrant ssh host1; cat /etc/*-release
)test/gce.sh
)Limitations & Potential Issues
Proposed Target State
Decouple dependencies definition, provisioning, configuration and testing: i. It should be easy to list all available versions of software we rely upon (OS, Docker, Go, etc.). ii. It should be easy to define a combination of these versions to use for development/testing. iii. It should be easy to provision a local or remote environment. In the case of remote environments, it should be easy to leverage any cloud provider. iv. It should be easy to configure the environment created in 1.iii. using the versions defined in 1.ii. v. It should be easy to then perform any kind of testing on this environment: manual, automated, integration tests, cross-version tests, stress tests, etc.
"Dependency-inject" versions to the build: OS, Docker and Go versions should all be configurable in one single place, and then passed in a "top-down" fashion to the provisioning and configuration layers and NOT hardcoded anywhere else below (other layers, in actual tests, etc.).
Testing: i. Integration testing should simply be one instance of 1.ii/iii/iv., with, e.g. the latest versions, or a hardcoded combination of versions of all dependencies. This would continue to be run on every
git push
. ii. Cross-version testing: it should be easy to repeat 3.i. for multiple combinations of versions, or even all combinations (cartesian product of versions of all dependencies), hence making it easy to:This would typically be run weekly and/or manually before releases.
iii. Cross-version testing should ideally be done concurrently, for faster feedback. iv. Stress testing & more advanced testing scenarios could also re-use 1.ii/iii/iv.
Proposed Implementation
make
would, depending on the target, either: i. call 1. and select versions using pre-defined rules (e.g. latest production version, latest RC version, etc.) ii. use hardcoded versions.Vagrantfile
s (see Vagrant) could be used to provision local VMs. ii. Remotely: a set of.tf
(see Terraform) files could be used to provision machines from AWS, GCP and Digital Ocean. Docker Infrakit may also be a good tool to implement the above -- see also this article