An agricultural tracebility system made by hyperledger fabric.
Use collect_files.sh
to move the files I want to backup to this directory.
$ sudo ./collect_files.sh
$ git add -A
$ git commit -m "Update message"
$ git push
- Create our own blockchain system
/home/user/go/src/github.com/hyperledger/fabric-samples/first-network$ sudo ./agriculture.sh
After that, you will enter the cli container.
- Set some configuration and install chaincode
opt/gopath/src/github.com/hyperledger/fabric/peer# ./../../../chaincode/agriculture/settings.sh
- Set channel name
opt/gopath/src/github.com/hyperledger/fabric/peer# export CHANNEL_NAME=mychannel
- (Option) Test submit lots of transaction
opt/gopath/src/github.com/hyperledger/fabric/peer# ./../../../chaincode/agriculture/test/test.sh
- Execute eventcilent to fetch transaction and store into PostgreSQL
/home/user/go/src/github.com/hyperledger/fabric/examples/events/eventsclient$ go build
/home/user/go/src/github.com/hyperledger/fabric/examples/events/eventsclient$ sudo FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-samples/config ./eventsclient