Step by Step Towards Hyperledger Fabric (Adding an Organization with two Peers to an existing channel)— Part 2
Adding an Organization with two Peers to an existing channel
In this article we are going to learn the process to add an Organisation to an existing channel. I will be covering the in-depth process of Part 1 and Part 2 in the next coming articles. If you have not explored the Part 1 yet, i will suggest you to cover that part first before starting this one. I am sharing the Part 1 link below, it will help you to install the prerequisite required by Hyperledger Fabric.
Step by Step Towards Hyperledger Fabric — Part 1
Blockchain is the new buzz word in the industry now a days. But finding good resources to learn this fascinating…
Lets get started with our this step by step tutorial for adding an Org into existing channel.
Note: Install the prerequisite for Hyperledger Fabric by following the Part 1.
Step 1: Clone the Hyperledger Fabric Samples applications repository using the below command:
$ git clone -b master https://github.com/hyperledger/fabric-samples.git
Enter into the fabric-samples directory
$ cd fabric-samples
$ git checkout v1.1.0
Step 2: Download Platform-specific binaries
$ curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0
Note: The above command downloads and execute a bash script that will download and extract all of the platform-specific binaries.
You can see the downloaded the binaries inside the bin sub-directory inside fabric-samples directory as shown above.
Step 3: Add the binaries to your PATH environment variable so that these can be picked up without fully qualifying the path to each binary.
$ export PATH = <path to download location>/bin:$PATH
e.g. In my case $export PATH=/home/ashish/Desktop/fabric-samples/bin:$PATH
Step 4: Setup the Environment
$ cd fabric-samples/first-network
Let’s run the following command to clean up any previous environments
$ ./byfn.sh -m down
It will clean the previous containers and artifacts.
Now generate the default artifacts:
$ ./byfn.sh -m generate
Now launch the network making use of scripted execution within the CLI container.
$ ./byfn.sh -m up
You can use docker ps command to see the created containers running peers for Org1 and Org2.
Step 5: Bring org3 into the channel with the script
$ ./eyfn.sh up
Note: It will create the org3 crypto material and added it, the config update being created and signed, and then chaincode being installed to allow Org3 to execute ledger queries.
Congrats you have successfully added Org 3 having 2 peers with an existing and running Hyperledger Fabric network of Org 1 and Org 2. In the next part i will be covering technical details of Part 1 and Part 2.
I hope you are also interested in these two articles related to blockchain:
Know which blockchain or DLT platform works well within your usecase:- Comparison of different…
Internet is one of the biggest revolution that have a major impact on our daily life. It has change the way we share…
Coco Framework a game changer in Blockchain technology
Throughput of around 1600 transactions per second
If you have interest in blockchain technology than you will surely love to explore these articles too: