Skip to content

Deploy Traffic Generator #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Deploy Traffic Generator #140

merged 3 commits into from
Jul 29, 2024

Conversation

harrryr
Copy link
Contributor

@harrryr harrryr commented Jul 26, 2024

Issue description:
This is a part of four series of PR to remove public endpoints for E2E testing to comply with security best practices.

Since the public endpoints will be removed, we are unable to call the sample app APIs directly from the workflow. Therefore, we will be using a traffic generator that is installed alongside the sample app applications to call the APIs

This PR will be responsible for creating the traffic generator as well as saving them to private ECR and S3 bucket.
The private ECR will be used by EKS and K8s platform while the S3 bucket will be used by EC2 Platforms.

The traffic generator will first wait while it receives the appropriate environment variable. Once that is received, it will ping the API endpoints every minute. There is some additional logic depending on which canary it is running for.

Test run: https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10118562925
Test run after comment: https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10148623963

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@majanjua-amzn majanjua-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move traffic-generator into sample-apps folder since it's specifically used with those? Don't want to have more branching in the root folder of the repo

@harrryr harrryr force-pushed the traffic-generator-image branch from 6bb93af to 45653ca Compare July 29, 2024 16:57
@harrryr harrryr force-pushed the traffic-generator-image branch from a9dfc39 to 074f4b7 Compare July 29, 2024 17:03
@harrryr harrryr force-pushed the traffic-generator-image branch from 074f4b7 to 783328f Compare July 29, 2024 17:04
@harrryr harrryr merged commit de02191 into main Jul 29, 2024
1 check passed
@harrryr harrryr deleted the traffic-generator-image branch July 29, 2024 18:05
harrryr added a commit that referenced this pull request Jul 30, 2024
*Issue description:*
This is a part of two series of PR to remove public endpoints for E2E
testing to comply with security best practices.
- [Deploy Traffic
Generator](#140)
- [Remove Public Endpoints from
Canaries](#141)

Since the public endpoints will be removed, we are unable to call the
sample app APIs directly from the workflow. Therefore, we will be using
a traffic generator that is installed alongside the sample app
applications to call the APIs

*K8s*
The K8s cluster has been updated to stop exposing the 30100 port.
Additionally, once this PR has been merged to main, we will need to
update the security groups of the EC2 instances containing the K8s
cluster to close all traffic other than from SSH. The SSH traffic will
still be needed for the E2E test to be able to update the K8s cluster
inside the EC2 instances.

*EC2*
The security group for the EC2 instances will be updated to only allow
inbound traffic from SSH and other EC2 instances in the same security
group. Merge this PR first, then update the security group
configuration.

*Description of changes:*
- Deploy the traffic generator in the sample app namespace.
- Stop exposing port 30100 for K8s
- Stop creating ingress port for the EKS
- Install traffic generator in the main ec2 instance and run it in the
background for EC2
- Remove HttpCaller from the validator and update the trace validator to
search for traces using filters rather than traceId

Test was done by running the a workflow in a playground k8s cluster with
the security group configured to only allow SSH traffic.

Full workflow run:
https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10167440327
Test run with new security group for EC2:
https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/10135108011

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants