Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/java-eks-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
aws-region: ${{ matrix.aws-region }}
test-cluster-name: 'e2e-canary-test'
caller-workflow-name: 'appsignals-e2e-eks-canary-test'
language-version: 'v11'
6 changes: 6 additions & 0 deletions .github/workflows/java-eks-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
caller-workflow-name:
required: true
type: string
language-version:
required: false
type: string
default: 'v11'

concurrency:
group: 'java-eks-${{ inputs.aws-region }}-${{ github.ref_name }}'
Expand All @@ -34,6 +38,7 @@ jobs:
aws-region: ${{ inputs.aws-region }}
test-cluster-name: ${{ inputs.test-cluster-name }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
language-version: ${{ inputs.language-version }}

java-eks-attempt-2:
needs: [ java-eks-attempt-1 ]
Expand All @@ -44,6 +49,7 @@ jobs:
aws-region: ${{ inputs.aws-region }}
test-cluster-name: ${{ inputs.test-cluster-name }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
language-version: ${{ inputs.language-version }}

publish-metric-attempt-1:
needs: [ java-eks-attempt-1, java-eks-attempt-2 ]
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/java-eks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
caller-workflow-name:
required: true
type: string
language-version:
required: true
type: string
adot-image-name:
required: false
type: string
Expand All @@ -37,6 +40,7 @@ env:
E2E_TEST_AWS_REGION: ${{ inputs.aws-region }}
CLUSTER_NAME: ${{ inputs.test-cluster-name }}
CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }}
LANGUAGE_VERSION: ${{ inputs.language-version }}
ADOT_IMAGE_NAME: ${{ inputs.adot-image-name }}
CW_AGENT_OPERATOR_TAG: ${{ inputs.cw-agent-operator-tag }}
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
Expand Down Expand Up @@ -64,8 +68,8 @@ jobs:

- uses: actions/checkout@v4
with:
repository: 'aws-observability/aws-application-signals-test-framework'
ref: ${{ env.CALLER_WORKFLOW_NAME == 'main-build' && 'main' || github.ref }}
repository: 'harrryr/aws-application-signals-test-framework'
ref: java-sample-app-version
fetch-depth: 0

# We initialize Gradlew Daemon early on during the workflow because sometimes initialization
Expand Down Expand Up @@ -217,8 +221,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.JAVA_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.JAVA_REMOTE_SAMPLE_APP_IMAGE }}" >> $GITHUB_ENV
echo MAIN_SAMPLE_APP_IMAGE_ARN="612966150583.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_MAIN_SAMPLE_APP_IMAGE }}:${{ env.LANGUAGE_VERSION }}" >> $GITHUB_ENV
echo REMOTE_SAMPLE_APP_IMAGE_ARN="612966150583.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_REMOTE_SAMPLE_APP_IMAGE }}:${{ env.LANGUAGE_VERSION }}" >> $GITHUB_ENV

- name: Deploy sample app via terraform and wait for the endpoint to come online
id: deploy-sample-app
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/python-ec2-asg-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
caller-workflow-name:
required: true
type: string
cpu-architecture:
description: "Permitted values: x86_64 or arm64"
required: false
type: string
default: "x86_64"
staging-wheel-name:
required: false
default: 'aws-opentelemetry-distro'
Expand All @@ -31,6 +36,7 @@ permissions:
env:
E2E_TEST_AWS_REGION: ${{ inputs.aws-region }}
CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }}
CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }}
ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }}
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app.zip
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
Expand All @@ -52,7 +58,7 @@ jobs:
run: echo "job-started=true" >> $GITHUB_OUTPUT

- name: Generate testing id
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
run: echo TESTING_ID="${{ github.run_id }}-${{ github.run_number }}-${RANDOM}" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -107,7 +113,11 @@ jobs:
# Reusing the adot-main-build-staging-jar bucket to store the python wheel file
echo GET_CW_AGENT_RPM_COMMAND= "aws s3 cp s3://${{ secrets.S3_INTEGRATION_BUCKET }}/integration-test/binary/${{ github.sha }}/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm ./cw-agent.rpm" >> $GITHUB_ENV
else
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
if [ "${{ env.CPU_ARCHITECTURE }}" = "x86_64" ]; then
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
elif [ "${{ env.CPU_ARCHITECTURE }}" = "arm64" ]; then
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/arm64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
fi
fi

- name: Set up terraform
Expand Down Expand Up @@ -144,6 +154,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_wheel_command=${{ env.GET_ADOT_WHEEL_COMMAND }}" \
-var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \
|| deployment_failed=$?

