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

feat: add DockerHub and ScaleWay registries #85

Closed
wants to merge 14 commits into from

Conversation

Bidon15
Copy link
Member

@Bidon15 Bidon15 commented Oct 19, 2023

Overview

Part of https://github.com/celestiaorg/devops/issues/124

With this common workflow update, we will have 3 ways where we can fetch newly built containers

  1. Github Registry
  2. Docker Hub
  3. ScaleWay Cloud

In order to fully activate this - we need to revive secrets from the celestiaorg common account in DockerHub and create a new token

https://hub.docker.com/u/celestiaorg

For Scaleway, the secrets are created in 1pass and we only need to transfer the secrets to respective repositories, like:

  • celestia-node
  • celestia-app
  • orchestrator-relayer
  • rollkit/rollkit

In addition to that, common workflows should be called with inheritance like I did here in my own repo
https://github.com/Bidon15/celestia-node/blob/main/.github/workflows/docker-build-publish.yml

Other note is caching. We need it to make builds sub 10 minutes. I've tested them thoroughly in my forks and it works fine as of now in celestia-node.
Meaning that other repos should be fine too

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

closes: https://github.com/celestiaorg/devops/issues/562

@Bidon15 Bidon15 self-assigned this Oct 19, 2023
@Bidon15 Bidon15 requested review from MSevey and a team as code owners October 19, 2023 17:08
@Bidon15
Copy link
Member Author

Bidon15 commented Oct 19, 2023

you can try yourself

docker pull rg.fr-par.scw.cloud/celestia-node/celestia-node:3ccfd006
docker pull vietcelestia/celestia-node:8a657a5

@MSevey
Copy link
Member

MSevey commented Oct 19, 2023

Thoughts on making a simple dockerfile for this repo that excutes hello world of something so that this workflow runs on this repo?

@Bidon15 Bidon15 requested a review from MSevey October 20, 2023 11:37
@Bidon15
Copy link
Member Author

Bidon15 commented Oct 20, 2023

Thoughts on making a simple dockerfile for this repo that excutes hello world of something so that this workflow runs on this repo?

Done

tty47
tty47 previously approved these changes Oct 20, 2023
Copy link
Contributor

@tty47 tty47 left a comment

Choose a reason for hiding this comment

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

I do like it! 🔥 🪨

@Bidon15
Copy link
Member Author

Bidon15 commented Oct 23, 2023

DockerHub CI Access Token has been created and stored in a password manager.
We can safely transfer them into this repository to test out docker-action-test. If everything goes well, we can start transferring those into app/node/blobstream etc.

@MSevey
Copy link
Member

MSevey commented Oct 23, 2023

DockerHub CI Access Token has been created and stored in a password manager. We can safely transfer them into this repository to test out docker-action-test. If everything goes well, we can start transferring those into app/node/blobstream etc.

should this be an org level secret so that we aren't adding them one by one? or are they repo specific access tokens?

Copy link
Member

@MSevey MSevey left a comment

Choose a reason for hiding this comment

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

Looks like there is some left over bash code that needs to be removed.

We should also submit the docker test as a separate PR to merge in so that we can see the test here on this PR.

Copy link
Member

@MSevey MSevey left a comment

Choose a reason for hiding this comment

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

merge conflicts need to be resolved so that we can verify the CI.
one conversation still needs resolution.

@Bidon15 Bidon15 requested a review from MSevey November 14, 2023 16:55
@Bidon15
Copy link
Member Author

Bidon15 commented Nov 14, 2023

should this be an org level secret so that we aren't adding them one by one? or are they repo specific access tokens?

@MSevey they are org level wise (For dockerhub registry I am using my own as it's a free tier plan 😓 )
Still, we need to add secrets per app/node/etc. repos for this new workflow to work as expected

@MSevey
Copy link
Member

MSevey commented Nov 14, 2023

should this be an org level secret so that we aren't adding them one by one? or are they repo specific access tokens?

@MSevey they are org level wise (For dockerhub registry I am using my own as it's a free tier plan 😓 ) Still, we need to add secrets per app/node/etc. repos for this new workflow to work as expected

@Bidon15 sounds good, lmk if you need any help here. Sounds like we just need to create a celestia dockerhub registry account? and then migrate from your account to the company account?

Copy link
Member

@MSevey MSevey left a comment

Choose a reason for hiding this comment

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

@Bidon15 Bidon15 requested a review from MSevey November 14, 2023 17:30
@Bidon15
Copy link
Member Author

Bidon15 commented Nov 15, 2023

workflow file has an error https://github.com/celestiaorg/.github/actions/runs/6866669808

Ok, I thought that was fixed, but I think I misread that you need to do a lot of workarounds to make this happen 😢
https://github.com/orgs/community/discussions/45342

Will revert to just main

@mergify mergify bot mentioned this pull request Nov 15, 2023
5 tasks
@Bidon15
Copy link
Member Author

Bidon15 commented Nov 15, 2023

Love learning new limitations on github action
https://github.com/orgs/community/discussions/26388#discussioncomment-3251731

@Bidon15
Copy link
Member Author

Bidon15 commented Nov 15, 2023

@MSevey please grant proper rights to the job
https://github.com/celestiaorg/.github/actions/runs/6877419199

testing is done in #88

@MSevey
Copy link
Member

MSevey commented Nov 15, 2023

@MSevey please grant proper rights to the job https://github.com/celestiaorg/.github/actions/runs/6877419199

testing is done in #88

@Bidon15 this isnt a permission that we grant. You have to specific the permissions required in the workflow. i.e.

permissions:
 contents: write
 packages: write

like:

@Bidon15
Copy link
Member Author

Bidon15 commented Nov 17, 2023

Closing this PR bc #88 is so much better and works 🖖

@Bidon15 Bidon15 closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants