How can I add new organization or new peer in already existing businessnetwork dynamically in HyperLedger Fabric.
please let me know the steps .
You can use configtxlator tool. This IBM-tutorial explains the procedure very well.
Kindly refer this link which contains details steps add new peer to existing network.
https://medium.com/#wahabjawed/extending-hyperledger-fabric-network-adding-a-new-peer-4f52f70a7217
Related
I'm new at HyperLedger Fabric and trying to customize the test-network provided in the demo https://github.com/hyperledger/fabric-samples/tree/master/test-network.
I can't find a way to 1. add new users and peers to the docker network and 2. create private channels using the CLI or Java SDK.
Could someone please help me ? A good tutorial to start would also be great. Thanks.
To extend Test Network with new orderer and peer, we need to extend fabric key with cryptogen, update system-channel definition, compose orderer nodes, compose peer nodes, join application channel and deploy the chaincode.
I created an article about how to extend test-network (in more details) with new peers and orderers https://dev.to/bukhorimuhammad/extending-fabric-2-test-network-50ll hope that helps
For the chaincode instantiation we pull the images dynamically from the docker hub. However, let's say if I have chaincode related images (e.g. fabric-ccenv, fabric-baseos, etc.) on a private registry, then how shall the peer code validate or authenticate to the registry? Is there any setting in core.yaml or other configuration changes that we can make to achieve that?
While there is no mechanism in the core.yaml to specify credentials for a private registry, using the new External Builder and Launcher chaincode model, you can tell the Peer exactly how to build/compile/pull/run/connect to chaincode, thus allowing you to tell the peer how to connect to the private registry and pull your image. You can find instructions on configuring your own external builder in our doc here where you can use absolutely any mechanism you want for running chaincode: https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_launcher.html
I just setup a Hyperledger network. Then I followed Add Org to channel document for adding new Org to the existing channel.This tutorial is manual work. Any way i can add new Org to existing channel dynamically. I need to add Org dynamically to my network. Please give any suggestion for doing that.
Thanks in advance.
Current solution:
1. I have a single node running on Hyperledger.
2. I have deployed my car-auction application on it.
Solution looking for:
I want my car-auction application to deploy on the second node and both nodes should be synced on the same channel.
Any suggestion.
Thanks
This basically boils down to the network configuration that you define in Hyperledger Fabric.
This configuration is defined in two files:
crypto-config.yaml: Contains network topology
configtx.yaml: Defines genesis info and channel consortium
Considering your case, I assume your setup to be:
Single Organization
2 peer nodes within this organization
1 Orderer node
A single channel
So, you need to define network topology with an orderer and a single organization containing two peer nodes. You can find references for this complete setup at build your first network docs on fabric documentation.
Once you have that fabric setup ready, you take references from the Composer Docs. Over here, pay close attention to "connection-profile" file that you create. Since you want both these nodes to execute the car-auction chaincode, you'll need to define both of your peers as "endorsing peers" by setting "endorsingPeers" section to be "true" in the connection profile json file.
Follow the same compose reference to generate the PeerAdmin card. Now, when you install the car-auction bna file, it'll be installed on both the peers. Next, when you start the network, both the peer nodes will have their own chaincode container started up.
This way, you'll have two peer nodes connected on the same channel. And since they're on the same channel, they'll be in sync (regardless a peer is endorsing peer or not).
The same kind of setup goes for the multi-org setup.
I am trying to create a blockchain and have created a genesis block successfully. I now want to create 2 more blocks on the genesis block using Hyperledger Fabric in Linux. So any help here would be appreciated.
And also do we have to create a new channel for creating new block or will the existing channel work?
You need to install and instantiate a chaincode. Then you can do a (write) invoke against that chaincode, which will create new blocks. This will all occur on the existing channel.