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

Feature Discussion: Primary Support for Multi-Arch Builds #1119

Open
adambkaplan opened this issue Oct 10, 2022 · 8 comments
Open

Feature Discussion: Primary Support for Multi-Arch Builds #1119

adambkaplan opened this issue Oct 10, 2022 · 8 comments

Comments

@adambkaplan
Copy link
Member

Feature Request

Provide a primary API/mechanism for users to declare that a build should be cross-compiled across multiple architectures, and combined into a manifest list.

Background

Some build strategies support multi-arch builds directly through cross-compilation (example - ko). Others could support multi arch builds directly through emulation (buildkit, buildah), or could use node selectors to run builds simultaneously and have Shipwright create the manifest list.

@adambkaplan
Copy link
Member Author

The okd community implemented a "multi-arch" build strategy - multi-arch native buildah. We could look at this as a real-world multi-arch build scenario to iterate on.

@Adarsh-jaiss
Copy link
Member

  • Hey @adambkaplan , Please let me know, if i can assist you on this :)

@adambkaplan
Copy link
Member Author

👋 hey @Adarsh-jaiss - happy to have help here!

As a first step, I think someone from the Shipwright community should read the okd build strategy linked above and map out the process in a HackMD or other collaborative document. I think translating their script code to plain language will help move the conversation forward.

Are you able to help get this started?

@Adarsh-jaiss
Copy link
Member

👋 hey @Adarsh-jaiss - happy to have help here!

As a first step, I think someone from the Shipwright community should read the okd build strategy linked above and map out the process in a HackMD or other collaborative document. I think translating their script code to plain language will help move the conversation forward.

Are you able to help get this started?

Sure, I would love to do this :)

@Adarsh-jaiss
Copy link
Member

Hey, @adambkaplan , I have summarized everything in 3 scopes, the 1st scope will give collaborators about the overview of what actually the file is doing. The 2nd scope is a deep dive into steps involved and 3rd scope is a code level deep dive,to understand what a specific line of code does. Please look into it and let me know the changes : Hack.md

@adambkaplan
Copy link
Member Author

This is a great write-up! I have cleaned up the formatting a bit and published your analysis here: https://hackmd.io/PeHcszOaR_6aekd0vfvOAg?view=

@Adarsh-jaiss
Copy link
Member

Adarsh-jaiss commented May 6, 2024

This is a great write-up! I have cleaned up the formatting a bit and published your analysis here: https://hackmd.io/PeHcszOaR_6aekd0vfvOAg?view=

Thanks @adambkaplan , Please let me know the next step for this now!

@SaschaSchwarze0
Copy link
Member

SaschaSchwarze0 commented May 13, 2024

I put together my thoughts on multi-platform here: shipwright-io/community#204 (comment)

Things that were mentioned but are not on the slides:

  • We may want to let the user define the target platforms (like spec.output.platforms) on a Build and BuildRun as first-class properties rather than strategy parameters
  • We need a build strategy author to tell us whether it can handle platforms itself or not. Mayby through usage of ${params.shp-output-platforms[@]} implicitly like we assume strategy-managed push when ${params.shp-output-directory} is used ?
  • Shipwright Build internally is tight a lot on the fact that one BuildRun leads to exactly one TaskRun. Changing this will be a certain effort.
  • The image merge logic is simple. The code that I had shown which even uses some of our existing internal libraries:
    main.go.zip

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

No branches or pull requests

3 participants