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

Introduce automated performance testing. #1068

Merged
merged 45 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a8323cc
Squashed commit of the following:
bnapolitan Jul 7, 2020
c8b1f9b
Create S3 bucket filename var, remove sleeps before polling, and refa…
bnapolitan Jul 8, 2020
0cf8c5a
Syntax fix.
bnapolitan Jul 8, 2020
cf2b5d8
Add version info to file, display start of performance tests.
bnapolitan Jul 9, 2020
07b54f2
Scale up node group before running 5000 pod test.
bnapolitan Jul 9, 2020
55220bd
Create unique mng names.
bnapolitan Jul 9, 2020
ef4df24
Undo generated mng names.
bnapolitan Jul 10, 2020
5a40307
Update data files for performance tests.
bnapolitan Jul 10, 2020
542382b
Fix auto scaling group name.
bnapolitan Jul 10, 2020
40173e0
Debug 5000 pod performance test.
bnapolitan Jul 10, 2020
615517a
Debug to find out why autoscale group info isn't being retrieved.
bnapolitan Jul 10, 2020
dcf5d4a
Adjust name line number.
bnapolitan Jul 11, 2020
c7c3701
Remove long debugging sleep.
bnapolitan Jul 11, 2020
3060990
Add failure checking for performance tests.
bnapolitan Jul 12, 2020
42b79e9
Updated failure checking fixes.
bnapolitan Jul 13, 2020
485d598
Upload files to corresponding folders in s3 bucket.
bnapolitan Jul 13, 2020
2d8d01b
Check for slow performance test WIP.
bnapolitan Jul 13, 2020
efd0151
Check for slow performance update.
bnapolitan Jul 13, 2020
3d3f14e
Change order of performance tests.
bnapolitan Jul 14, 2020
a5b2086
Attempt performance test fail threshold.
bnapolitan Jul 14, 2020
ee6a9ac
Weekly performance test (midnight Wednesday)
bnapolitan Jul 14, 2020
9d0aa34
Fix syntax error and try again.
bnapolitan Jul 15, 2020
0325ae5
Fix syntax for slow checking.
bnapolitan Jul 15, 2020
b76d9b0
Proper line splicing.
bnapolitan Jul 15, 2020
591deea
Attempt MNG sharing.
bnapolitan Jul 16, 2020
ebef0ae
Merge branch 'upstream-master' into scale-test-single-node
bnapolitan Jul 16, 2020
5e01f11
Fix merging issue.
bnapolitan Jul 16, 2020
711896a
Setup weekly test.
bnapolitan Jul 16, 2020
1a5bbfc
Setup weekly cron.
bnapolitan Jul 17, 2020
e4d603f
Fix performance test slow checking, add kops to weekly tests.
bnapolitan Jul 17, 2020
7e2ad40
Fix slow checking.
bnapolitan Jul 17, 2020
d43d4a6
Find autoscaling group name.
bnapolitan Jul 17, 2020
c5c9564
Try to find autoscaling group name.
bnapolitan Jul 17, 2020
449f88c
Fix weekly test syntax.
bnapolitan Jul 17, 2020
082901b
Scale up to 99 nodes.
bnapolitan Jul 17, 2020
4811d74
Fix yaml syntax.
bnapolitan Jul 17, 2020
f674a55
Update readme with new tests.
bnapolitan Jul 17, 2020
487ce50
Look back 70 lines.
bnapolitan Jul 17, 2020
439ea17
Alternate way to get autoscaling group name.
bnapolitan Jul 17, 2020
a2f8c27
Change weekly test time.
bnapolitan Jul 18, 2020
0e7ef6e
Change line finder for autoscaling group name.
bnapolitan Jul 18, 2020
56b0118
Only report failures on slow up process.
bnapolitan Jul 19, 2020
b46b3ea
Merge branch 'upstream-master' into scale-test-single-node
bnapolitan Jul 22, 2020
18b10c5
Fix 3 most recent files, and reset performance average.
bnapolitan Jul 22, 2020
9f2e891
Format fix.
bnapolitan Jul 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,70 @@ jobs:
- store_artifacts:
path: /tmp/cni-test

performance_test:
docker:
- image: circleci/golang:1.13-stretch
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
environment:
<<: *env
RUN_CONFORMANCE: "false"
RUN_PERFORMANCE_TESTS: "true"
steps:
- checkout
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- restore_cache:
keys:
- dependency-packages-store-{{ checksum "test/integration/go.mod" }}
- dependency-packages-store-
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
no_output_timeout: 15m
- save_cache:
key: dependency-packages-store-{{ checksum "test/integration/go.mod" }}
paths:
- /go/pkg
when: always
- store_artifacts:
path: /tmp/cni-test

