kafka-ui
kafka-ui copied to clipboard
Infra: Upload images to a public AWS ECR
We currently publish to github (and mirror to DockerHub), but I'll raise an issue and discuss the possibility of uploading the images to a public ECR as well.
Originally posted by @Haarolean in https://github.com/kafbat/kafka-ui/discussions/23#discussioncomment-8880602
TODO:
- [ ] marketplace image item
- [ ] workflow
@Haarolean Have there been any updates on this recently? Thanks.
@Haarolean Just to reconfirm: this is the correct AWS Public ECR repo — https://gallery.ecr.aws/s0v8j8q9/kafbat/kafka-ui, right?
Can the s0v8j8q9 id be dropped from the path and the description added to the repo for visibility? Thank you.
@yermulnik yeah it's the right one. The id can't be dropped (unless you know something we don't :) ), the first deploy should be performed once #586 is merged and we'll update the description soon
Thank you.
We can expect version and latest tags to be added as well, right? 😺
The id can't be dropped (unless you know something we don't :) )
FWIW: https://aws.amazon.com/blogs/aws/amazon-ecr-public-a-new-public-container-registry/
ps: hope this helps as I haven't done this myself before 🤷🏻
Thank you. We can expect version and
latesttags to be added as well, right? 😺
latest will be pushed there once 1.1 is released, will that work for you?
Thank you. We can expect version and
latesttags to be added as well, right? 😺
latestwill be pushed there once 1.1 is released, will that work for you?
Absolutely. Appreciate it 👍🏻
@Haarolean Given the number of tasks for 1.1 milestone, are there any approx timelines for that release? 🤔 Past due by 8 months 😢
FWIW: aws.amazon.com/blogs/aws/amazon-ecr-public-a-new-public-container-registry
Did I get it right, that you decided to not go with custom registry alias for a reason?
Also is the main tag re-added for every new commit'ish tag? (trying to figure out what we should rely upon unless releases are tagged correctly going forward).
Thanks.
are there any approx timelines for that release
Yeah, once #72 is merged in.
Did I get it right, that you decided to not go with custom registry alias for a reason?
Nope. I believe we didn't get the alias approved or something. I'll take a look into that.
Also is the
maintag re-added for every new commit'ish tag
Yeah, that's right. It always points to the latest commit in main.
Besides the main and release tags, every other commit in main has its own tag. You can use one of these.
🥳 Yay, can see v1.1.0 (and latest) at https://gallery.ecr.aws/s0v8j8q9/kafbat/kafka-ui now. Thank a lot.
Any updates on custom registry alias in place of random id? Thanks.
@yermulnik dunno, they're quite stubborn:
Will try to investigate
That's odd 😕 Any chance you can create an AWS support request to see why that's rejected?
I also reached out to AWS Support on this case and here's what they provided:
Please allow me to mention the internal team has mentioned that the request was getting rejected because the email of the account holder does not match with the alias kafka requested as Kafka is a separate platform https://kafka.apache.org/ .
So as next step I would request you to please have a check on the email from which the request is being raised.
Maybe it is worth of requesting kafbat as an alias for this Public ECR or otherwise an alias that matches AWS account holder email (I'm supposing it's somehow related either to kafbat or to kafka-ua names 🤞🏻)? 🤔
I also reached out to AWS Support on this case and here's what they provided:
Please allow me to mention the internal team has mentioned that the request was getting rejected because the email of the account holder does not match with the alias kafka requested as Kafka is a separate platform https://kafka.apache.org/ . So as next step I would request you to please have a check on the email from which the request is being raised.
Maybe it is worth of requesting
kafbatas an alias for this Public ECR or otherwise an alias that matches AWS account holder email (I'm supposing it's somehow related either tokafbator tokafka-uanames 🤞🏻)? 🤔
thanks for doing this! Indeed we had a same thought today, applied as kafbat-ui instead, let's see.
applied as
kafbat-uiinstead, let's see.
If you'll be pushing images to this registry for non-kafka-ui products developed by kafbat team, then the -ui suffix may look odd I guess.
applied as
kafbat-uiinstead, let's see.If you'll be pushing images to this registry for non-
kafka-uiproducts developed bykafbatteam, then the-uisuffix may look odd I guess.
sorry you're right, we've applied kafbat instead, it's rather a typo in my message
JFYI:
Please allow me to mention that internal team has confirmed you can request for "kafbat" through console and it will be processed normally.
@yermulnik thank you!
it's done now: https://gallery.ecr.aws/kafbat/kafbat/kafka-ui
the name is kinda weird tho (kafbat/kafbat/kafka-ui)
Marvelous. Thanks! 👍🏻
the name is kinda weird tho (
kafbat/kafbat/kafka-ui)
You probably need to drop now redundant s0v8j8q9/ from vars.ECR_REGISTRY value for docker tag 🤔
ps: I'm assuming that vars.ECR_REGISTRY is set to <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/s0v8j8q9 at the moment and hence (given the kafbat ECR alias is set now) it can be reduced to <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com so that ${{ env.REGISTRY }}/${{ env.REPOSITORY }} resolves to <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/kafbat/kafka-ui 🤞🏻
Please let me know if that helps.
You also probably can simplify code in docker publish workflow by replacing define env vars step with the below code:
- name: define env vars
run: |
if [ ${{ matrix.registry }} == 'ecr' ]; then
echo "REGISTRY=${{ vars.ECR_REGISTRY }}" >> $GITHUB_ENV
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
else
echo "REGISTRY=${{ matrix.registry }}" >> $GITHUB_ENV
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
fi
the name is kinda weird tho (
kafbat/kafbat/kafka-ui)You probably need to drop now redundant
s0v8j8q9/fromvars.ECR_REGISTRYvalue for docker tag 🤔ps: I'm assuming that
vars.ECR_REGISTRYis set to<aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/s0v8j8q9at the moment and hence (given thekafbatECR alias is set now) it can be reduced to<aws_account_id>.dkr.ecr.us-east-1.amazonaws.comso that${{ env.REGISTRY }}/${{ env.REPOSITORY }}resolves to<aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/kafbat/kafka-ui🤞🏻
it was set to public.ecr.aws/s0v8j8q9. I just tried replacing it with public.ecr.aws with no luck:
unexpected status from POST request to https://public.ecr.aws/v2/kafbat/kafka-ui/blobs/uploads/: 404 Not Found
Error: Process completed with exit code 1.
it was set to
public.ecr.aws/s0v8j8q9. I just tried replacing it withpublic.ecr.awswith no luck:unexpected status from POST request to https://public.ecr.aws/v2/kafbat/kafka-ui/blobs/uploads/: 404 Not Found Error: Process completed with exit code 1.
Ah, I see. Please try to set vars.ECR_REGISTRY back to public.ecr.aws/s0v8j8q9 and instead replace
elif [ ${{ matrix.registry }} == 'ecr' ]; then
echo "REGISTRY=${{ vars.ECR_REGISTRY }}" >> $GITHUB_ENV
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
with
elif [ ${{ matrix.registry }} == 'ecr' ]; then
echo "REGISTRY=${{ vars.ECR_REGISTRY }}" >> $GITHUB_ENV
echo "REPOSITORY=$(basename ${{ github.repository }})" >> $GITHUB_ENV
The gist of the change: REPOSITORY=${{ github.repository }} -> REPOSITORY=$(basename ${{ github.repository }})
@yermulnik wanna raise a PR for that?
wanna raise a PR for that?
Do you mean I should raise or you just want to allow me to contribute via PR? If you think I'd better raise PR, I can do that. Otherwise I don't think it's worth of a fuss if you already made those changes and they worked as expected.
That's merely a contribution suggestion :) I haven't tried anything since your last comment yet
No problem. Let try this out: https://github.com/kafbat/kafka-ui/pull/794 (though it's still you to test the changes I guess 🤷🏻)
@Haarolean Any chance for #794 to get rolling? =)
@yermulnik https://github.com/kafbat/kafka-ui/actions/runs/13051969523/job/36414297377
unexpected status from POST request to https://public.ecr.aws/v2/s0v8j8q9/kafka-ui/blobs/uploads/: 404 Not Found
Error: Process completed with exit code 1.
huh