Introduction for using Hyperledger Fabric Samples

1. Install Pre-requisites

  • cURL –  latest version
  • Docker –  version 17.06.2-ce or greater
  • Docker Compose –  version 1.14.0 or greater
  • Golang  – version 1.11.x
  • Nodejs –  version 8.x (other versions are not in support yet)
  • NPM – version 5.x
  • Python 2.7

2. Install Hyperledger Fabric Samples (TL;DR)

  1. Download Samples, Binaries and Docker Images
    curl -sSL http://bit.ly/2ysbOFE | bash -s

    To download for specific version, add <fabric_version> <fabric-ca_version> <thirdparty_version> parameters

    curl -sSL http://bit.ly/2ysbOFE | bash -s -- 1.4.1 1.4.1 0.4.15
  2. Go to “fabric-samples/first-network”
    cd fabric-samples/first-network
  3. Start the network
    ./byfn.sh up
  4. After test, bring down the network
    ./byfn.sh down

3. Breakdown of Steps to build Hyperledger Fabric Network

  1. Download HLF Binaries and Docker images
  2. Configure configtx.yaml & crypto-config.yaml file
  3. Generate certs
  4. Generate genesis block
  5. Generate Channel creation file channel.tx
  6. Generate Anchor Peer update file
  7. Bring up the network, by creating the HLF docker containers from images, can use docker-compose or kubernetes
  8. Create channel by Channel creation file
  9. Have all peers join the channel
  10. Update anchor peers by Anchor Peer update file
  11. Install chaincode on endorsing peer
  12. Instantiate chaincode