kops_test:
docker:
- image: circleci/golang:1.13-stretch
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
environment:
<<: *env
RUN_CONFORMANCE: "false"
RUN_KOPS_TEST: "true"
steps:
- checkout
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- restore_cache:
keys:
- dependency-packages-store-{{ checksum "test/integration/go.mod" }}
- dependency-packages-store-
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
no_output_timeout: 15m
- save_cache:
key: dependency-packages-store-{{ checksum "test/integration/go.mod" }}
paths:
- /go/pkg
when: always
- store_artifacts:
path: /tmp/cni-test

workflows:
version: 2
check:
Expand Down Expand Up @@ -118,3 +182,18 @@ workflows:
- master
jobs:
- integration_test

# triggers weekly tests on master (Friday at 11 PM PST)
weekly-test-run:
triggers:
- schedule:
cron: "0 6 * * 6"
filters:
branches:
only:
- master
jobs:
- performance_test
- kops_test:
requires:
- performance_test
6 changes: 3 additions & 3 deletions cmd/routed-eni-cni-plugin/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap

ips := []*current.IPConfig{
{
Version: "4",
Address: *addr,
Version: "4",
Address: *addr,
},
}

result := &current.Result{
IPs: ips,
IPs: ips,
}

return cniTypes.PrintResult(result, conf.CNIVersion)
Expand Down
11 changes: 10 additions & 1 deletion scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ function down-test-cluster() {
}

function up-test-cluster() {
MNGS=""
if [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
MNGS='{"cni-test-single-node-mng":{"name":"cni-test-single-node-mng","remote-access-user-name":"ec2-user","tags":{"group":"amazon-vpc-cni-k8s"},"release-version":"","ami-type":"AL2_x86_64","asg-min-size":1,"asg-max-size":1,"asg-desired-capacity":1,"instance-types":["m5.16xlarge"],"volume-size":40}, "cni-test-multi-node-mng":{"name":"cni-test-multi-node-mng","remote-access-user-name":"ec2-user","tags":{"group":"amazon-vpc-cni-k8s"},"release-version":"","ami-type":"AL2_x86_64","asg-min-size":1,"asg-max-size":100,"asg-desired-capacity":3,"instance-types":["m5.xlarge"],"volume-size":40}}'
RUN_CONFORMANCE=false
: "${PERFORMANCE_TEST_S3_BUCKET_NAME:=""}"
else
MNGS='{"GetRef.Name-mng-for-cni":{"name":"GetRef.Name-mng-for-cni","remote-access-user-name":"ec2-user","tags":{"group":"amazon-vpc-cni-k8s"},"release-version":"","ami-type":"AL2_x86_64","asg-min-size":3,"asg-max-size":3,"asg-desired-capacity":3,"instance-types":["c5.xlarge"],"volume-size":40}}'
fi

echo -n "Configuring cluster $CLUSTER_NAME"
AWS_K8S_TESTER_EKS_NAME=$CLUSTER_NAME \
AWS_K8S_TESTER_EKS_LOG_COLOR=true \
Expand All @@ -26,7 +35,7 @@ function up-test-cluster() {
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ENABLE=true \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ROLE_CREATE=$ROLE_CREATE \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ROLE_ARN=$ROLE_ARN \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_MNGS='{"GetRef.Name-mng-for-cni":{"name":"GetRef.Name-mng-for-cni","remote-access-user-name":"ec2-user","tags":{"group":"amazon-vpc-cni-k8s"},"release-version":"","ami-type":"AL2_x86_64","asg-min-size":3,"asg-max-size":3,"asg-desired-capacity":3,"instance-types":["c5.xlarge"],"volume-size":40}}' \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_MNGS=$MNGS \
AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_FETCH_LOGS=true \
AWS_K8S_TESTER_EKS_ADD_ON_NLB_HELLO_WORLD_ENABLE=true \
AWS_K8S_TESTER_EKS_ADD_ON_ALB_2048_ENABLE=true \
Expand Down
8 changes: 7 additions & 1 deletion scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ function display_timelines() {
echo "TIMELINE: Default CNI integration tests took $DEFAULT_INTEGRATION_DURATION seconds."
echo "TIMELINE: Updating CNI image took $CNI_IMAGE_UPDATE_DURATION seconds."
echo "TIMELINE: Current image integration tests took $CURRENT_IMAGE_INTEGRATION_DURATION seconds."
echo "TIMELINE: Conformance tests took $CONFORMANCE_DURATION seconds."
if [[ "$RUN_CONFORMANCE" == true ]]; then
echo "TIMELINE: Conformance tests took $CONFORMANCE_DURATION seconds."
fi
if [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
echo "TIMELINE: Performance tests took $PERFORMANCE_DURATION seconds."
fi
echo "TIMELINE: Down processes took $DOWN_DURATION seconds."
}

Loading