volsync icon indicating copy to clipboard operation
volsync copied to clipboard

Add support for ARM64 architecture

Open cubic3d opened this issue 2 years ago • 6 comments

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.

cubic3d avatar Dec 29 '22 19:12 cubic3d

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.

yeicor avatar Feb 05 '23 16:02 yeicor

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

onedr0p avatar Jul 13 '23 12:07 onedr0p

@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

pl4nty avatar Jul 13 '23 14:07 pl4nty

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.

zimbres avatar Aug 15 '23 17:08 zimbres

@zimbres I loosely brought that up here.

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

onedr0p avatar Aug 15 '23 18:08 onedr0p