Minimal Fabric Development Environment

Gemeinsam Positives bewirken

Minimal Fabric Development Environment

Sometimes I quickly want to try an idea I, but do I really need to fire up 10+ docker containers?

No, I don’t. We’ve adapted the fabric (byfn) setup script to include only the absolut minimum:

  1. A single node
  2. A single orderer (solo mode)
  3. A single certificate authority (CA)

Note: This will work on MacOS and most Linux.

Prerequisites

  • cURL
  • Docker & Docker Compose
  • git

1. Get the code

git clone https://github.com/4eyes/hyperledger-fabric-basic-network.git

2. Download the docker images

$ cd hyperledger-fabric-basic-network
$ ./network.sh -m download

3. Start the network

$ ./network.sh -m up

4. Check the docker logs

$ docker logs peer0.org1.fabric.basic.network.com

The output should look like this:

connect -> DEBU 32e Connected to orderer.fabric.basic.network.com:7050
connect -> DEBU 32f Establishing gRPC stream with orderer.fabric.basic.network.com:7050 ...
afterConnect -> DEBU 330 Entering
RequestBlocks -> DEBU 331 Starting deliver with block [1] for channel fabricchannel
afterConnect -> DEBU 332 Exiting

See the README on github for more details about configuration or the removal of the test network.

Next steps?

Write your own chaincode in Javascript!

Leave a Reply

Your email address will not be published. Required fields are marked *