if [ $deployment_failed -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python-ec2-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
with:
aws-region: ${{ matrix.aws-region }}
caller-workflow-name: 'appsignals-python-e2e-ec2-canary-test'
cpu-architecture: 'x86_64'

pypi:
uses: ./.github/workflows/python-ec2-default-retry.yml
Expand All @@ -37,3 +38,4 @@ jobs:
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-python-e2e-ec2-pypi-canary-test'
otel-source: 'pypi'
cpu-architecture: 'x86_64'
6 changes: 6 additions & 0 deletions .github/workflows/python-ec2-default-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
required: false
default: 'aws-opentelemetry-distro'
type: string
cpu-architecture:
required: false
type: string
default: "x86_64"
otel-source:
required: false
type: string
Expand All @@ -36,6 +40,7 @@ jobs:
caller-workflow-name: ${{ inputs.caller-workflow-name }}
staging-wheel-name: ${{ inputs.staging-wheel-name }}
otel-source: ${{ inputs.otel-source }}
cpu-architecture: ${{ inputs.cpu-architecture }}

python-ec2-default-attempt-2:
needs: [ python-ec2-default-attempt-1 ]
Expand All @@ -47,6 +52,7 @@ jobs:
caller-workflow-name: ${{ inputs.caller-workflow-name }}
staging-wheel-name: ${{ inputs.staging-wheel-name }}
otel-source: ${{ inputs.otel-source }}
cpu-architecture: ${{ inputs.cpu-architecture }}

publish-metric-attempt-1:
needs: [ python-ec2-default-attempt-1, python-ec2-default-attempt-2 ]
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/python-ec2-default-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
caller-workflow-name:
required: true
type: string
cpu-architecture:
description: "Permitted values: x86_64 or arm64"
required: false
type: string
default: "x86_64"
staging-wheel-name:
required: false
default: 'aws-opentelemetry-distro'
Expand All @@ -35,6 +40,7 @@ permissions:
env:
E2E_TEST_AWS_REGION: ${{ inputs.aws-region }}
CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }}
CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }}
ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }}
OTEL_SOURCE: ${{ inputs.otel-source }}
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/python-sample-app.zip
Expand Down Expand Up @@ -116,7 +122,11 @@ jobs:
# Reusing the adot-main-build-staging-jar bucket to store the python wheel file
echo GET_CW_AGENT_RPM_COMMAND= "aws s3 cp s3://${{ secrets.S3_INTEGRATION_BUCKET }}/integration-test/binary/${{ github.sha }}/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm ./cw-agent.rpm" >> $GITHUB_ENV
else
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
if [ "${{ env.CPU_ARCHITECTURE }}" = "x86_64" ]; then
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
elif [ "${{ env.CPU_ARCHITECTURE }}" = "arm64" ]; then
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/arm64/latest/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
fi
fi

- name: Set up terraform
Expand Down Expand Up @@ -153,6 +163,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_wheel_command=${{ env.GET_ADOT_WHEEL_COMMAND }}" \
-var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \
|| deployment_failed=$?

if [ $deployment_failed -eq 1 ]; then
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals end-to-end tests as a canary to
## test the artifacts for App Signals enablement. It will deploy a sample app and remote
## service onto an EKS cluster, call the APIs, and validate the generated telemetry,
## including logs, metrics, and traces.
name: Java EKS Enablement Canary Testing
on:
push:

permissions:
id-token: write
contents: read

jobs:
amd64:
uses: ./.github/workflows/python-ec2-default-retry.yml
secrets: inherit
with:
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-e2e-ec2-canary-test'
cpu-architecture: 'x86_64'

amd64-asg:
uses: ./.github/workflows/python-ec2-asg-test.yml
secrets: inherit
with:
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-e2e-ec2-canary-test'
cpu-architecture: 'x86_64'

arm64:
uses: ./.github/workflows/python-ec2-default-retry.yml
secrets: inherit
with:
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-e2e-ec2-maven-canary-test'
otel-source: 'pypi'
cpu-architecture: 'arm64'

arm64-asg:
uses: ./.github/workflows/python-ec2-asg-test.yml
secrets: inherit
with:
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-e2e-ec2-maven-canary-test'
cpu-architecture: 'arm64'
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals Python end-to-end tests as a canary to
## test the artifacts for Application Signals enablement. It will deploy a sample app and remote
## service onto an EKS cluster, call the APIs, and validate the generated telemetry,
## including logs, metrics, and traces.
name: Test
on:
push:

permissions:
id-token: write
contents: read


