backube / volsync

Asynchronous data replication for Kubernetes volumes
https://volsync.readthedocs.io
GNU Affero General Public License v3.0
585 stars 67 forks source link

Add support for ARM64 architecture #574

Open cubic3d opened 1 year ago

cubic3d commented 1 year ago

Describe the feature you'd like to have.

Add support for ARM64 architecture

What is the value to the end user? (why is it a priority?)

Currently it's not possible to run VolSync on ARM64. The architecture is needed since cloud providers start to adopt Ampere based platforms.

How will we know we have a good solution? (acceptance criteria)

Image registry should contain multi arch container images.

Yeicor commented 1 year ago

It looks like docker buildx build --platform=linux/arm64,linux/amd64 . works (it should also work for more platforms).

I guess the only change needed is to modify the Makefile:

https://github.com/backube/volsync/blob/47f516f6a8bbb2ac2271e6b76862cf894030ad3e/Makefile#L169-L170

And Github Actions will take care of building and pushing the image.

onedr0p commented 1 year ago

I do not think that is all that needs to be done since they compile restic / rclone etc.. from source. Those CLI tools need to be compiled for arm64 as well

pl4nty commented 1 year ago

@onedr0p I have a working container, but I've only tested manager and rsync-tls: ghcr.io/pl4nty/volsync:latest@sha256:badb717674f94ca32a04c94edec580ad2581922493b277c42eac2d5560c84ea7

restic, syncthing, and rclone shell out to go build though, so they should get GOARCH=arm64 by default and compile appropriately

@Yeicor there's already a boilerplate docker-buildx task, but GitHub Actions needs additional setup to use BuildKit

zimbres commented 1 year ago

Build locally was very straight forward, but took 26 minutes. Isn't better to use a precompiled version of tools?

docker buildx build --platform linux/amd64,linux/arm64 -t zimbres/volsync:0.7.1 --push .

I only tested restic usage on arm64.

onedr0p commented 1 year ago

@zimbres I loosely brought that up here.

https://github.com/backube/volsync/pull/558#issuecomment-1371068807

mmontes11 commented 2 weeks ago

+1 this projects deserves an arm64 image build! 🙏🏻