Hyperledger Fabric and Composer Install For Hyperledger Seattle Meetup Ray Metz, Seattle Blockchain Training 12/13/2018 This file location: http://seattleblockchaintraining.com/courseOutlines.html
Goals To have your own Hyperledger Fabric blockchain with no dependency on IBM cloud or public Internet To have a working Composer developer environment hosted on your laptop, pointed to your own blockchain. To Practice installing on your own. Knowledge of how to install. An opportunity to ask questions. Knowledge of how easy or hard it is to install. Knowledge of install components.
Prerequisites for this Meetup Linux or a Mac Internet and Web access https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html Discuss Windows vs Linux support Q + A on getting Linux versions, VMs Docker, Mac
Linux Requirements and Version Local VM CPU / Memory / Disk requirements Update commands sudo apt-get update sudo apt-get upgrade Commands to learn your Linux version: uname -a lsb_release -a cat /etc/*release cat /etc/issue* cat /proc/version
Check memory and disk space I upgraded to 2GB. free top Disk I upgraded to 16GB. df docker system df
Summary of pre-install software Linux: verify your version and latest version curl --version (mine was v7.47.0, latest is 7.62.0) node -v (v8.14.0) npm -v (mine was 6.4.1) go version (mine is 1.11.2) grpc (version test not known) python --version (mine is 2.7.12) git --version (latest is 2.20, mine is 2.7.4) docker --version (mine is 18.09) docker-compose --version (mine is 1.23.1)
cURL cURL lets command line commands copy files from web page URLs. Test if you already have it before installing curl --version https://curl.haxx.se/download.html Mine was v7.47.0, latest is 7.62.0, no need to upgrade
Node.js, NPM, NVM Node is JavaScript without a web browser. An updated shell script, web server, and more Node 8.9 or higher, (Node 9.x and 10.x is not supported at this time) Check your versions with: node -v npm -v (mine is npm v6.4.1 from node v8.14) nvm --version curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm“ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm nvm install v8.14.0 nvm use v8.14.0 nvm alias default v8.14.0 Node.js https://nodejs.org/en/ NPM - Node Package Manager NVM - Node Version Manager: https://github.com/creationix/nvm https://github.com/creationix/nvm#installation
Go – Google Golang programming language go version (HL v1.4 requires 1.11.2) https://golang.org/ cd ~ mkdir GoTest curl https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz > go1.11.2.linux-amd64.tar.gz sudo tar -xvf go1.11.2.linux-amd64.tar.gz sudo mv go /usr/local export GOROOT=/usr/local/go export GOPATH=$HOME/GoTest export PATH=$GOPATH/bin:$GOROOT/bin:$PATH vi .profile (add three export statements to bottom for autorun) sudo apt-get install golang-go (installs an old version) which go (command to show your go folder)
gRPC / Node.js gRPC Library Google RPC https://github.com/grpc/grpc npm install --global grpc
Python Verify Python v2.7 (not 3.5.1) python -V sudo apt install python-minimal
git https://git-scm.com/ git --version (latest is 2.20, mine is 2.7.4) git config --get core.autocrlf needs to be false git config --get core.longpaths needs to be true Run if you need to change them: git config --global core.autocrlf false git config --global core.longpaths true
Docker https://www.docker.com/ Docker version 17.06.2-ce or greater (HL v1.4: v18.06 or higher) docker --version docker version sudo chmod 777 /var/run/docker.sock https://store.docker.com/search?type=edition&offeri ng=community Check data location. Should be in a writable location such as /Users, /Volumes, /private, or /tmp
Docker Compose https://docs.docker.com/compose https://docs.docker.com/compose/install/#install-compose Docker Compose version 1.14.0 or greater docker-compose --version
Summary - Verify all versions Linux: verify your version and latest version curl --version (mine was v7.47.0, latest is 7.62.0) node -v (v8.14.0) npm -v (mine was 6.4.1) go version (mine is 1.11.2) grpc (version test not known) python --version (mine is 2.7.12) git --version (latest is 2.20, mine is 2.7.4) docker --version (mine is 18.09) docker-compose --version (mine is 1.23.1)
Install Fabric Decide the location where you are installing Class will use ~/fabric-samples or /home/yourlogin/fabric-samples cd ~ Install fabric-samples: curl –ssl https://raw.githubusercontent.com/hyperledger/fabric/release- 1.3/scripts/bootstrap.sh | bash -s 1.3.0 Install takes about 3.5GB of disk space export PATH=~/fabric-samples/bin:$PATH
Fabric Samples Summary version 1.3.0 platform specific fabric binaries version 1.3.0 platform specific fabric-ca-client binary Docker Images peer orderer ccenv tools ca couch kafka zookeeper
fabric-samples/bin folder contents configtxgen - create and inspect channel config related artifacts configtxlator - translate between protobuf and JSON versions of fabric data structures and create config updates cryptogen - utility for generating Hyperledger Fabric key material discover - interact with discovery service, discover peers and orderers fabric-ca-client - Certificate Authority Client get-docker-images.sh idemixgen - Identity Mixer MSP configuration generator orderer peer - Perform a specific set of tasks related to a peer
Fabric 1.4 https://hyperledger-fabric.readthedocs.io/en/release-1.3/ https://hyperledger-fabric.readthedocs.io/en/latest/ What’s new in v1.4 https://hyperledger-fabric.readthedocs.io/en/latest/whatsnew.html Samples and v1.4 samples https://github.com/hyperledger/fabric-samples/tree/master 1.4 Sample install guide https://hyperledger-fabric.readthedocs.io/en/latest/tutorial/commercial_paper.html Upgrading to the Newest Version of Fabric, v1.3 to v1.4 https://hyperledger-fabric.readthedocs.io/en/latest/upgrade_to_newest_version.html Capability Requirements https://hyperledger-fabric.readthedocs.io/en/latest/capability_requirements.html
Composer Install Prerequisites first https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html Install Composer Components https://hyperledger.github.io/composer/latest/installing/development-tools.html Start Playground in separate window and leave running. Notice port 8080 is mentioned at end of message Tutorial https://hyperledger.github.io/composer/latest/tutorials/playground-tutorial.html ID and Secret: Enrollment ID - admin Enrollment Secret - adminpw