Fabric1.x区块链浏览器部署

2019年12月26日14:18:47Fabric评论455阅读模式
摘要

hyperledger区块链浏览器blockchain-explorer开源项目,安装配置过程。

fabric-explorer部署

下载区块链浏览器项目

git clone https://github.com/hyperledger/blockchain-explorer.git

git checkout -b release-3.5 origin/release-3.5

如果运行createdb.sh时出错,是权限问题,将整个项目文件移除家目录,放到root目录,整个文件使用root权限。

sudo -u postgres psql

官方文档中说:

If you are connecting to a non TLS fabric peer, please modify the protocol (grpcs->grpc) and port (9051-> 9050) in the peer url and remove the tls_cacerts. Depending on this key, the application decides whether to go TLS or non TLS route.(是否是TLS节点,需要修改(grpcs->grpc)和(9051-> 9050)并将证书删掉)

实验证明,first-network中是有TLS节点的,所以这些不需要做任何的改动。

{
  "network-config": {
    "org1": {
      "name": "Org1_producer",
      "mspid": "Org1MSP",
      "peer1": {
        "requests": "grpc://172.27.83.113:7151",
        "events": "grpc://172.27.83.113:7152",
        "server-hostname": "peer0.org1.trace.com"
      },
      "peer2": {
        "requests": "grpc://172.27.83.113:7161",
        "events": "grpc://172.27.83.113:7162",
        "server-hostname": "peer1.org1.example.com"
      },
      "admin": {
        "key":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org1.trace.com/users/Admin@org1.trace.com/msp/keystore",
        "cert":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org1.trace.com/users/Admin@org1.trace.com/msp/signcerts"
      }
    },
    "org2": {
      "name": "Org2_agency",
      "mspid": "Org2MSP",
      "peer1": {
        "requests": "grpc://172.27.83.113:7251",
        "events": "grpc://172.27.83.113:7252",
        "server-hostname": "peer0.org2.trace.com"
      },
      "peer2": {
        "requests": "grpc://172.27.83.113:7261",
        "events": "grpc://172.27.83.113:7262",
        "server-hostname": "peer1.org2.trace.com"
      },
      "admin": {
        "key":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org2.trace.com/users/Admin@org2.trace.com/msp/keystore",
        "cert":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org2.trace.com/users/Admin@org2.trace.com/msp/signcerts"
      }
    },
    "org3": {
      "name": "Org3_operation",
      "mspid": "Org3MSP",
      "peer1": {
        "requests": "grpc://172.27.83.113:7351",
        "events": "grpc://172.27.83.113:7352",
        "server-hostname": "peer0.org3.trace.com"
      },
      "peer2": {
        "requests": "grpc://172.27.83.113:7361",
        "events": "grpc://172.27.83.113:7362",
        "server-hostname": "peer1.org3.trace.com"
      },
      "admin": {
        "key":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org3.trace.com/users/Admin@org3.trace.com/msp/keystore",
        "cert":
          "/home/user_dev/wanghaoyi/int/crypto-config/peerOrganizations/org3.trace.com/users/Admin@org3.trace.com/msp/signcerts"
      }
    }
  },
  "channel": "tracechannel",
  "orderers": [
    {
      "mspid": "OrdererMSP",
      "server-hostname": "orderer1.trace.com",
      "requests": "grpc://172.27.83.113:7050"
    }
  ],
  "keyValueStore": "/home/user_dev/wanghaoyi/int/fabric-client-kvs",
  "configtxgenToolPath": "/home/user_dev/wanghaoyi/int/bin",
  "SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
  "syncStartDate": "2018/01/01",
  "eventWaitTime": "30000",
  "license": "Apache-2.0",
  "version": "1.1"
}

Fabric最后更新:2020-11-6