Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a47ec07
Test
Nov 26, 2024
91b323d
Test
Nov 26, 2024
e789db4
Merge branch 'main' of https://github.com/Jeel-mehta/aws-application-…
Nov 26, 2024
070b669
Build sample image for version 8.0
Nov 26, 2024
62d6612
Pushing the image-name 8.0
Nov 26, 2024
b3da4a2
Build image version 6.0
Nov 27, 2024
9d3eaf8
Trying to handle different versions dynamically
Nov 27, 2024
5b87a0a
Test for dynamic language version
Nov 27, 2024
0a928c0
Uploading images to main and remote services
Dec 2, 2024
92394d9
Updating image tag
Dec 2, 2024
fbae4e9
Deploy traffic generator
Dec 2, 2024
e64ac94
Testing version 6.0
Dec 2, 2024
874e8b8
Cancelling scheduled runs
Dec 3, 2024
0e83010
stopping scheduled runs
Dec 3, 2024
2275ac0
Testing version 6.0 e2e test
Dec 3, 2024
caff24b
Testing version 8.0
Dec 4, 2024
06ab1a7
Testing s3 deployment
Dec 7, 2024
c7a39e0
Test
Dec 7, 2024
2cd6d54
Testing
Dec 10, 2024
a2a6951
Testing ec2 setup
Dec 11, 2024
9664a3b
Testing EC2
Dec 11, 2024
8dbe7d9
Test EC2
Dec 12, 2024
0e6cdc6
Testing default EC2
Dec 12, 2024
2708044
Testing default EC2 setup
Dec 12, 2024
58fd919
Testing eks
Dec 12, 2024
66736da
Testing EKS with Dotnet version 8.0
Dec 12, 2024
8edcb64
Testing EC2 setup for version 6.0
Dec 12, 2024
6466baf
Testing EC2 setup for version 6.0
Dec 12, 2024
3f5ee01
Merge branch 'main' of https://github.com/Jeel-mehta/aws-application-…
Dec 12, 2024
5ab8387
Testing default Ec2 setup for version 6.0
Dec 12, 2024
d7345ba
Running default EC2 e2e test
Dec 13, 2024
3548c40
Testing default EC2 test for version 6.0
Dec 13, 2024
851707d
Final test on ec2 cluster with version 6.0
Dec 17, 2024
50aaddd
Final test on ec2 with version 8.0
Dec 17, 2024
68faabe
Dynamically handling both versions for ec2 instance
Dec 18, 2024
72cff5b
Testing dynamic handling of language versions for sample app
Dec 18, 2024
296a520
Deploying sample apps for both version
Dec 19, 2024
244c718
Running e2e test on ec2 instance
Dec 19, 2024
70b2d31
Trying e2e ec2 test
Dec 19, 2024
1254c46
Testing 1
Dec 19, 2024
004cd5f
Testing ec2 default test
Dec 19, 2024
9ea6f74
Merge branch 'main' into main
Jeel-mehta Dec 19, 2024
ae525a6
Stopping java eks oltp ocb canary
Dec 20, 2024
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
31 changes: 15 additions & 16 deletions .github/workflows/dotnet-ec2-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
## including logs, metrics, and traces.
name: Dotnet EC2 Enablement Canary Testing
on:
push:
workflow_dispatch: # be able to run the workflow on demand
schedule:
- cron: '2,27 * * * *' # run the workflow at 2nd and 27th minute of every hour
# schedule:
# - cron: '2,27 * * * *' # run the workflow at 2nd and 27th minute of every hour

permissions:
id-token: write
Expand All @@ -20,23 +21,21 @@ jobs:
strategy:
fail-fast: false
matrix:
aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
'us-east-1','us-east-2', 'us-west-1', 'us-west-2']
aws-region: ['us-east-1']
uses: ./.github/workflows/dotnet-ec2-default-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
caller-workflow-name: 'appsignals-dotnet-e2e-ec2-canary-test'
dotnet-version: '8.0'

nuget:
strategy:
fail-fast: false
matrix:
aws-region: [ 'us-east-1']
uses: ./.github/workflows/dotnet-ec2-nuget-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
caller-workflow-name: 'appsignals-dotnet-e2e-ec2-nuget-canary-test'
# nuget:
# strategy:
# fail-fast: false
# matrix:
# aws-region: [ 'us-east-1']
# uses: ./.github/workflows/dotnet-ec2-nuget-retry.yml
# secrets: inherit
# with:
# aws-region: ${{ matrix.aws-region }}
# caller-workflow-name: 'appsignals-dotnet-e2e-ec2-nuget-canary-test'
6 changes: 5 additions & 1 deletion .github/workflows/dotnet-ec2-default-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ on:
caller-workflow-name:
required: true
type: string

