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: distribute multiplatform images #330

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JonZeolla
Copy link
Member

@JonZeolla JonZeolla commented Jul 25, 2024

Contributor Comments

This is a WIP because it was on my mind today and I wanted to stash some reminders for others / future me in case someone takes on this work. Anyone with write access to the repo is welcome to take this over and push commits to the branch, etc. to get this done.

The biggest difficulty with this work is that docker-py doesn't yet support BUILDKIT per docker/docker-py#2230

The way I see it, we have three options:

  1. We could create and distribute amd- and arm-specific tags (i.e. seiso/easy_infra:latest-opentofu-aws-arm64, seiso/easy_infra:latest-opentofu-aws-amd64, etc. 🤮). This would be a workaround, but pretty easy to do as it doesn't require BULDKIT, is already baseline supported (i.e. if you task build on an arm64 system today, the image that's created is for arm64 as of dbd3a8b), and can be done with GitHub-hosted runners as of Support Linux ARM64 build images actions/runner-images#5631. We'd need to update this matrix to additionally include ubuntu-24.04-arm64 and then update runs-on: in line with this documentation. I've already pre-created the ubuntu-24.04-arm64 runner in our org it requires authorization of an additional actions spend here in order to use it (it doesn't use our monthly pre-allocated 3,000 minutes).
  2. Wait for BUILDKIT and implement something along the lines of the goat's reusable Taskfile.yml and the Dockerfile that cookiecutter-python creates (the latter of which I've already implemented in this branch). It would require tweaks to our build_and_tag function.
  3. We move all the building and tagging logic to run scripts (especially docker buildx build) on the builder's host. I would recommend making a scripts/ dir, creating some helper python scripts in there, and then calling that from Taskfile.yml if this is the chosen approach, otherwise the Taskfile.yml will be massive/too complex.

Pull Request Checklist

Thank you for submitting a contribution to our project!

In order to streamline the review of your contribution we ask that you review and comply with the below requirements:

  • Rebase your branch against the latest commit of the target branch.
  • If you are adding a dependency, please explain how it was chosen.
  • If manual testing is needed in order to validate the changes, provide a testing plan and the expected results.
  • If there is an issue associated with your Pull Request, link the issue to the PR.
  • Validate that documentation is accurate and aligned to any project updates or additions.

Don't forget our more detailed contribution guidelines here.

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.

1 participant