Hyperledger Fabric on Raspberry pi 3

前端 未结 1 1657
别跟我提以往
别跟我提以往 2021-01-03 05:49

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 i

相关标签:
1条回答
  • 2021-01-03 06:20

    Last time I've tried to run Hyperledger Fabric on RPi I've prepared following instructions:

    1. Install latest RASPBIAN on SD card, you can download image from:
 https://www.raspberrypi.org/downloads/raspbian/
    2. Update and upgrade latest by running:


      sudo apt-get update && sudo apt-get upgrade -y
      
    3. Install required dependencies:


      sudo apt-get install git curl gcc libc6-dev libltdl3-dev python-setuptools -y
      
    4. Upgrade python pip installer:


      sudo -H pip install pip --upgrade
      
    5. Install docker and docker compose:

      curl -sSL get.docker.com | shsudo usermod -aG docker pisudo pip install docker-compose
      
    6. Logout/Login terminal session, so changes will take effect.

    7. Install golang, by following instructions from: https://golang.org/doc/install

    8. Create golang directory:

      mkdir -p /home/pi/golang && mkdir -p /home/pi/golang/src/github/hyperledger/
      
    9. Define environment variable

      export GOPATH=/home/pi/golang
      
    10. Make sure go binaries are in the path, e.g.:


      export PATH=/usr/local/go/bin:$PATH
      
    11. Clone fabric-baseimage repository into /home/pi/golang/src/github/hyperledger/

      git clone https://github.com/hyperledger/fabric-baseimage.git
      
    12. Clone client fabric repository into /home/pi/golang/src/github/hyperledger/


      git clone https://github.com/hyperledger/fabric.git
      
    13. Build based docker images

      cd ~/golang/src/github/hyperledger/fabric-baseimage && make docker-local
      
    14. 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 {
      
    15. Build Hyperledger peer and


      cd ~/golang/src/github/hyperledger/fabric && make clean peer peer-docker
      
    16. Peer executable binary will appear in:


      ~/golang/src/github/hyperledger/fabric/build/bin/

    0 讨论(0)
提交回复
热议问题