dotnet-version:
required: true
type: string
permissions:
id-token: write
contents: read
Expand All @@ -26,6 +28,7 @@ jobs:
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
dotnet-version: ${{ inputs.dotnet-version }}

dotnet-ec2-default-attempt-2:
needs: [ dotnet-ec2-default-attempt-1 ]
Expand All @@ -35,6 +38,7 @@ jobs:
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
dotnet-version: ${{ inputs.dotnet-version }}

publish-metric-attempt-1:
needs: [ dotnet-ec2-default-attempt-1, dotnet-ec2-default-attempt-2 ]
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/dotnet-ec2-default-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
caller-workflow-name:
required: true
type: string
dotnet-version:
description: "Currently support version 6.0, 8.0"
required: false
type: string
default: '8.0'
outputs:
job-started:
value: ${{ jobs.dotnet-ec2-default.outputs.job-started }}
Expand All @@ -32,7 +37,8 @@ env:
E2E_TEST_AWS_REGION: ${{ inputs.aws-region }}
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/dotnet-sample-app.zip
DOTNET_VERSION: ${{ inputs.dotnet-version }}
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-jeel/dotnet-sample-app:${{ inputs.dotnet-version }}.zip
METRIC_NAMESPACE: ApplicationSignals
LOG_GROUP_NAME: /aws/application-signals/data
ADOT_DISTRO_NAME: ${{ inputs.staging_distro_name }}
Expand All @@ -52,7 +58,7 @@ jobs:

- uses: actions/checkout@v4
with:
repository: 'aws-observability/aws-application-signals-test-framework'
repository: 'Jeel-mehta/aws-application-signals-test-framework'
ref: ${{ inputs.caller-workflow-name == 'main-build' && 'main' || github.ref }}
fetch-depth: 0

Expand Down Expand Up @@ -141,6 +147,7 @@ jobs:
-var="sample_app_zip=${{ env.SAMPLE_APP_ZIP }}" \
-var="get_cw_agent_rpm_command=${{ env.GET_CW_AGENT_RPM_COMMAND }}" \
-var="get_adot_distro_command=${{ env.GET_ADOT_DISTRO_COMMAND }}" \
-var="language_version=${{ env.DOTNET_VERSION }}" \
|| deployment_failed=$?

if [ $deployment_failed -eq 1 ]; then
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/dotnet-eks-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
## including logs, metrics, and traces.
name: Dotnet EKS Enablement Canary Testing
on:
schedule:
- cron: '4,29 * * * *' # run the workflow at 4th and 29th minute of every hour
#schedule:
#- cron: '4,29 * * * *' # run the workflow at 4th and 29th minute of every hour
workflow_dispatch: # be able to run the workflow on demand

#push:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
Expand All @@ -25,10 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
'us-east-1','us-east-2', 'us-west-1', 'us-west-2']
aws-region: ['us-east-1']
uses: ./.github/workflows/dotnet-eks-retry.yml
secrets: inherit
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-eks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- uses: actions/checkout@v4
with:
repository: 'aws-observability/aws-application-signals-test-framework'
repository: 'Jeel-mehta/aws-application-signals-test-framework'
ref: ${{ inputs.caller-workflow-name == 'main-build' && 'main' || github.ref }}
fetch-depth: 0

Expand Down Expand Up @@ -180,8 +180,8 @@ jobs:

- name: Set Sample App Image
run: |
echo MAIN_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.DOTNET_MAIN_SAMPLE_APP_IMAGE }}" >> $GITHUB_ENV
echo REMOTE_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.DOTNET_REMOTE_SAMPLE_APP_IMAGE }}" >> $GITHUB_ENV
echo MAIN_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.DOTNET_MAIN_SAMPLE_APP_IMAGE }}:8.0" >> $GITHUB_ENV
echo REMOTE_SAMPLE_APP_IMAGE_ARN="${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.DOTNET_REMOTE_SAMPLE_APP_IMAGE }}:8.0" >> $GITHUB_ENV

- name: Deploy sample app via terraform and wait for the endpoint to come online
id: deploy-dotnet-app
Expand Down
92 changes: 72 additions & 20 deletions .github/workflows/dotnet-sample-app-ecr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Sample App Deployment - Dotnet ECR
on:
workflow_dispatch: # be able to run the workflow on demand

