如何将HyperLedger作曲家业务网络与Hyperledger Explorer集成在一起? [英] How to integrate HyperLedger composer Business network with Hyperledger explorer?

查看:84
本文介绍了如何将HyperLedger作曲家业务网络与Hyperledger Explorer集成在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用HyperLedger作曲器构建了业务网络.现在,我想为我的解决方案使用HyperLedger Explorer吗?我没有找到相同的任何帮助.我已经从Git下载了所有Hyperledger Explorer,是否在配置Config文件时遇到问题?我不确定,下面的链接中引用了哪个配置文件? https://github.com/hyperledger/blockchain-explorer/blob/master/README.md

解决方案

我认为文件结构最近已更改,但文档中对配置文件的引用未更改.我刚刚测试了带有Composer v0.19.9的最新Hyperledger Explorer和Composer工具随附的开发Fabric. package.json中的Hyperledger Explorer版本号为3.2.

我修改的配置文件是:blockchain-explorer/app/platform/fabric/config.json

    {
"network-config": {
    "org1": {
        "name": "Org1",
        "mspid": "Org1MSP",
        "peer1": {
            "requests": "grpc://127.0.0.1:7051",
            "events": "grpc://127.0.0.1:7053",
            "server-hostname": "peer0.org1.example.com"
        },
        "admin": {
            "key": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
            "cert": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
        }
    }
},
"channel": "composerchannel",
"orderers":[
            {
            "mspid": "OrdererMSP",
            "server-hostname":"orderer.example.com",
            "requests":"grpc://127.0.0.1:7050"
            }
            ],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "fabric-path/fabric-samples/bin",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": "1.1"
}

请特别注意,我更改了

  1. 组织名称("name": "Org1"),
  2. 自Dev结构以来,我删除了TLS证书参考 不使用TLS,
  3. 我将网址更改为grpc而不是grpcs
  4. 我将管理员证书和密钥指向了我的位置.
  5. 频道名称.

请注意,资源管理器的默认端口为端口8080-与Composer Playground相同,因此请勿同时运行它们,或在此文件中更改资源管理器的端口号:blockchain-explorer/appconfig.json

重申一下,我是根据Composer文档在安装了Composer的Dev Fabric的情况下运行的.

与此同时,我确实遇到了构建应用程序的说明序列中的一个小问题,并且在下面强调了我需要的其他命令:

cd blockchain-explorer/app/test
npm install

cd ../

npm安装

cd测试

npm run test
cd blockchain-explorer
npm install
cd client/
npm install
npm test -- -u --coverage
npm run build

I have built Business network using HyperLedger composer. Now, I want to use HyperLedger explorer for my solution? I didnt find any help on the same. I have downloaded all the Hyperledger explorer from Git, I am stuck in configuring the Config file? I am not sure, which config file is being referred in the below link? https://github.com/hyperledger/blockchain-explorer/blob/master/README.md

解决方案

I think that the file structure has been changed recently, but the reference to the config file in the documentation has not changed. I have just tested the latest Hyperledger Explorer with Composer v0.19.9 and the development Fabric provided with the Composer tools. The version number of Hyperledger Explorer in the package.json is 3.2.

The config file that I modified is: blockchain-explorer/app/platform/fabric/config.json

    {
"network-config": {
    "org1": {
        "name": "Org1",
        "mspid": "Org1MSP",
        "peer1": {
            "requests": "grpc://127.0.0.1:7051",
            "events": "grpc://127.0.0.1:7053",
            "server-hostname": "peer0.org1.example.com"
        },
        "admin": {
            "key": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
            "cert": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
        }
    }
},
"channel": "composerchannel",
"orderers":[
            {
            "mspid": "OrdererMSP",
            "server-hostname":"orderer.example.com",
            "requests":"grpc://127.0.0.1:7050"
            }
            ],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "fabric-path/fabric-samples/bin",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": "1.1"
}

Note in particular that I changed the

  1. name of the org ( "name": "Org1" ),
  2. I removed the TLS certificate references since the Dev fabric doesn't use TLS,
  3. I changed the urls to grpc instead of grpcs,
  4. I pointed the admin cert and key to my locations.
  5. the channel name.

Be aware that the default port for the Explorer is port 8080 - the same as Composer Playground, so don't run them at the same time, or change the port number for the Explorer in this file: blockchain-explorer/appconfig.json

Just to reiterate I ran this with the Dev Fabric from Composer installed as per the Composer documentation.

Whilst working with this I did run into a small problem with the sequence of instructions to Build the app, and I have highlighted the extra commands I needed below:

cd blockchain-explorer/app/test
npm install

cd ../

npm install

cd test

npm run test
cd blockchain-explorer
npm install
cd client/
npm install
npm test -- -u --coverage
npm run build

这篇关于如何将HyperLedger作曲家业务网络与Hyperledger Explorer集成在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