jobs:
eks:
strategy:
fail-fast: false
matrix:
aws-region: ['us-east-1']
uses: ./.github/workflows/java-eks-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
test-cluster-name: 'e2e-playground'
caller-workflow-name: 'test'
language-version: 'v11'

8 changes: 4 additions & 4 deletions terraform/python/ec2/asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ data "aws_ami" "ami" {
most_recent = true
filter {
name = "name"
values = ["al20*-ami-minimal-*-x86_64"]
values = ["al20*-ami-minimal-*-${var.cpu_architecture}"]
}
filter {
name = "state"
values = ["available"]
}
filter {
name = "architecture"
values = ["x86_64"]
values = [var.cpu_architecture]
}
filter {
name = "image-type"
Expand All @@ -86,7 +86,7 @@ data "aws_ami" "ami" {

resource "aws_launch_configuration" "launch_configuration" {
image_id = data.aws_ami.ami.id
instance_type = "t3.micro"
instance_type = var.cpu_architecture == "x86_64" ? "t3.micro" : "t4g.micro"
key_name = local.ssh_key_name
associate_public_ip_address = true
iam_instance_profile = "APP_SIGNALS_EC2_TEST_ROLE"
Expand Down Expand Up @@ -172,7 +172,7 @@ resource "aws_autoscaling_group" "asg" {

resource "aws_instance" "remote_service_instance" {
ami = data.aws_ami.ami.id # Amazon Linux 2 (free tier)
instance_type = "t3.micro"
instance_type = var.cpu_architecture == "x86_64" ? "t3.micro" : "t4g.micro"
key_name = local.ssh_key_name
iam_instance_profile = "APP_SIGNALS_EC2_TEST_ROLE"
vpc_security_group_ids = [aws_default_vpc.default.default_security_group_id]
Expand Down
4 changes: 4 additions & 0 deletions terraform/python/ec2/asg/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ variable "get_cw_agent_rpm_command" {

variable "canary_type" {
default = "python-ec2-asg"
}

variable "cpu_architecture" {
default = "x86_64"
}
8 changes: 4 additions & 4 deletions terraform/python/ec2/default/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ data "aws_ami" "ami" {
most_recent = true
filter {
name = "name"
values = ["al20*-ami-minimal-*-x86_64"]
values = ["al20*-ami-minimal-*-${var.cpu_architecture}"]
}
filter {
name = "state"
values = ["available"]
}
filter {
name = "architecture"
values = ["x86_64"]
values = [var.cpu_architecture]
}
filter {
name = "image-type"
Expand All @@ -79,7 +79,7 @@ data "aws_ami" "ami" {

resource "aws_instance" "main_service_instance" {
ami = data.aws_ami.ami.id # Amazon Linux 2 (free tier)
instance_type = "t3.small"
instance_type = var.cpu_architecture == "x86_64" ? "t3.micro" : "t4g.micro"
key_name = local.ssh_key_name
iam_instance_profile = "APP_SIGNALS_EC2_TEST_ROLE"
vpc_security_group_ids = [aws_default_vpc.default.default_security_group_id]
Expand Down Expand Up @@ -174,7 +174,7 @@ resource "null_resource" "main_service_setup" {

resource "aws_instance" "remote_service_instance" {
ami = data.aws_ami.ami.id # Amazon Linux 2 (free tier)
instance_type = "t3.small"
instance_type = var.cpu_architecture == "x86_64" ? "t3.micro" : "t4g.micro"
key_name = local.ssh_key_name
iam_instance_profile = "APP_SIGNALS_EC2_TEST_ROLE"
vpc_security_group_ids = [aws_default_vpc.default.default_security_group_id]
Expand Down
4 changes: 4 additions & 0 deletions terraform/python/ec2/default/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ variable "get_cw_agent_rpm_command" {

variable "canary_type" {
default = "python-ec2-default"
}

variable "cpu_architecture" {
default = "x86_64"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"otel.resource.ec2.tag.aws:autoscaling:groupName": "^{{platformInfo}}$",
"otel.resource.host.id": "^{{instanceId}}$",
"otel.resource.host.image.id": "^{{instanceAmi}}$",
"otel.resource.host.type": "^t3.micro$",
"otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$",
"otel.resource.host.name": "^{{privateDnsName}}$",
"aws.span.kind": "^LOCAL_ROOT$"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"metadata": {
"default": {
"otel.resource.host.image.id": "^{{instanceAmi}}$",
"otel.resource.host.type": "^t3.micro$"
"otel.resource.host.type": "^([a-z0-9]+\\.[a-z0-9]+)$"
}
},
"subsegments": [
Expand Down
Loading
Loading