Skip to content

Commit 8dcaa7e

Browse files
authored
Remove docker runner container image (#149)
*Issue description:* To resolve issues where downloading dependencies caused failures in E2E workflows due to transient issues, we began running E2E workflows in a docker image container with those dependencies already installed in this [PR](#33). As we started scaling our canary to encompass more platforms and regions however, the public ECR storing the image started throttling. Despite efforts to mitigate this throttle by increasing the API limit and also distributing the image to multiple public ECRs, the throttling still occurs and we are currently unable to determine the precise reason why. After discussion, we have decided to revert from using image containers and explore other solutions to mitigate these transient issues such as caching. *Description of changes:* Stop using image containers in the github runners and add back the retry logic to install Terraform and other dependencies. Test run: https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10171443800 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent b0e389d commit 8dcaa7e

9 files changed

+120
-21
lines changed

.github/workflows/java-ec2-asg-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ env:
3333
jobs:
3434
java-ec2-asg:
3535
runs-on: ubuntu-latest
36-
container:
37-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
3836
steps:
3937
- name: Generate testing id
4038
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
@@ -95,6 +93,14 @@ jobs:
9593
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.E2E_TEST_AWS_REGION }}.s3.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
9694
fi
9795
96+
- name: Set up terraform
97+
uses: ./.github/workflows/actions/execute_and_retry
98+
with:
99+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
100+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
101+
&& sudo apt update && sudo apt install terraform'
102+
sleep_time: 60
103+
98104
- name: Initiate Terraform
99105
uses: ./.github/workflows/actions/execute_and_retry
100106
with:

.github/workflows/java-ec2-default-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ env:
3333
jobs:
3434
java-ec2-default:
3535
runs-on: ubuntu-latest
36-
container:
37-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
3836
steps:
3937
- name: Generate testing id
4038
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
@@ -95,6 +93,14 @@ jobs:
9593
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ inputs.aws-region }}.s3.${{ inputs.aws-region }}.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
9694
fi
9795
96+
- name: Set up terraform
97+
uses: ./.github/workflows/actions/execute_and_retry
98+
with:
99+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
100+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
101+
&& sudo apt update && sudo apt install terraform'
102+
sleep_time: 60
103+
98104
- name: Initiate Terraform
99105
uses: ./.github/workflows/actions/execute_and_retry
100106
with:

.github/workflows/java-eks-e2e-test.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ env:
4747
jobs:
4848
java-eks:
4949
runs-on: ubuntu-latest
50-
container:
51-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
5250
steps:
5351
- name: Generate testing id and sample app namespace
5452
run: |
@@ -111,9 +109,24 @@ jobs:
111109
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
112110
aws-region: ${{ env.E2E_TEST_AWS_REGION }}
113111

112+
# local directory to store the kubernetes config
113+
- name: Create kubeconfig directory
114+
run: mkdir -p ${{ github.workspace }}/.kube
115+
116+
- name: Set KUBECONFIG environment variable
117+
run: echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV
118+
114119
- name: Set up kubeconfig
115120
run: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
116121

122+
- name: Download and install eksctl
123+
uses: ./.github/workflows/actions/execute_and_retry
124+
with:
125+
pre-command: 'mkdir ${{ github.workspace }}/eksctl'
126+
command: 'curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
127+
&& tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz'
128+
cleanup: 'rm -f eksctl_Linux_amd64.tar.gz'
129+
117130
- name: Add eksctl to Github Path
118131
run: |
119132
echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH
@@ -137,6 +150,14 @@ jobs:
137150
--region ${{ env.E2E_TEST_AWS_REGION }}"
138151
sleep_time: 60
139152

153+
- name: Set up terraform
154+
uses: ./.github/workflows/actions/execute_and_retry
155+
with:
156+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
157+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
158+
&& sudo apt update && sudo apt install terraform'
159+
sleep_time: 60
160+
140161
- name: Get RDS database cluster metadata
141162
continue-on-error: true
142163
run: |

.github/workflows/java-k8s-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ env:
4444
jobs:
4545
java-k8s:
4646
runs-on: ubuntu-latest
47-
container:
48-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
4947
steps:
5048
- name: Generate testing id
5149
run: echo TESTING_ID="${{ env.E2E_TEST_AWS_REGION }}-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
@@ -95,6 +93,14 @@ jobs:
9593
aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key frontend-service-depl-${{ github.event.repository.name }}.yaml --body frontend-service-depl.yaml
9694
aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key remote-service-depl-${{ github.event.repository.name }}.yaml --body remote-service-depl.yaml
9795
96+
- name: Set up terraform
97+
uses: ./.github/workflows/actions/execute_and_retry
98+
with:
99+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
100+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
101+
&& sudo apt update && sudo apt install terraform'
102+
sleep_time: 60
103+
98104
- name: Initiate Terraform
99105
uses: ./.github/workflows/actions/execute_and_retry
100106
with:

.github/workflows/java-metric-limiter-e2e-test.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ env:
4949
jobs:
5050
java-metric-limiter:
5151
runs-on: ubuntu-latest
52-
container:
53-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
5452
steps:
5553
- name: Generate testing id and sample app namespace
5654
run: |
@@ -113,9 +111,24 @@ jobs:
113111
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
114112
aws-region: ${{ env.E2E_TEST_AWS_REGION }}
115113

114+
# local directory to store the kubernetes config
115+
- name: Create kubeconfig directory
116+
run: mkdir -p ${{ github.workspace }}/.kube
117+
118+
- name: Set KUBECONFIG environment variable
119+
run: echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV
120+
116121
- name: Set up kubeconfig
117122
run: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
118123

