Hyperledger Fabric 实战(2) blockchain-explorer
Hyperledger Fabric 实战(2) blockchain-explorer
- 简介
- 目录结构
- 环境
- 区块链网络配置文件设置
- 整体配置
- 数据库配置
- 最终运行效果
简介
Hyperledger Explorer是一个简单,功能强大,易于使用,高度可维护的开源浏览器,用于查看底层区块链网络上的活动。
上篇博客已经介绍过了区块链的一些信息,这篇就不重复了.
目录结构
├── app fabric GRPC interface
├── db the mysql script and help class
├── explorer_client Web Ui
├── first-network Basic fabric network setup
├── listener websocket listener
├── metrics metrics about tx count per minute and block count per minute
├── service the service
├── socket push real time data to front end
├── timer Timer to post information periodically
└── utils Various utility scripts
环境
以下是安装和运行hyperledger资源管理器所需的软件依赖项
nodejs 6.9.x(注意,还不支持v7.x)
mysql 5.7或更高版本
Hyperledger Explorer可与Hyperledger Fabric 1.0配合使用。安装以下软件依赖项以管理结构网络。
docker 17.06.2-ce [ https://www.docker.com/community-edition ]
docker-compose 1.14.0 [ https://docs.docker.com/compose/ ]
区块链网络配置文件设置
1.cd blockchain-explorer
2.修改config.json以更新network-config
- Change “fabric-path” to your fabric network path
- 例如:“/home/user1/workspace/fabric-samples”,其中包含以下键:“tls_cacerts”,“key”,“cert”。我们需要相应的修改成我们自己配置的网络的路径。具体参考下边的“tls_cacerts”的配置
- 关键字“tls_cacerts”的最终路径为:“/home/user1/workspace/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ ca.crt”。
整体配置
如下图:
- npm install
- 启动脚本
./start.sh
5.在浏览器上启动URL http:// localhost:8080。
最终运行效果
如下图:
还没有评论,来说两句吧...