Do you have any idea how am I going to connect 2 existing organizations from different machines using the existing channel of 1 organizations. Here is what I have as of now, Org1 is running in VM1 and Org2 is running in VM2 with both have there own chaincode installed. What I am trying to do is to connect Org2 to Org1 to a channel of Org1. I don't have any idea how am I going to do it since currently the only example that I have is only using the same VM. Thank you.
You can connect them through the channel.
Suppose that you have already all the url exposed of each components (peer, orderer ..) and that org1 hold the channel. You simply need give to org2 the right to join the existing channel.
Here a guide:
https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html
based on what you said, you should start the tutorial from the section "Generate the Org3 Crypto Material".
To connect organizations on different hosts, you'll need to create a Docker Swarm. Once you have all the hosts joined to docker swarm, you'll need to create an overlay network and make your containers join this overlay network.
You can start following this blog that describes a simple configuration for multiple hosts. For further reference, you can refer to this SO answer.
For deployment using Kubernetes, you can refer to this medium blog.
Related
How can we connect a single Fabric - node/peer to different Fabric
networks?
A company called ABC is part of 2 networks and hosting 2 different nodes.
Can we create a network of networks where a single node can be part of many networks?
First of All,
In hyperledger fabric, we called network as a consortium
The consortium has a group of organizations, each organization can have (n) of orderers and peers
Coming to your question, yes peer can be part of multiple consortium as long as peer-organization is a member of that consortium
I was following Abdul Wahab's tutorial: Hyperledger Fabric on Multiple Hosts here. He had one organization with two peers.
It all worked fine for me until I tried to create two organizations each having 1 peer. I changed crypto-config.yaml, configtx.yaml and bmhn.sh and I’m pretty sure they’re right (In configtx.yaml, I added org2 with anchor peer0 and port 7051. In script.sh, I added CORE_PEER_ADDRESS=peer0.org2.example.com:7051). Is there something wrong with the ports?
And should I change something in the commands he provided? (For example in 6. Peer1, I changed org1 to org2 when necessary but I haven’t touched the port numbers). I think the problem is with the ports…
Could you please help me?
Assuming you need to run two org setup on multiple hosts, you'll need to do the following:
Open up the ports #2377(TCP), #7946(TCP+UDP) and #4789(UDP) for docker swarm network.
Create swarm from one of the hosts and make the other host join this swarm network.
Create an overlay network.
Make sure your docker-compose file for fabric components like orderers, peers, ca, couchdb and optionally cli joins this overlay network. These components should be configured to connect to the external network.
Spinup docker containers for fabric components on both the hosts.
Run "docker network inspect " on both the hosts to check if all the containers have joined the correct network.
By the end, you should be having a multi-org setup on multiple hosts ready.
We've a below network setup for hyperledger fabric:
3 Ordering Service nodes, 4 Kafka brokers and 3 Organizations (2 peers in each organization)
Requirement is - we need to make sure leader peer from each organization is receiving blocks via deliver RPC from a "specific" ordering service node.
How can we configure a specific ordering service node for peers in fabric?
There's no "magic" way to configure something like this in Fabric. The orderer endpoint information is stored in the system channel so normally all 3 of the Ordering Service endpoints would be in their so that any peer from any organization is aware of all the endpoints (for fault tolerance).
With the current Kafka-based ordering service, you might be able to achieve what you want by only setting a single endpoint in the orderer addresses section and then making sure that each organization resolved that DNS name to the specific endpoint desired.
I have deployed [two org hyperledger fabric network1. Now I want to integrate it with hyperledger Cello. I have installed it, now I am bit confused what values shall I put in Add host fields as per my installed network(please refer to link regarding peer ip and port). Its just a simple network on my local machine with docker(not swarm or kubernetes).
Cello is used to deploy fabric network you can find the container configuration file in fabric.solo.yaml
once you add your host go to chain tab and add new chain network
write on your terminal docker ps you will find the container created
Just looking at crypto-config.yaml for example - if I have an domain and host declared in OrdererOrgs, does this mean I will generate the certificates and keys for that particular host to sign proposed blocks?
If this host is on a separate VPN, what is the best practice for this host to take part in consensus (for example ipsec tunnel)?
First of all, you have to have very clear how is going to be your network, i.e. how many peers and orderers are going to compose your network. There, you can define an orderer or more for each organization.
Then, you start generating the elements that you need for your network:
The cryptogen tool generates you the certificates that you need for your network. You should define the crypto-config.yaml according with your network. If you have a domain and host declared in OrdererOrgs, it will generate the certificates and keys for that particular Orderer.
The configtxgen tool generates you the configuration for your channel. There, int the configtx.yaml, you define wich elements are gointo to take part in your channel.