When you create a hyperledger fabric network, you define organizations, orderers and peers in crypto-config.yaml
and configtx.yaml
.
But how do
The whole point of using cryptogen
is to help user to settle the crypto material for peer and organizations defined in the crypto-config.yaml
file. However one can simply leverage openssl
to generate keys and certificates of organization root CA, next generate user certificates and arrange them into the folder similar to what cryptogen
is producing and startup your network. Therefore adding a new peer will stand up to simply generating a new set of keys and certificate signed by the root CA. Finally you can simply start new peer and join it to the channel by providing genesis block, which could be fetched from ordering service.
Now, the configtxgen
tool helps you to configure your Hyperledger Fabric network it terms of which organizations will form a consortium and will have rights to join the channel. Extending this configuration is a bit more involved process than simply adding a new peer, in order to complete you will have to leverage the configtxlator
tool, more details and example of how to use it you can find in the following tutorial. In high level, you will have to read current channel configuration, parse it into the json format, update with new participants, compute the delta and generate configuration update transaction and the last step is to submit the update to the ordering service so it will take effect. Once you will accomplished config update you will be able to add new peers from new organization to the channel.