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

Native Support For 64bit ARM in fabric #2994

Closed
davidkel opened this issue Oct 24, 2021 · 6 comments
Closed

Native Support For 64bit ARM in fabric #2994

davidkel opened this issue Oct 24, 2021 · 6 comments

Comments

@davidkel
Copy link
Contributor

With the introduction of the M1 ARM chip for Apple Macbooks plus the increasing interest in ARM as an alternative to Intel it would be good if fabric supported and published native ARM binaries

M1 Mac users at the moment can make use of Rosetta 2 to use fabric (although the bootstrap script currently fails to pull down binaries and images as it looks for a non-existent ARM architecture in the image name or binary package)

On top of Mac book support it would also facilitate being able to run fabric nodes on 64bit raspberry pi 4 distros which seems to be quite popular for IOT projects

@hhyxx
Copy link

hhyxx commented Dec 18, 2021

@denyeart
Copy link
Contributor

denyeart commented Jan 18, 2022

Note that a workaround has been merged in bootstrap script to pull down amd64 when using M1 Mac (Rosetta approach that Dave K mentioned). Got confirmation that this approach works.

@bestbeforetoday
Copy link
Member

bestbeforetoday commented Jun 29, 2022

Confirmed that with current (v2.4) Fabric release and current fabric-samples, these things work:

  • Fabric install using install script.
  • Create test-network
  • Deploy Go chaincode
  • Run Go, Node and Java client applications

What doesn't work is deploying Node and Java chaincode using the test-network/network.sh script, with suitable nodeenv and javaenv Docker images not found:

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-nodeenv:2.4: no matching manifest for linux/arm64/v8 in the manifest list entries
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-javaenv:2.4: no matching manifest for linux/arm64/v8 in the manifest list entries

A workaround is to manually pull the x86 node/javaenv Docker images in advance so the chaincode deployment process doesn't try to pull the native arm64 images, which don't exist:

  • docker pull --platform amd64 hyperledger/fabric-nodeenv:2.4
  • docker pull --platform amd64 hyperledger/fabric-javaenv:2.4

@1055373165
Copy link

I already solve this question on my mac m1.

https://juejin.cn/post/7175001573045567548/

@bestbeforetoday
Copy link
Member

I already solve this question on my mac m1.

https://juejin.cn/post/7175001573045567548/

I'm not sure the arm64 Fabric Docker images you are using are a good solution for current Fabric versions, given that they were published three years ago and include this message:

"NOTE: These images were created as part of a project at Linköping University, they have not been tested in detail and will not be maintained."

@jkneubuh
Copy link
Contributor

jkneubuh commented Jan 4, 2023

All set! Additional details and discussion thread at #3876

Release pipeline is now set up to generate arm64 and amd64 builds for binaries and docker images. We should also be OK extending with additional arch specs (ppc, etc.) with minimal updates, or the next time Steve Jobs reaches out from the grave to remove a few decibels from a laptop fan.

Really looking forward to seeing this used for IoT, cel, and broadcom/Pi devices.

Happy hacking.

@denyeart denyeart closed this as completed Jan 4, 2023
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

No branches or pull requests

6 participants