Monday, 26 February 2018

Building Smart Contract with Hyperledger Fabric on blockchain - Sandeep Kanao

Building Smart Contract with Hyperledger Fabric on blockchain - setting Hyperledger Fabric on Windows -Sandeep Kanao


Hyperledger Fabric is a blockchain framework implementation and one of the Hyperledger projects hosted by The Linux Foundation. Intended as a foundation for developing applications or solutions with a modular architecture, Hyperledger Fabric allows components, such as consensus and membership services, to be plug-and-play. Hyperledger Fabric leverages container technology to host smart contracts called “chaincode” that comprise the application logic of the system. Hyperledger Fabric was initially contributed by Digital Asset and IBM, as a result of the first hackathon.


Installation on Windows-7 64 bit- getting started :

1. Docker
https://docs.docker.com/toolbox/toolbox_install_windows/

2. curl
https://curl.haxx.se/download.html

Add to  path
C:\curl\curl-7.58.0-win64-mingw\bin

lib
C:\curl\curl-7.58.0-win64-mingw\lib

3. GoLanguage
https://golang.org/dl/
https://golang.org/doc/install?download=go1.10.windows-amd64.msi

update path
PATH=%PATH%:C:/go/bin

update npm beofre installing windows build tools

4. npm install npm@5.6.0 -g

5. Node.js
https://nodejs.org/en/download/

6. npm install --global windows-build-tools (powershell admin)

7. npm install --global grpc (powershell admin)


8. git bash
https://git-scm.com/downloads (minggw64)

setx PATH=%PATH%;C:\Program Files\Docker Toolbox\

set
git config --global core.autocrlf false
git config --global core.longpaths true

open git and verify
git config --get core.autocrlf (should be false)
git config --get core.longpaths (should be true)

9. docker-machine create test (bash)

10 docker-machine.exe env test (bash)

11. eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env test)  --(bash-to-set all env vars)

12. Hyperledger - sandeep kanao
curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0-alpha

13. cd c:/Users/kanao/fabric-samples/first-network
git clone -b master https://github.com/hyperledger/fabric-samples.git
cd fabric-samples
git checkout v1.1.0-alpha

14 from bash
cd
/c/Users/kanao/fabric-samples/first-network

 ./byfn.sh -m generate -c mychannel
./byfn.sh -m up -l node


**** To stop channel
./byfn.sh down





3 comments: