Terminal prep
--------------
Add fabric /build/bin to your PATH.
Set FABRIC_CFG_PATH to fabric /sampleconfig directory, which contains sample orderer.yaml, peer.yaml, configtx.yaml, and msp for a SampleOrg.
Open three terminal windows, one each for orderer, peer, and CLI. cd to /fabric directory in each terminal.
Build fabric-----------
Build fabric binaries in any terminal:
make orderer peer configtxgen
...
make docker-clean docker
orderer terminal----------------
Create a system channel genesis block:
...
Start orderer, which by default will use /sampleconfig/genesisblock:
orderer
peer terminal--------------
Start peer (with debug logging enabled for all but the chattiest packages):
FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info peer node start
CLI terminal------------
Create a channel genesis block from the configtx.yaml profile:
...
peer chaincode invoke -o 127.0.0.1:7050 -C mychannel -n marbles -c '{"Args":["initMarble","marble1","blue","35","tom"]}'
...
peer chaincode invoke -o 127.0.0.1:7050 -C mychannel -n marbles -c '{"Args":["transferMarble","marble1","jerry"]}'
...