#push:
permissions:
id-token: write
contents: read
Expand All @@ -14,11 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
aws-region: [ 'af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
'us-east-1','us-east-2','us-west-1','us-west-2' ]
aws-region: [ 'us-east-1' ]
dotnet-version: [ '6.0', '8.0' ]
runs-on: ubuntu-latest
env:
DEFAULT_VERSION: '8.0'
DOTNET_VERSION: ${{ matrix.dotnet-version }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -30,17 +31,69 @@ jobs:
role-to-assume: ${{ secrets.E2E_IAD_TEST_ACCOUNT_ARN }}
aws-region: us-east-1

- name: Retrieve account
uses: aws-actions/aws-secretsmanager-get-secrets@v1
with:
secret-ids:
ACCOUNT_ID, region-account/${{ matrix.aws-region }}
# - name: Retrieve account
# uses: aws-actions/aws-secretsmanager-get-secrets@v1
# with:
# secret-ids:
# ACCOUNT_ID, region-account/${{ matrix.aws-region }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }}
aws-region: ${{ matrix.aws-region }}
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }}
# aws-region: ${{ matrix.aws-region }}
- name: Update .NET version if not default
working-directory: sample-apps/dotnet
run: |
if [ "${DOTNET_VERSION}" != "${DEFAULT_VERSION}" ]; then
echo "Updating .NET version from ${DEFAULT_VERSION} to ${DOTNET_VERSION}"

# Function to update version in files
update_version() {
local file=$1
if [ ! -f "$file" ]; then
echo "Error: File $file not found"
exit 1
fi

# Update TargetFramework in csproj files
if [[ $file == *.csproj ]]; then
sed -i "s/<TargetFramework>netcoreapp${DEFAULT_VERSION}<\/TargetFramework>/<TargetFramework>netcoreapp${DOTNET_VERSION}<\/TargetFramework>/g" "$file"
# Update version in Dockerfiles
elif [[ $file == */Dockerfile ]]; then
# Update SDK version
sed -i "s/mcr.microsoft.com\/dotnet\/sdk:${DEFAULT_VERSION}/mcr.microsoft.com\/dotnet\/sdk:${DOTNET_VERSION}/g" "$file"

# Update ASP.NET runtime version
sed -i "s/mcr.microsoft.com\/dotnet\/aspnet:${DEFAULT_VERSION}/mcr.microsoft.com\/dotnet\/aspnet:${DOTNET_VERSION}/g" "$file"
fi

if [ $? -ne 0 ]; then
echo "Error: Failed to update version in $file"
exit 1
fi
echo "Successfully updated $file"
}

# Update all relevant files
update_version "asp_frontend_service/Dockerfile"
update_version "asp_remote_service/Dockerfile"
update_version "asp_frontend_service/asp_frontend_service.csproj"
update_version "asp_remote_service/asp_remote_service.csproj"

# Verify changes
echo "Verifying changes..."
echo "=== Frontend Dockerfile ==="
grep -n "FROM.*${DOTNET_VERSION}" asp_frontend_service/Dockerfile
echo "=== Remote Dockerfile ==="
grep -n "FROM.*${DOTNET_VERSION}" asp_remote_service/Dockerfile
echo "=== Frontend csproj ==="
grep -n "TargetFramework" asp_frontend_service/asp_frontend_service.csproj
echo "=== Remote csproj ==="
grep -n "TargetFramework" asp_remote_service/asp_remote_service.csproj
else
echo "Using default version ${DEFAULT_VERSION}, no changes needed"
fi

- name: Login to Amazon ECR
id: login-ecr
Expand All @@ -53,10 +106,9 @@ jobs:

- name: Upload Main Service Image
run: |
docker tag dotnetsampleapp/frontend-service ${{ env.ACCOUNT_ID }}.dkr.ecr.${{ matrix.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_DOTNET_E2E_FE_SA_IMG }}
docker push ${{ env.ACCOUNT_ID }}.dkr.ecr.${{ matrix.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_DOTNET_E2E_FE_SA_IMG }}

docker tag dotnetsampleapp/frontend-service 890742580622.dkr.ecr.us-east-1.amazonaws.com/appsignals-dotnet-main-service:${DOTNET_VERSION}
docker push 890742580622.dkr.ecr.us-east-1.amazonaws.com/appsignals-dotnet-main-service:${DOTNET_VERSION}
- name: Upload Remote Service Image
run: |
docker tag dotnetsampleapp/remote-service ${{ env.ACCOUNT_ID }}.dkr.ecr.${{ matrix.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_DOTNET_E2E_RE_SA_IMG }}
docker push ${{ env.ACCOUNT_ID }}.dkr.ecr.${{ matrix.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_DOTNET_E2E_RE_SA_IMG }}
docker tag dotnetsampleapp/remote-service 890742580622.dkr.ecr.us-east-1.amazonaws.com/appsignals-dotnet-remote-service:${DOTNET_VERSION}
docker push 890742580622.dkr.ecr.us-east-1.amazonaws.com/appsignals-dotnet-remote-service:${DOTNET_VERSION}
Loading
Loading