Skip to content
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

Convert private ecr to public ecr #840

Merged
merged 7 commits into from
Jan 6, 2022
Merged

Convert private ecr to public ecr #840

merged 7 commits into from
Jan 6, 2022

Conversation

khanhntd
Copy link
Contributor

Description:

Currently, the CI publishes the image to private repo and we need to pull it from there for integration test. However, as we discussed with the adot team, converting from private to public ECR would give us two advantages:

  • More visibility for the customer and dev to pull down the image without having the credentials.
  • Able to use multiple regions later on.

@khanhntd khanhntd requested a review from a team as a code owner December 31, 2021 10:10
@jefchien
Copy link
Member

jefchien commented Jan 3, 2022

What's the difference between #730 and this one?

@khanhntd
Copy link
Contributor Author

khanhntd commented Jan 3, 2022

What's the difference between #730 and this one?

Not difference. I go along with the multiple regions but forgot that Seth has done it. Will close this

@khanhntd khanhntd closed this Jan 3, 2022
@sethAmazon sethAmazon reopened this Jan 3, 2022
@@ -529,8 +529,8 @@ jobs:
if: steps.e2etest-release.outputs.cache-hit != 'true'
run: |
docker load < build/packages/$IMAGE_NAME.tar
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, I'd like to remove docker load from the workflow - we should just push to the ECR repo instead of docker saving. Then we could use the official docker build github action, using buildx, and making arm64 build trivial

Copy link
Contributor

@alolita alolita Jan 4, 2022

Choose a reason for hiding this comment

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

@khanhntd imo the repo should be named adot-collector-tests ; we could potentially have other test images there too wdyt?

Copy link
Contributor Author

@khanhntd khanhntd Jan 4, 2022

Choose a reason for hiding this comment

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

True thought. Mostly I thought the docker saving there is for separating the e2e preparations step with the build step. Other than that, I don't see any reasons to use docker save so I am down with using docker buildx for arm64.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alolita the only two tests that we have are: integration test from the CI and validation test from the CD. But the CD release is using public.ecr.aws/aws-observability/aws-otel-collector; so the only one we are using for this repo is the CI. So IMO, if we are planning to add additional testing such as unit testing or config testing such as FB in the future, then we should go with yours; if we don't, then specific enough such as adot-collector-integration-test is fine since its only for the CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However, such tests are not feasible since we are a downstream repo so I cannot imagine we have addition tests beside integration test such as unit test or config test.

Copy link
Contributor

@alolita alolita left a comment

Choose a reason for hiding this comment

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

let's fix the ECR repo name and in the readme

@khanhntd
Copy link
Contributor Author

khanhntd commented Jan 4, 2022

let's fix the ECR repo name and in the readme

I'm down with that too. Having a hard time to decide the naming convention though.

@@ -4,4 +4,4 @@ s3ReleaseCandidateBucketName: "aws-otel-collector-release-candidate"
s3BucketName: "aws-otel-collector-test"
sshKeyS3BucketName: "aoc-ssh-key"
traceDataS3BucketName: "trace-expected-data"
testingImageRepoName: "611364707713.dkr.ecr.us-west-2.amazonaws.com/aws/aws-otel-collector"
testingImageRepoName: "public.ecr.aws/aws-otel-test/adot-collector-integration-test"
Copy link
Member

Choose a reason for hiding this comment

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

What is this used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume its purpose is for notifying what resources are used with the release and testing. Currently ask Ying to confirm about it.

Copy link
Contributor Author

@khanhntd khanhntd Jan 5, 2022

Choose a reason for hiding this comment

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

Got a confirmation from @wyTrivail. So it's purpose is notify what resources are being used for the validation test and release validation. An example would be https://github.com/aws-observability/aws-otel-collector/blob/main/.github/workflows/CD.yml#L187. Somehow we decide to define it explicitly instead of using a yaml file anymore. IMO, it seems weird for me to delete it since most of the release validation or integration test, its used the same bucket so either define a yaml or define an environment variable is better for me instead of defining it explicitly though.

@@ -520,6 +488,10 @@ jobs:
if: steps.e2etest-release.outputs.cache-hit != 'true'
run: s3_bucket_name=aws-otel-collector-test upload_to_latest=0 bash tools/release/image-binary-release/s3-release.sh

- name: Build Image
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Seems the load tar involves in the CD so I should do all of this in one PR. Will post another PR for this step soon.

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Sorry didn't mean to do the build / push refactoring in this PR but thanks for helping with it :)

@khanhntd
Copy link
Contributor Author

khanhntd commented Jan 5, 2022

Sorry didn't mean to do the build / push refactoring in this PR but thanks for helping with it :)
No worries. Thought the build step only involve in the CI but it also involves the CD so need to move back to another PR :(

@sethAmazon sethAmazon merged commit 086ccea into aws-observability:main Jan 6, 2022
@khanhntd khanhntd deleted the convert_to_public_repo branch January 6, 2022 16:08
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.

5 participants