I'm trying to deploy hyperledger fabric on a raspberry pi, but it doesn't work. I'm searching for some tutorial but i didn't found it, there are someone that just did it?
1 Answers
Last time I've tried to run Hyperledger Fabric on RPi I've prepared following instructions:
- Install latest RASPBIAN on SD card, you can download image from: https://www.raspberrypi.org/downloads/raspbian/
Update and upgrade latest by running:
sudo apt-get update && sudo apt-get upgrade -y
Install required dependencies:
sudo apt-get install git curl gcc libc6-dev libltdl3-dev python-setuptools -y
Upgrade python pip installer:
sudo -H pip install pip --upgrade
Install docker and docker compose:
curl -sSL get.docker.com | shsudo usermod -aG docker pisudo pip install docker-compose
Logout/Login terminal session, so changes will take effect.
Install golang, by following instructions from: https://golang.org/doc/install
Create golang directory:
mkdir -p /home/pi/golang && mkdir -p /home/pi/golang/src/github/hyperledger/
Define environment variable
export GOPATH=/home/pi/golang
Make sure go binaries are in the path, e.g.:
export PATH=/usr/local/go/bin:$PATH
Clone fabric-baseimage repository into
/home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric-baseimage.git
Clone client fabric repository into
/home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric.git
Build based docker images
cd ~/golang/src/github/hyperledger/fabric-baseimage && make docker-local
Apply following patch to fabric code base:
--- a/peer/core.yaml +++ b/peer/core.yaml @@ -68,7 +68,6 @@ peer: # Gossip related configuration gossip: - bootstrap: 127.0.0.1:7051 # Use automatically chosen peer (high avalibility) to distribute blocks in channel or static one # Setting this true and orgLeader true cause panic exit useLeaderElection: false @@ -280,7 +279,7 @@ vm: Config: max-size: "50m" max-file: "5" - Memory: 2147483648 + Memory: 16777216
AND
--- a/core/container/util/dockerutil.go +++ b/core/container/util/dockerutil.go @@ -45,6 +45,7 @@ func NewDockerClient() (client *docker.Client, err error) { // and GOARCH here. var archRemap = map[string]string{ "amd64": "x86_64", + "arm": "armv7l", } func getArch() string {
Build Hyperledger peer and
cd ~/golang/src/github/hyperledger/fabric && make clean peer peer-docker
Peer executable binary will appear in:
~/golang/src/github/hyperledger/fabric/build/bin/

- 59,418
- 12
- 147
- 194

- 40,769
- 9
- 59
- 81
-
when i try to do make clean peer peer-docker i have the error docker: Error response from daemon: manifest for hyperledger/fabric-baseimage:armv7l-0.3.1 not found. – Dibri Aug 23 '17 at 12:59
-
Which problem do you have? – Artem Barger Aug 23 '17 at 13:00
-
Have you tried to build images as described at step #13? – Artem Barger Aug 23 '17 at 13:02
-
Unable to find image 'hyperledger/fabric-baseimage:armv7l-0.3.1' locally docker: Error response from daemon: manifest for hyperledger/fabric-baseimage:armv7l-0.3.1 not found. See 'docker run --help'. Makefile:215: recipe for target 'build/docker/gotools' failed make: *** [build/docker/gotools] Error 125 – Dibri Aug 23 '17 at 13:07
-
yes i build it using: make -f Makefile. I did it like this because docker-local doesn't works – Dibri Aug 23 '17 at 13:07
-
pi@raspberrypi:~/golang/src/github/hyperledger/fabric-baseimage $ make docker-local make: *** No rule to make target 'docker-local'. Stop. – Dibri Aug 23 '17 at 14:44
-
Probably I've solved with precompiled images for raspberry at https://hub.docker.com/u/frbrkoala/ – Dibri Aug 23 '17 at 20:17
-
Is this guide still valid? I also got "make: * No rule to make target 'docker-local'. Stop." when running "make docker-local". "make docker" runs, but only once the Docker repo is changed from "armv7/armhf-ubuntu" to "arm32v7/ubuntu/" in the Makefile. Would this solution also work? – Paolo Mar 05 '18 at 14:02
-
I think there was changes which requires some adjustments – Artem Barger Mar 05 '18 at 15:14