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

Drone publishing for Amazon ECR #14347

Merged
merged 25 commits into from
Jul 26, 2022
Merged

Drone publishing for Amazon ECR #14347

merged 25 commits into from
Jul 26, 2022

Conversation

logand22
Copy link
Contributor

@logand22 logand22 commented Jul 11, 2022

The goal of this PR is to update the existing drone pipelines and workflows to publish docker images to both quay.io and Amazon ECR.

This is a part of RFD 73 and https://github.com/gravitational/cloud/issues/1839.

Care was taken to minimize any and all changes to pre-existing workflows.

This PR depends on:

What Changes

There are currently 3 ways the teleport or teleport-ent image are published to quay.io:

  • git tag
  • Drone promotion
  • Drone cronjob

Tagging

Images were originally published to quay.io/gravitational/teleport-ci. This was to distinguish between staged images and production-ready images. Due to the new architecture in RFD 73. teleport-ci will no longer be required. Images will now be pushed to the internal aws ECR repository.

Promotion

Images will be promoted from the internal staging repository to both quay and amazon ECR Public.

Promoting in drone

You can now specifically promote the docker image pipelines by promoting to promote-docker or promote-docker-ecr or promote-docker-quay. This will run just those pipelines respectively vs promoted the entire pipeline.

Cronjob

Images will be built and pushed to both quay.io and amazon ECR Public.

Testing

@logand22 logand22 requested review from fheinecke, webvictim, wadells and tcsc and removed request for fheinecke July 11, 2022 22:30
@logand22 logand22 requested a review from marcoandredinis July 11, 2022 22:30
@codingllama codingllama removed their request for review July 11, 2022 22:33
@logand22
Copy link
Contributor Author

CC: @tcsc @fheinecke @marcoandredinis What other areas should I look out for regarding potentially decommissioning the staging repository: quay.io/gravitational/teleport-ci?

@wadells
Copy link
Contributor

wadells commented Jul 11, 2022

What other areas should I look out for regarding potentially decommissioning the staging repository: quay.io/gravitational/teleport-ci?

GitHub code search is sufficient for tracking down the use cases: https://github.com/search?q=org%3Agravitational+teleport-ci&type=code

If you want to be extra diligent, check through the issues as well, and make sure that there aren't any that are made irrelevant or misleading after this change.

.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
@marcoandredinis
Copy link
Contributor

What other areas should I look out for regarding potentially decommissioning the staging repository: quay.io/gravitational/teleport-ci?

I didn't find any other references to it

With this change we'll have staging images only in ECR and production images in both ECR and Quay. Is that so?
I would rather see both repos with both images first

I'm a bit out of place here 😅 take my suggestions with a grain of salt

I'm curious of what this means to the Teleport Operator image (cc @hugoShaka )
Our current developments (the PR is yet to be merged) create a quay.io/gravitational/teleport-operator-ci and quay.io/gravitational/teleport-operator for staging and production images
Per the RFD - the image is marked as Repositories to migrate, but not mirror, we would publish the image only to ECR (staging -> internal and production -> public)
Can you please confirm?

@logand22
Copy link
Contributor Author

With this change we'll have staging images only in ECR and production images in both ECR and Quay. Is that so?
I would rather see both repos with both images first

This can still happen if desired. I was originally thinking that since teleport-ci is internal only, and seemingly not used by many people it would be easier to go ahead and "get rid of". The risk being anyone who does use the internal image for any type of testing pre-release of official images would have to pull them from this registry instead.

Keeping teleport-ci would minimize any workflow interruptions but would prolong the deprecation of Quay.io.

@marcoandredinis What do you think?

@logand22 logand22 requested a review from wadells July 12, 2022 19:49
.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
.drone.yml Outdated Show resolved Hide resolved
@marcoandredinis
Copy link
Contributor

marcoandredinis commented Jul 13, 2022

Keeping teleport-ci would minimize any workflow interruptions but would prolong the deprecation of Quay.io.

@marcoandredinis What do you think?

I'm ok with removing it 👍
I don't know who uses the teleport-ci, but I assume it's always internal/development so even if someone gets caught by surprise, it should be low impact

@jimbishopp jimbishopp requested a review from r0mant July 13, 2022 16:57
@webvictim
Copy link
Contributor

AFAIK nobody directly uses teleport-ci, it's just the staging ground so that we don't make images public until the promotion step runs.

@marcoandredinis marcoandredinis removed their request for review July 19, 2022 16:22
@logand22 logand22 force-pushed the logan/update-drone-publishing branch 2 times, most recently from b3585b6 to 4f6968a Compare July 20, 2022 19:47
@fheinecke
Copy link
Contributor

Just FYI this will have some merge conflicts with my open PR (#14203) which is about ready to merge

@logand22 logand22 force-pushed the logan/update-drone-publishing branch from 74eab52 to af0726b Compare July 21, 2022 21:51
@logand22 logand22 requested a review from wadells July 22, 2022 19:42
dronegen/misc.go Outdated Show resolved Hide resolved
dronegen/misc.go Outdated Show resolved Hide resolved
@logand22 logand22 requested a review from fheinecke July 25, 2022 21:19
Copy link
Contributor

@fheinecke fheinecke left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants