Adding a new Orderer Organization to an existing Hyperledger Fabric network

We will make use of the first-network in the fabric-samples repository (v1.4.4) for deploying the base network.

  1. Change the crypto-config.yaml as follows by adding the Orderer1 configuration:

2. Create the configtx.yaml file for the new orderer organization as follows:

3. Use the configtxgen tool to print the new orderer organization's MSP into JSON format. Run the below command in the same directory as configtx.yaml file.

configtxgen -printOrg Orderer1Org > orderer1org.json

4. Start the first-networksample using the byfn.sh script in etcdraft mode. docker cp this JSON file to the running cli container.

5. Set the environment inside the cli container corresponding to existing ordering node.

6. Import the latest system-channel configuration. Decode it to JSON format.

7. Edit the system channel configuration block’s Orderer section to add the new orderer organization's MSP as follows:

8. Edit the system channel configuration block’s Consortiums section to add the new orderer organization's MSP as follows:

9. Edit the system channel configuration block’s Consenters section to add the TLS credentials for the new orderer organization's orderer.example1.com node as follows:

10. Encode the block, find delta, create channel update transaction, encode it as protobuf envelope and submit the channel update transaction.

11. Fetch the latest system channel configuration block.

12. Copy this latest configuration block to channel-artifacts

13. Create new docker-compose base file for the new orderer organization as first-network/base/newordorg-base.yaml like below:

14. Create docker-compose file for the particular orderer as follows:

15. Bring up the new orderer container.

16. Now we must add this new orderer’s endpoint in the system channel configuration inside the OrdererAddresses section. For that, perform docker exec into the cli container. Using the environment of an existing orderer node, fetch the latest system channel configuration.

17. Edit the system channel configuration block to add the new orderer’s endpoint in the OrdererAddresses section as follows:

18. Encode the block, find delta, create channel update transaction, encode it as protobuf envelope.

19. Get the transaction block signed by Orderer1 Admin

20. Submit the channel update transaction from OrdererOrg’s orderer environment.

For updating the application channel, just replace the step 8 by updating the application channel configuration block’s Application section to add the new orderer organization's MSP there.

For this update, the first-network expects that MAJORITY Admins sign the transaction. So set the environment to first one of the peer organizations and sign the update block. Followed by that, submit the channel update by setting the environment of the alternate peer organization.

You can now see that the new orderer becomes part of the RAFT election (in both system as well as application channel) and is treated as the 6th ordering service node in the RAFT cluster. Perform the following command: docker logs orderer.example1.com to validate the same.