Skip to content

Commit

Permalink
Remove Internal Reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ADOT Patch workflow committed Jan 17, 2024
1 parent 75eaabc commit 416c85c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The guide will include the following:
- Setting up IAM roles and an EKS cluster
- Setting up VPC settings and IAM role for EC2 instances
- Buliding sample app images/files and putting them into ECRs/S3 buckets
- Forking a repository and setting up neccessary secrets
- Forking a repository and setting up necessary secrets


### 1. Create an IAM Role with OIDC Identity Provider
Expand Down Expand Up @@ -35,12 +35,8 @@ Additional Resource: https://docs.github.com/en/actions/deployment/security-hard
The E2E EKS test uses an EKS cluster to deploy the sample apps.
#### Setup Environment with the Appropriate Roles and Permissions.
Note: Make sure to replace <AccountID> with the correct value.
- First, assume Admin role from the test account by running `ada credentials update --account=<AccountID> --role=Admin --provider=isengard --once`
- Assume the e2e test role by running
- `output=$(aws sts assume-role --role-arn arn:aws:iam::<AccountID>:role/<E2ETestRole> --role-session-name AWSCLI-Session)`
- `export AWS_ACCESS_KEY_ID=$(echo $output | jq -r .Credentials.AccessKeyId)`
- `export AWS_SECRET_ACCESS_KEY=$(echo $output | jq -r .Credentials.SecretAccessKey)`
- `export AWS_SESSION_TOKEN=$(echo $output | jq -r .Credentials.SessionToken)`
- First, login to aws using `aws configure`
- Assume the e2e test role by running `aws sts assume-role --role-arn arn:aws:iam::<AccountID>:role/<E2ETestRole> --role-session-name AWSCLI-Session`
- Run `aws sts get-caller-identity` to check if you are in the correct role
#### Create a new Cluster
Note: Make sure to replace <Region> with the correct value (e.g. us-east-1)
Expand Down
4 changes: 2 additions & 2 deletions testing/sample-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the backup image, push the update to the main image and revert the addresses on
3. Run `rm -rf opentelemetry-java-instrumentation` to delete the folder.

### Steps to update image:
1. Use `ada` commands to autheticate into the testing account
1. Use `aws configure` to login to the testing account
2. Create a new ECR repository if there's no existing one.
2. Login to ECR Repository: `aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin {REPOSITORY}`.
3. Change repository name in the `build.gradle.kts` file under `testing/sample-apps/springboot` or `testing/sample-apps/sprintboot-remote-service`
Expand All @@ -32,7 +32,7 @@ This will create JAR files in the `build/libs/` folder with the format:
- springboot-*-SNAPSHOT.jar.

To update the JAR file in the testing account:
- Use `ada` commands to authenticate into the testing account
- Use `aws configure` to login to the testing account
- Only after you're sure of your changes and if they do not break the tests running in other repos, use `aws s3api put-object --bucket <BUCKET_NAME> --body build/libs/springboot-*-SNAPSHOT.jar --key <SERVICE_NAME>.jar`

Note: Replace * with the version number and `<SERVICE_NAME>.jar` is the desired name of the .jar file once in the s3 bucket. e.g. `sample-app-main-service.jar`

0 comments on commit 416c85c

Please sign in to comment.