blackdog
blackdog

Reputation: 2107

How to add a new org in HyperledgerFabric?

I follow this site: https://www.ibm.com/developerworks/cloud/library/cl-add-an-organization-to-your-hyperledger-fabric-blockchain/index.html . And I had some problem at section 4. the section 4 said that, I should add a new org json content ( that is Org3MSP ). But the doc didn't mention how to generate the json content. especially there are some string which look like a pem.

Didn't mention how to get the Org3MSP string Expand the json

Upvotes: 1

Views: 599

Answers (2)

Pranay
Pranay

Reputation: 69

You have to update configtx.yaml and crypto-config.yaml file. Once you edit you have to runn cryptogen tool to generated related certificates.

Upvotes: 0

christo4ferris
christo4ferris

Reputation: 4037

The documentation for v1.1.x has been updated to add a tutorial for reconfiguring an existing Hyperledger Fabric blockchain network (the "build your first network" sample network) to add a new organization and peer to an existing channel.

The general flow will be to:

  1. set up a configtxlator server to interact with the config block of the channel
  2. fetch the config block using peer channel fetch command
  3. translate the retrieved config block from protobuf to json using configtxlator server
  4. modify the json configuration to include the new org's info
  5. encode the json into protobuf using configtxlator
  6. compute the delta of the new config and the original in the channel
  7. decode the delta config update from protobuf to json
  8. wrap that json update in an envelope
  9. encode the resulting json into protobuf again, using configtxlator
  10. sign the transaction for a sufficient subset of the channel's membership to satisfy its endorsement policy
  11. submit the signed channel update command with peer channel update command
  12. fetch the genesis block for the channel with peer channel fetch
  13. start the new org's peer(s)
  14. join the new org's peer(s) to the channel using the genesis block with peer channel join
  15. install the chaincode to the new org's peer(s) as needed
  16. upgrade the chaincode to set a new endorsement policy including the new organization

Yes, it is a bit involved, but we expect that much of this will be automated and simplified for the administrator over time.

Upvotes: 1

Related Questions