项目作者: therealtylerwells

项目描述 :
Basic starter repo and deployment scripts combining Hyperledger Fabric/Composer/Explorer
高级语言: JavaScript
项目地址: git://github.com/therealtylerwells/hyperledger-starter.git
创建时间: 2018-04-04T06:08:12Z
项目社区:https://github.com/therealtylerwells/hyperledger-starter

开源协议:MIT License

下载


Hyperledger Starter (Explorer/Fabric/Composer)

Welcome to a repo to get started with a combination of Hyperledger Fabric 1.1, Hyperledger Composer, and Hyperledger Explorer. This README will assume we are running things locally on macOS. For Windows and Ubuntu setups, be sure to check the official documentation, as those include extra or different steps.

Fabric Prerequisites

Official Hyperledger Fabric setup docs (includes extra steps for Windows users not listed here)

  • Docker
  • Node (tested on 8.9.0)
    • You may encounter some permission problems when running scripts, especially in production. To avoid this, be sure to install node as a non-root user using nvm.
  • Go
  • Python

You might need to set some paths.

  1. # Set path to Fabric binaries
  2. export PATH=<path-to>/bin:$PATH
  3. # Set path to Go
  4. export PATH=$PATH:$GOPATH/bin

Composer Prerequisites

Official Hyperledger Composer setup docs

This assumes you’ve installed the Fabric prerequisites.

  1. # Install Essential CLI Tools
  2. npm install -g composer-cli
  3. # Install utility to generate Composer's REST server
  4. npm install -g composer-rest-server

Hyperledger Blockchain Explorer Prerequisites

This assumes you’ve installed prerequisites for both Fabric and Composer.

Deploy Fabric + Composer

Once you’ve allowed all of the prerequisites, you should be good to go. Run ./deploy.sh to deploy a Fabric network and a Composer business network on top of that.

You’ll be able to access Composer’s REST API at localhost:3000.

Deploy Exporer

To explore blocks, you need to deploy Hyperledger Explorer.

  • Ensure explorer/config.json is using your MySQL password and username.
  • Run the db/fabricexplorer.sql script (or copy/paste it into your MySQL shell)
  • Run ./start.sh
  • To restart or clear the data, stop Explorer’s Node process and repeat the above steps.

You should now be able to access Hyperledger Fabric Explorer at localhost:8080. Want to make sure it’s working? Make a POST request to your Composer REST API and create a participant or asset. Explorer should update in real time.

Happy Hyperledgering!