From fc67e3aced37d3ae0b861f219134fb772227bae6 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Wed, 10 Jan 2024 19:14:37 -0800 Subject: [PATCH 1/2] Update base ec2 test host for graviton 3 to latest, improve naming convention for hosts, and add logging --- tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml | 2 +- tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml | 1 + tests/ci/run_ec2_test_framework.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml index 8b590f97ea..ffefdbd25f 100644 --- a/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml @@ -15,6 +15,6 @@ batch: compute-type: BUILD_GENERAL1_LARGE image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-7x-bm-framework_latest variables: - EC2_AMI: "ami-0c79a55dda52434da" + EC2_AMI: "ami-0a24e6e101933d294" EC2_INSTANCE_TYPE: "c7g.2xlarge" ECR_DOCKER_TAG: "amazonlinux-2023_clang-15x_sanitizer" \ No newline at end of file diff --git a/tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml b/tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml index 7bede07f2a..d42d4598b4 100644 --- a/tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml +++ b/tests/ci/cdk/cdk/ssm/general_test_run_ssm_document.yaml @@ -41,3 +41,4 @@ mainSteps: - $exec_docker ./tests/ci/run_posix_sanitizers.sh - chmod +x ./tests/ci/run_fips_tests.sh - $exec_docker ./tests/ci/run_fips_tests.sh + - echo All ec2 test framework tests passed diff --git a/tests/ci/run_ec2_test_framework.sh b/tests/ci/run_ec2_test_framework.sh index b2cfcfce25..2d3e7153f0 100755 --- a/tests/ci/run_ec2_test_framework.sh +++ b/tests/ci/run_ec2_test_framework.sh @@ -33,7 +33,7 @@ create_ec2_instances() { instance_id="$(aws ec2 run-instances --image-id "$1" --count 1 \ --instance-type "$2" --security-group-ids "${sg_id}" --subnet-id "${subnet_id}" \ --block-device-mappings 'DeviceName="/dev/sda1",Ebs={DeleteOnTermination=True,VolumeSize=200}' \ - --tag-specifications 'ResourceType="instance",Tags=[{Key="aws-lc",Value="aws-lc-ci-ec2-test-framework-ec2-x86-instance"}]' \ + --tag-specifications 'ResourceType="instance",Tags=[{Key="Name",Value="ec2-test-'"$CODEBUILD_WEBHOOK_TRIGGER"'"}]' \ --iam-instance-profile Name=aws-lc-ci-ec2-test-framework-ec2-profile \ --placement 'AvailabilityZone=us-west-2a' \ --instance-initiated-shutdown-behavior terminate \ From 57353b3607518f7e294316034db624e666377cd4 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Wed, 10 Jan 2024 20:55:12 -0800 Subject: [PATCH 2/2] Use smaller instance to run SSM commands --- tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml index ffefdbd25f..23cafdaad5 100644 --- a/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/ec2_test_framework_omnibus.yaml @@ -12,7 +12,7 @@ batch: env: type: LINUX_CONTAINER privileged-mode: true - compute-type: BUILD_GENERAL1_LARGE + compute-type: BUILD_GENERAL1_SMALL image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-20.04_clang-7x-bm-framework_latest variables: EC2_AMI: "ami-0a24e6e101933d294"