Skip to content

Remove Public Endpoint from Canaries #141

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 8 commits into from
Jul 30, 2024
Merged

Conversation

harrryr
Copy link
Contributor

@harrryr harrryr commented Jul 26, 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.

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.

@harrryr harrryr force-pushed the remove-public-endpoint-k8s branch 2 times, most recently from cb96512 to 506fc2d Compare July 26, 2024 23:08
@harrryr harrryr mentioned this pull request Jul 28, 2024
@harrryr harrryr force-pushed the remove-public-endpoint-k8s branch from 506fc2d to a455ddc Compare July 28, 2024 19:58
@harrryr harrryr force-pushed the remove-public-endpoint-k8s branch from a455ddc to beb2b5d Compare July 28, 2024 20:06
harrryr added a commit that referenced this pull request Jul 29, 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.
- [Deploy Traffic
Generator](#140)
- [Remove Public Endpoints from
K8s](#141)
- [Remove Public Endpoints from
EKS](#139)
- [Remove Public Endpoints from
EC2](#144)

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.
harrryr added 2 commits July 29, 2024 13:47
*Issue description:*

*Description of changes:*

*Ensure you've run the following tests on your changes and include the
link below:*
To do so, create a `test.yml` file with `name: Test` and workflow
description to test your changes, then remove the file for your PR. Link
your test run in your PR description. This process is a short term
solution while we work on creating a staging environment for testing.

NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL.
See the
[needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)
keyword to run tests in succession.
- Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and
eu-central-2
- Run EC2 tests in all regions
- Run K8s on a separate K8s cluster (check IAD test account for master
node endpoints; these will change as we create and destroy clusters for
OS patching)

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
@harrryr harrryr changed the title Remove Public Endpoint from K8s Platform Remove Public Endpoint from Canaries Jul 29, 2024
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.

Remove pwd and other testing artifacts everywhere

@harrryr harrryr force-pushed the remove-public-endpoint-k8s branch 3 times, most recently from 356345b to 89703b2 Compare July 30, 2024 17:59
@harrryr harrryr force-pushed the remove-public-endpoint-k8s branch from 535506f to 2036f87 Compare July 30, 2024 18:04
@harrryr harrryr merged commit d6728ac into main Jul 30, 2024
1 check passed
@harrryr harrryr deleted the remove-public-endpoint-k8s branch July 30, 2024 19:00
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