Add arm multi platform support#659
Conversation
- Update Dockerfile to support multi-platform builds using BUILDPLATFORM and TARGETPLATFORM - Add default values for backward compatibility with regular docker build - Update GitHub Actions workflow to use docker buildx for linux/amd64 and linux/arm64 - Simplify Makefile docker-buildx target to directly use updated Dockerfile - Remove platform hardcoding and enable cross-platform builds Fixes meshery#355 Signed-off-by: dharam <dharmendra.20208039@mnnit.ac.in>
|
@leecalcote Could you review this PR? |
|
Squash your commits. There are entirely too many. Explain how your changes make the embedded sqlite ARM compatible. |
|
Signoff on your commits. |
|
List the LLM model and version that you're using. |
This change does not touch sqlite. the Meshery Operator doesn’t embed or link sqlite; its a controller binary built statically with CGO disabled and packaged on distroless. I only enabled multi-arch (linux/amd64, linux/arm64) builds via docker buildx. So ARM compatibility here is independent of sqlite |
ccae5fa to
d80e5fd
Compare
Signed-off-by: Dharmendra solanki <78801686+ProgrammingPirates@users.noreply.github.com>
|
@leecalcote pls review |
|
Where have you explained the cause of the incompatibility and the changes to overcome that cause? |
@leecalcote I have updated the main PR description to include a structured explanation detailing the cause of the incompatibility and the changes to overcome it using Docker Buildx and dynamic platform variables. Please let me know if this clarifies things sufficiently for you! |
|
@ProgrammingPirates you're right about sqlite. When I first took a quick look, I thought this PR was on meshery/meshery. |
|
Join tomorrow's dev meeting. Add this PR as an agenda item, yeah? |
|
@ProgrammingPirates drop your agenda item here -https://docs.google.com/document/d/15IEwtTxPOkQXN2r_1LzGXuAv2mIUlmbdtmxpyxXF-KI/edit?tab=t.0 |
leecalcote
left a comment
There was a problem hiding this comment.
@ProgrammingPirates, please reuse (copy/paste) our multi-platform.yml workflow (used broadly across Meshery repos) for ARM support - https://github.com/meshery-extensions/meshery-istio/blob/master/.github/workflows/multi-platform.yml
|
Thank you for your contribution! 🎉 If this work is completed, this would be a great item to add to the weekly Meshery Development Meeting agenda. Meeting Details
|
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
|
@ProgrammingPirates are you going to address my last two comments? |
|
May i take it over? |
|
Hi @leecalcote and @lekaf974 , I’m interested in working on this issue/PR. If it’s currently stalled or not actively being worked on, I’d be happy to help finish the remaining tasks (workflow reuse + squash commits). Please let me know if I can take this over or contribute alongside |
|
Hi @leecalcote I noticed this PR is currently stalled and that the remaining requested change is to reuse Meshery’s existing Since a couple of contributors have already expressed interest in taking this over, I’ll wait for maintainer guidance before starting work to avoid duplicate effort. |
|
@Bhavika42, yes, please do offer review. 👍 |
|
Thanks @leecalcote, I’ll review the current workflow changes against the referenced |
Bhavika42
left a comment
There was a problem hiding this comment.
One thing I noticed while comparing the changes with the referenced multi-platform.yml workflow is that the multi-platform build logic still seems to be implemented directly inside build-and-release.yml.
It might be cleaner and easier to maintain if the ARM/multi-platform build steps reuse the shared workflow structure already used across Meshery repositories, rather than duplicating the build/push logic here.
Rationale for Multi-Platform Support
1. Cause of Incompatibility:
The previous build process created images only for the host architecture (implicitly
linux/amd64). This caused the Meshery Operator to fail with an "Exec format error" when run on modern ARM-based hardware (e.g., Apple Silicon or cloud instances like AWS Graviton). The single-architecture image was incompatible with the multi-architecture runtime environment.2. Changes to Overcome Incompatibility:
To resolve this, I implemented a true multi-platform build strategy:
docker buildxto build and push manifest lists for two architectures:linux/amd64andlinux/arm64.$BUILDPLATFORMand$TARGETPLATFORM. This allows the build process to dynamically compile the application for the correct target architecture, eliminating the need for hardcoding.docker build.Fixes Add support for ARM with a multi platform workflow #355