Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate conformance testing #686

Closed
1 of 3 tasks
jaypipes opened this issue Oct 28, 2019 · 3 comments · Fixed by #851
Closed
1 of 3 tasks

Automate conformance testing #686

jaypipes opened this issue Oct 28, 2019 · 3 comments · Fixed by #851
Assignees
Labels
priority/P0 Highest priority. Someone needs to actively work on this. testing

Comments

@jaypipes
Copy link
Contributor

jaypipes commented Oct 28, 2019

The EKS team currently runs the Sonobouy conformance test suite manually before releasing the CNI plugin. We want to both automate this process and place all test definitions into the public repo.

  • Create CircleCI plumbing (use eks-charts repo as example)
  • Flesh out the following manual steps into a Bash script that is executed from the CircleCI YAML file
# modify security group and open lower ports
# egress on controlplane security group (1-65535)
# ingress on worker security group (1-65535)
# use c4.xlarge node as worker node

# get sonobuoy if you don't have it
go get -u -v github.com/heptio/sonobuoy

# Deploy a Sonobuoy pod to your cluster with:
sonobuoy run

#View actively running pods:
sonobuoy status 

#To inspect the logs:
sonobuoy logs

# Once sonobuoy status shows the run as completed, copy the output directory from the main Sonobuoy pod to a local directory:
sonobuoy retrieve .

# This copies a single .tar.gz snapshot from the Sonobuoy pod into your local . directory. Extract the contents into ./results with:
mkdir ./results; tar xzf *.tar.gz -C ./results
# NOTE: The two files required for submission are located in the tarball under plugins/e2e/results/{e2e.log,junit.xml}.

# To clean up Kubernetes objects created by Sonobuoy, run:
sonobuoy delete
  • ensure successful Sonobuoy test run gates merges to master

Alternately, to avoid waiting for Sonobuoy logs, we could do this instead (suggested from @wongma7):

wget https://dl.k8s.io/v1.14.8/kubernetes-test.tar.gz
tar -xzf kubernetes-test.tar.gz
./kubernetes/platforms/darwin/amd64/e2e.test --kubeconfig=$KUBECONFIG --ginkgo.focus="Conformance"
@mogren mogren added the priority/P0 Highest priority. Someone needs to actively work on this. label Nov 4, 2019
@wongma7
Copy link
Member

wongma7 commented Nov 9, 2019

I don't mind sonobuoy, but if we can achieve the same thing using the e2e.test binary directly I would prefer that mostly because it's one less potential source of bugs to worry about.

For example, something like this should be possible and we'll get the test output in real-time straight to stdout rather than having to wait for sonobuoy logs

#wget https://dl.k8s.io/v1.14.8/kubernetes-test.tar.gz
#tar -xzf kubernetes-test.tar.gz
#./kubernetes/platforms/darwin/amd64/e2e.test --kubeconfig=$KUBECONFIG --ginkgo.focus="Conformance"

@jaypipes
Copy link
Contributor Author

I don't mind sonobuoy, but if we can achieve the same thing using the e2e.test binary directly I would prefer that mostly because it's one less potential source of bugs to worry about.

For example, something like this should be possible and we'll get the test output in real-time straight to stdout rather than having to wait for sonobuoy logs

#wget https://dl.k8s.io/v1.14.8/kubernetes-test.tar.gz
#tar -xzf kubernetes-test.tar.gz
#./kubernetes/platforms/darwin/amd64/e2e.test --kubeconfig=$KUBECONFIG --ginkgo.focus="Conformance"

Fair point, Matthew. I've changed the issue title and description accordingly.

@jaypipes jaypipes changed the title Automate Sonobuoy conformance testing Automate conformance testing Nov 11, 2019
jaypipes added a commit to jaypipes/amazon-vpc-cni-k8s that referenced this issue Dec 18, 2019
Adds a .circleci/config.yml file that will be used to house the complex
workflows we want to use for automated functional e2e testing.

Issue aws#686
jaypipes added a commit to jaypipes/amazon-vpc-cni-k8s that referenced this issue Jan 3, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue aws#686
Issue aws#784
Issue aws#786
jaypipes added a commit to jaypipes/amazon-vpc-cni-k8s that referenced this issue Jan 17, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue aws#686
Issue aws#784
Issue aws#786
jaypipes added a commit to jaypipes/amazon-vpc-cni-k8s that referenced this issue Jan 17, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue aws#686
Issue aws#784
Issue aws#786
mogren pushed a commit that referenced this issue Jan 20, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue #686
Issue #784
Issue #786
mogren pushed a commit to mogren/amazon-vpc-cni-k8s that referenced this issue Jan 31, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue aws#686
Issue aws#784
Issue aws#786

(cherry picked from commit 8291df3)
jaypipes added a commit that referenced this issue Jan 31, 2020
The names of environment variables accepted by aws-k8s-tester changed
when the managed node group functionality was introduced. This commit
updates the integration testing scripts to call aws-k8s-tester (v.0.5.4
which is the release needed with the fix for aws/aws-k8s-tester#70) with
these updated environment variables.

We decrease the number of parallel builds of the echo job from 100 to
3 and the number of completions for that job from 1000 to 30. This
decreases the setup time of the cluster by about 10 minutes.

Finally, I added in a short-circuit to prevent double-deprovisioning of
the cluster if, say, a stacktrace occurred when running the
aws-k8s-tester tool.

Issue #686
Issue #784
Issue #786

(cherry picked from commit 8291df3)
@jaypipes jaypipes assigned SaranBalaji90 and unassigned jaypipes Feb 21, 2020
@SaranBalaji90
Copy link
Contributor

SaranBalaji90 commented Feb 24, 2020

Ran

wget -qO- https://dl.k8s.io/v1.14.8/kubernetes-test.tar.gz | tar -zxvf - --strip-components=4 -C /tmp  kubernetes/platforms/darwin/amd64/e2e.test

/tmp/e2e.test --ginkgo.focus="Conformance" --kubeconfig=$KUBECONFIG -alsologtostderr --ginkgo.failFast -ginkgo.flakeAttempts 2 -ginkgo.progress -ginkgo.trace -ginkgo.skip="(should support remote command execution over websockets)|(should support retrieving logs from the container over websockets)"

Had to skip the following two test because of kubernetes/kubernetes#88064

  1. should support retrieving logs from the container over websockets.
  2. should support remote command execution over websockets.

Updated "flakeAttempts" to 2 so that we don't see failure on flaky tests. single test failures will still be reported as failure but test suite doesn't fail.

Added "failFast" parameter so that we will know early if something fails even with retry. Usually conformance tests takes upto 2 hours to complete.

SaranBalaji90@2264ffd has the changes required. Still testing CI integration in my repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/P0 Highest priority. Someone needs to actively work on this. testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants