Quickly build a Hyperledger Fabric network
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)
- 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
- Go to “fabric-samples/first-network”
cd fabric-samples/first-network
- Start the network
./byfn.sh up
- After test, bring down the network
./byfn.sh down
3. Breakdown of Steps to build Hyperledger Fabric Network
- Download HLF Binaries and Docker images
- Configure configtx.yaml & crypto-config.yaml file
- Generate certs
- Generate genesis block
- Generate Channel creation file channel.tx
- Generate Anchor Peer update file
- Bring up the network, by creating the HLF docker containers from images, can use docker-compose or kubernetes
- Create channel by Channel creation file
- Have all peers join the channel
- Update anchor peers by Anchor Peer update file
- Install chaincode on endorsing peer
- Instantiate chaincode