|
1 | 1 | # How to Test E2E Resource Changes
|
2 |
| -This guide will give a step by step instruction on how to test changes made to E2E testing resources before pushing a PR. |
| 2 | +This guide will give a step by step instruction on how to test changes made to Java/Python E2E testing resources before pushing a PR. |
3 | 3 | The guide will include the following:
|
4 | 4 | - Setting up IAM roles and an EKS cluster
|
5 | 5 | - Setting up VPC settings and IAM role for EC2 instances
|
@@ -78,37 +78,47 @@ Note: If you do not want to test all 5 regions, you can create one for us-east-1
|
78 | 78 |
|
79 | 79 | ### 4. Building Sample App to ECR
|
80 | 80 | Create two ECR repositories: one for the sample app main service and another for the sample app remote service.
|
81 |
| -Follow the instructions [here](../sample-apps/README.md) to build the sample app image and upload it to the ECR |
| 81 | +Follow the instructions to build the sample app image and upload it to the ECR: |
| 82 | +- [Java Sample App build instruction](https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/sample-apps/README.md#eks-use-case-uploading-to-ecr) |
| 83 | +- [Python Sample App build instruction](https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/sample-apps/python/README.md#eks-use-case-uploading-to-ecr) |
82 | 84 |
|
83 | 85 | ### 5. Building Sample App to S3 Bucket
|
84 |
| -Create an S3 Bucket to store the .jar files for the sample app main service and sample app remote service. |
85 |
| -Follow the instructions under [here](../sample-apps/README.md) to build the sample app .jar and upload it to the bucket |
| 86 | +Create an S3 Bucket to store the artifacts for the sample app main service and sample app remote service. |
| 87 | +Follow the instructions to build the sample app .jar and upload it to the bucket: |
| 88 | +- [Java .jar files build instruction](https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/sample-apps/README.md#ec2-use-case-building-the-jar-files) |
| 89 | +- [Python .zip file build instruction](https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/sample-apps/python/README.md#ec2-use-case-building-the-jar-files) |
86 | 90 |
|
87 | 91 | ### 6. Setting up repository
|
88 |
| -- Go to https://github.com/aws-observability/aws-otel-java-instrumentation and create a fork |
| 92 | +- Create a fork for the current repository. |
89 | 93 | - Go to the forked repo and enable action on the Action tab
|
90 | 94 | - Add the following secrets to the repository
|
91 | 95 | - APP_SIGNALS_E2E_TEST_ACC: `<AccountID>`
|
| 96 | + - E2E_SECRET_TEST_ROLE_ARN: `arn:aws:iam::<SecretManagerAccountID>:role/<RoleName>` |
92 | 97 | - E2E_TEST_ROLE_ARN: `arn:aws:iam::<AccountID>:role/<RoleName>`
|
93 |
| - - APP_SIGNALS_E2E_FE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Sample App Image>` |
94 |
| - - APP_SIGNALS_E2E_RE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Remote Sample App Image>` |
95 |
| - - APP_SIGNALS_E2E_FE_SA_JAR: s3://<BucketName>/<FileName.jar> |
96 |
| - - APP_SIGNALS_E2E_RE_SA_JAR: s3://<BucketName>/<FileName.jar> |
| 98 | + - ADOT_E2E_TEST_ROLE_ARN: `arn:aws:iam::<MainBuildAccountID>:role/<MainBuildClusterRoleName>` |
| 99 | + - APP_SIGNALS_PYTHON_E2E_FE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Python Sample App Image>` |
| 100 | + - APP_SIGNALS_PYTHON_E2E_RE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Python Remote Sample App Image>` |
| 101 | + - APP_SIGNALS_E2E_FE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Java Sample App Image>` |
| 102 | + - APP_SIGNALS_E2E_RE_SA_IMG: `<AccountID>.dkr.ecr.us-east-1.amazonaws.com/<Path to Java Remote Sample App Image>` |
| 103 | + - APP_SIGNALS_E2E_EC2_JAR: <JarBucketNamePrefix> |
97 | 104 |
|
98 | 105 |
|
99 | 106 | ### 7. Running the tests
|
100 | 107 | Go to the Actions tab on the forked repository.
|
101 | 108 |
|
102 |
| -- To run the EKS test, go to `App Signals Enablement - E2E EKS Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
103 |
| -- To run the EC2 test, go to `App Signals Enablement - E2E EC2 Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
| 109 | +- To run the Java EKS test, go to `App Signals Enablement - E2E EKS Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
| 110 | +- To run the Java EC2 test, go to `App Signals Enablement - E2E EC2 Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
| 111 | +- To run the Python EKS test, go to `App Signals Enablement - Python E2E EKS Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
| 112 | +- To run the Python EC2 test, go to `App Signals Enablement - Python E2E EC2 Canary Testing`, and click `Enable Workflow`, then `Run Workflow`. |
104 | 113 |
|
105 | 114 | If you don't want the canaries to run every 15 minutes on the forked repository, click the `...` button on the top right and choose `Disable Workflow`
|
106 | 115 |
|
107 | 116 | ### E2E Testing Resources
|
108 |
| -- `./.github/workflows/appsignals-e2e-*`: workflow files for running e2e tests |
109 |
| -- `./testing/sample-apps/*`: files for building the sample app |
110 |
| -- `./testing/validator/*`: files for validating logs/metrics/traces generated by sample app |
111 |
| -- `./testing/terraform/*`: files for launching the sample app to EKS cluster or EC2 instances |
| 117 | +- `./.github/workflows/appsignals-e2e-*`: workflow files for running java e2e tests |
| 118 | +- `./.github/workflows/appsignals-python-e2e-*`: workflow files for running python e2e tests |
| 119 | +- `./sample-apps/*`: files for building the sample app |
| 120 | +- `./validator/*`: files for validating logs/metrics/traces generated by sample app |
| 121 | +- `./terraform/*`: files for launching the sample app to EKS cluster or EC2 instances |
112 | 122 |
|
113 | 123 | ## Security
|
114 | 124 |
|
|
0 commit comments