124+
- name: Download and install eksctl
125+
uses: ./.github/workflows/actions/execute_and_retry
126+
with:
127+
pre-command: 'mkdir ${{ github.workspace }}/eksctl'
128+
command: 'curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
129+
&& tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz'
130+
cleanup: 'rm -f eksctl_Linux_amd64.tar.gz'
131+
119132
- name: Add eksctl to Github Path
120133
run: |
121134
echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH
@@ -139,6 +152,14 @@ jobs:
139152
--region ${{ env.E2E_TEST_AWS_REGION }}"
140153
sleep_time: 60
141154

155+
- name: Set up terraform
156+
uses: ./.github/workflows/actions/execute_and_retry
157+
with:
158+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
159+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
160+
&& sudo apt update && sudo apt install terraform'
161+
sleep_time: 60
162+
142163
- name: Initiate Terraform
143164
uses: ./.github/workflows/actions/execute_and_retry
144165
with:

.github/workflows/python-ec2-asg-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ env:
3737
jobs:
3838
python-ec2-asg:
3939
runs-on: ubuntu-latest
40-
container:
41-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
4240
steps:
4341
- name: Generate testing id
4442
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
@@ -99,6 +97,14 @@ jobs:
9997
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.E2E_TEST_AWS_REGION }}.s3.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
10098
fi
10199
100+
- name: Set up terraform
101+
uses: ./.github/workflows/actions/execute_and_retry
102+
with:
103+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
104+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
105+
&& sudo apt update && sudo apt install terraform'
106+
sleep_time: 60
107+
102108
- name: Initiate Terraform
103109
uses: ./.github/workflows/actions/execute_and_retry
104110
with:

.github/workflows/python-ec2-default-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ env:
3737
jobs:
3838
python-ec2-default:
3939
runs-on: ubuntu-latest
40-
container:
41-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
4240
steps:
4341
- uses: actions/checkout@v4
4442
with:
@@ -98,6 +96,14 @@ jobs:
9896
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.E2E_TEST_AWS_REGION }}.s3.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
9997
fi
10098
99+
- name: Set up terraform
100+
uses: ./.github/workflows/actions/execute_and_retry
101+
with:
102+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
103+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
104+
&& sudo apt update && sudo apt install terraform'
105+
sleep_time: 60
106+
101107
- name: Initiate Terraform
102108
uses: ./.github/workflows/actions/execute_and_retry
103109
with:

.github/workflows/python-eks-e2e-test.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ env:
4747
jobs:
4848
python-eks:
4949
runs-on: ubuntu-latest
50-
container:
51-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
5250
steps:
5351
- name: Generate testing id and python sample app namespace
5452
run: |
@@ -112,8 +110,23 @@ jobs:
112110
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
113111
aws-region: ${{ env.E2E_TEST_AWS_REGION }}
114112

113+
# local directory to store the kubernetes config
114+
- name: Create kubeconfig directory
115+
run: mkdir -p ${{ github.workspace }}/.kube
116+
117+
- name: Set KUBECONFIG environment variable
118+
run: echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV
119+
115120
- name: Set up kubeconfig
116-
run: aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ env.E2E_TEST_AWS_REGION }}
121+
run: aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}
122+
123+
- name: Download and install eksctl
124+
uses: ./.github/workflows/actions/execute_and_retry
125+
with:
126+
pre-command: 'mkdir ${{ github.workspace }}/eksctl'
127+
command: 'curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
128+
&& tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz'
129+
cleanup: 'rm -f eksctl_Linux_amd64.tar.gz'
117130

118131
- name: Add eksctl to Github Path
119132
run: |
@@ -126,18 +139,26 @@ jobs:
126139
command: "eksctl create iamserviceaccount \
127140
--name service-account-${{ env.TESTING_ID }} \
128141
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
129-
--cluster ${{ inputs.test-cluster-name }} \
142+
--cluster ${{ env.CLUSTER_NAME }} \
130143
--role-name eks-s3-access-${{ env.TESTING_ID }} \
131144
--attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess \
132145
--region ${{ env.E2E_TEST_AWS_REGION }} \
133146
--approve"
134147
cleanup: "eksctl delete iamserviceaccount \
135148
--name service-account-${{ env.TESTING_ID }} \
136149
--namespace ${{ env.SAMPLE_APP_NAMESPACE }} \
137-
--cluster ${{ inputs.test-cluster-name }} \
150+
--cluster ${{ env.CLUSTER_NAME }} \
138151
--region ${{ env.E2E_TEST_AWS_REGION }}"
139152
sleep_time: 60
140153

154+
- name: Set up terraform
155+
uses: ./.github/workflows/actions/execute_and_retry
156+
with:
157+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
158+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
159+
&& sudo apt update && sudo apt install terraform'
160+
sleep_time: 60
161+
141162
- name: Get RDS database cluster metadata
142163
continue-on-error: true
143164
run: |

.github/workflows/python-k8s-e2e-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ env:
4444
jobs:
4545
python-k8s:
4646
runs-on: ubuntu-latest
47-
container:
48-
image: public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
4947
steps:
5048
- name: Generate testing id
5149
run: echo TESTING_ID="${{ env.E2E_TEST_AWS_REGION }}-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
@@ -95,6 +93,14 @@ jobs:
9593
aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key python-frontend-service-depl-${{ github.event.repository.name }}.yaml --body python-frontend-service-depl.yaml
9694
aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key python-remote-service-depl-${{ github.event.repository.name }}.yaml --body python-remote-service-depl.yaml
9795
96+
- name: Set up terraform
97+
uses: ./.github/workflows/actions/execute_and_retry
98+
with:
99+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
100+
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
101+
&& sudo apt update && sudo apt install terraform'
102+
sleep_time: 60
103+
98104
- name: Initiate Terraform
99105
uses: ./.github/workflows/actions/execute_and_retry
100106
with:

0 commit comments

Comments
 (0)