How to add a new peer to an existing Hyperledger Fabric network?

When you create a hyperlink network, you define organizations, orders, and peers in crypto-config.yaml

and out configtx.yaml

.

But how do you add a new organization or a new peer to an existing organization on an already configured network? Run cryptogen

and configtxgen

pointing to configuration files containing only new organizations / peers? Recover everything?

+2


source to share


2 answers


You can achieve this by creating cryptographic stuff (using cryptogen extends

) for a new peer, creating a new peer and joining it to an existing channel on the network for synchronization.

You can find a complete guide at



Extending Fabric Hyperledger Network: Adding a New Partner

+2


source


The whole point of use cryptogen

is to help the user resolve crypto material for the peers and organizations defined in the file crypto-config.yaml

. However, you can simply use it openssl

to generate your organization's root CA keys and certificates, then generate custom certificates and organize them into a folder similar to the one that cryptogen

builds and runs your network. Therefore, adding a new peer will simply mean creating a new set of keys and a certificate signed by the root CA. Finally, you can simply start a new peer and join the channel by providing a genesis block, which can be obtained from the ordering service.



The tool configtxgen

will now guide you through setting up a Hyperledger Fabric where the organizations form a consortium and will be eligible to join the channel. Extending this configuration is a more complex process than just adding a new peer. To complete the job you will need to use the tool configtxlator

, more details and an example of how to use it can be found in the following tutorial... At a high level, you will need to read the current channel configuration, parse it in json format, update with new members, calculate the delta and create a configuration update transaction, and the last step is to send the update to the ordering service for it to take effect. After you finish updating the configuration, you can add new new users from your new organization to the channel.

+5


source







All Articles