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

Reduce time to create EKS cluster in integration tests #786

Closed
3 tasks
jaypipes opened this issue Jan 2, 2020 · 4 comments
Closed
3 tasks

Reduce time to create EKS cluster in integration tests #786

jaypipes opened this issue Jan 2, 2020 · 4 comments

Comments

@jaypipes
Copy link
Contributor

jaypipes commented Jan 2, 2020

Functionally testing the CNI plugin is cumbersome due to the amount of time that it takes to get the aws-k8s-tester create cluster to complete (as well as the amount of time it takes to delete that cluster.

I've noticed that the average time for the aws-k8s-tester create cluster command to complete seems to be around 30-35 minutes. However, a good chunk (maybe 10-15 minutes) of this time is actually aws-k8s-tester running a series of tests to "warm up" the cluster. These tests create 30 Jobs spread over the 3 worker nodes. Each Job does a simple echo and there is a poll collecting how many Jobs completed successfully.

This warm up test is then repeated for 1000 Jobs of the same type. This takes around 8 minutes or so.

I think for the purposes of the CNI integration tests, we should be able to do a couple things to speed up the iterative cycle of dev-test:

  • Modify aws-k8s-tester configuration to run a smaller set of warm-up Jobs (see 1)
  • Modify aws-k8s-tester to allow customized expo-backoff polling timeouts and intervals. The intervals for many polling operations is 1 minute, which means aws-k8s-tester is basically just sitting there waiting for a minute at a time checking to see if some CloudFormation stack has had its status shifted to an expected status
  • Handle failures in the image building or setup earlier before the aws-k8s-tester create cluster command is even run. This means that iterative dev-test is less cumbersome for tracking down failures in the script itself.
@jaypipes
Copy link
Contributor Author

jaypipes commented Jan 2, 2020

For the echo Job stuff, looks like we can configure this to run a smaller set of iterations:

https://github.com/aws/aws-k8s-tester/blob/a10e56f42ec2db3f6ce38baba6a43526ade1fbf4/eks/eks.go#L379-L400

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)
@jayanthvn jayanthvn assigned sushrk and unassigned cgchinmay and abhipth Feb 25, 2022
@jayanthvn
Copy link
Contributor

@sushrk is working on replacing k8stester with eksctl.

@jayanthvn
Copy link
Contributor

jayanthvn commented Mar 8, 2022

#1899 replaced aws-k8s-tester with eksctl. With eksctl there is a reduction from 30-35 mins to 15-18 mins.

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants