diff --git a/scripts/lib/cluster.sh b/scripts/lib/cluster.sh index 0434c4393d..6e8dca9dd9 100644 --- a/scripts/lib/cluster.sh +++ b/scripts/lib/cluster.sh @@ -13,9 +13,8 @@ function down-test-cluster() { function up-test-cluster() { MNGS="" - if [[ "$RUN_SCALE_TESTS" == true ]]; then + if [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then MNGS='{"three-nodes":{"name":"three-nodes","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":["m5.xlarge"],"volume-size":40}, "single-node":{"name":"single-node","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}, "multi-node":{"name":"multi-node","remote-access-user-name":"ec2-user","tags":{"group":"amazon-vpc-cni-k8s"},"release-version":"","ami-type":"AL2_x86_64","asg-min-size":98,"asg-max-size":100,"asg-desired-capacity":98,"instance-types":["m5.xlarge"],"volume-size":40}}' - LARGE_SCALE=true RUN_CONFORMANCE=false 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}}' diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index fe6b4e37eb..1619c53a39 100644 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -25,11 +25,16 @@ 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." } -function run_scale_test_130_pods() { +function run_performance_test_130_pods() { echo "Running scale tests against cluster" DEPLOY_START=$SECONDS @@ -91,7 +96,7 @@ function run_scale_test_130_pods() { echo "TIMELINE: 130 Pod performance test took $DEPLOY_DURATION seconds." } -function run_scale_test_730_pods() { +function run_performance_test_730_pods() { echo "Running scale tests against cluster" DEPLOY_START=$SECONDS @@ -154,7 +159,7 @@ function run_scale_test_730_pods() { echo "TIMELINE: 730 Pod performance test took $DEPLOY_DURATION seconds." } -function run_scale_test_5000_pods() { +function run_performance_test_5000_pods() { echo "Running scale tests against cluster" DEPLOY_START=$SECONDS diff --git a/scripts/run-integration-tests.sh b/scripts/run-integration-tests.sh index 13a6862269..d593cab10b 100755 --- a/scripts/run-integration-tests.sh +++ b/scripts/run-integration-tests.sh @@ -19,6 +19,7 @@ ARCH=$(go env GOARCH) : "${DEPROVISION:=true}" : "${BUILD:=true}" : "${RUN_CONFORMANCE:=false}" +: "${RUN_PERFORMANCE_TESTS:=false}" __cluster_created=0 __cluster_deprovisioned=0 @@ -215,18 +216,20 @@ if [[ $TEST_PASS -eq 0 && "$RUN_CONFORMANCE" == true ]]; then echo "TIMELINE: Conformance tests took $CONFORMANCE_DURATION seconds." fi -if [[ "$RUN_SCALE_TESTS" == true ]]; then +if [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then + START=$SECONDS $KUBECTL_PATH apply -f deploy-130-pods.yaml - run_scale_test_130_pods + run_performance_test_130_pods $KUBECTL_PATH delete -f deploy-130-pods.yaml $KUBECTL_PATH apply -f deploy-730-pods.yaml - run_scale_test_730_pods + run_performance_test_730_pods $KUBECTL_PATH delete -f deploy-730-pods.yaml $KUBECTL_PATH apply -f deploy-5000-pods.yaml - run_scale_test_5000_pods + run_performance_test_5000_pods $KUBECTL_PATH delete -f deploy-5000-pods.yaml + PERFORMANCE_DURATION=$((SECONDS - START)) fi if [[ "$DEPROVISION" == true ]]; then