Reputation: 3328
I have a business network running which I created using Composer. I have exposed REST APIs and all is looking good! However...
I would now like to find various config data about the network to connect Hyperledger Explorer, so I need the below:
{
"network-config": {
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpcs://127.0.0.1:7051",
"events": "grpcs://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "fabric-path/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"peer2": {
"requests": "grpcs://127.0.0.1:8051",
"events": "grpcs://127.0.0.1:8053",
"server-hostname": "peer1.org1.example.com",
"tls_cacerts": "fabric-path/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "fabric-path/first-network/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore",
"cert": "fabric-path/first-network/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts"
}
},
},
"host": "localhost",
"port": "8080",
"channel": "mychannel",
"keyValueStore": "/tmp/fabric-client-kvs",
"eventWaitTime": "30000",
}
Also I would like to understand how I can scale my network, i.e deploy to real nodes (not just IBM cloud).
Thanks!
Upvotes: 0
Views: 246
Reputation: 3328
I have found the way to get the the above config for each network. When creating your fabric composer network, you will have the following folder:
~/fabric-tools
It will contain a file called Devserver_connection.json
in which you will find the grpc
addresses of peers.
Also in the folder you can drill into the file system to get to:
~/fabric-tools/fabric-scripts/hlfv1/composer/crypto-config
And here you will find your keys needed to allow access to the explorer to your network.
Good luck!
Upvotes: 0
Reputation: 5570
I have pasted a sample below which was working for me on a Development Fabric for Composer v0.17. I would suggest you check the channel name, and the locations of the crypto material. Note also that Port 8080 is also used by Composer Playground so you might see a port conflict there
{
"network-config": {
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpc://127.0.0.1:7051",
"events": "grpc://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore",
"cert": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts"
}
}
},
"host": "localhost",
"port": "8081",
"channel": "composerchannel",
"keyValueStore": "/tmp/fabric-client-kvs",
"eventWaitTime": "30000",
"mysql": {
"host": "127.0.0.1",
"port": "3306",
"database": "fabricexplorer",
"username": "root",
"passwd": "******"
}
}
This document may help you with extending the Fabric:
Upvotes: 1