Hyperledger Fabric add new peers in different machine - hyperledger-fabric

I have completed this tutorial and successfully deployed a business network over what it seems to be a generic hyperledger fabric blockchain.
What i want to do now is to create a new peer in diffenrent machine but connected to the same blockchain. Can't find any information. Any help?
Thank you community!

To deploy hyperledger on a different machine you need to take advantage of docker swarm and overlay network. You can find the guide at
Deploying Hyperledger on Multiple Hosts
for the next question about extending your existing network by adding peers, follow Extending your network

I suggest you start looking at the hyperledger fabric documentation
http://hyperledger-fabric.readthedocs.io/en/latest/
You will need to understand about a hyperledger fabric network topology. There are many things you need to understand in order to understand how to configure a peer correctly and join it to a channel. The build your first network section will take you through creating a fabric network from scratch.

Related

Is Hyperledger Composer mandatory to setup a Multi-Node Multi Org Hyperledger fabric network?

I am getting started with the Hyperledger fabric network. I went through the examples of setting up single org setup on a single node and Single Org-Multi Node as well.
I am now trying to setup a Multi-Org, Multi Node network and the all the examples I have seen online, uses Hyperledger Composer. So, Is Composer mandatory to setup HYL-Fabric Multi-node, Multi-Org structrure, If not, can anyone provide me with the steps needed to setup a n/w without the composer?
Thanks

Hyperledger Fabric on Azure

I wanted to deployed and configured a Hyperledger network locally and also transfer it to Azure Hyperledger-Fabric for single organisation.
this may help https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-single-org - Hyperledger Composer has a single-org tutorial. However, to learn about Fabric itself, you should look at the Fabric network samples (easy to find on the web)

Deploying a Hyperledger Composer blockchain business network to Hyperledger Fabric (multiple organizations)

I implemented hyperledger composer tutorial and created a simple business network definition. Then I deployed it through composer and implemented it's rest APIs through composer-rest-server. Now I want to add one more peer to it on a different machine (PC) which can access the Blockchain I previously created. I followed this Deploying a Hyperledger Composer blockchain business network to Hyperledger Fabric (multiple organizations), but in this tutorial, the network is configured using docker containers, with both organizations' fabric networks, on the same machine.
My Question:
1. What are the differences between multiple organizations using docker containers (on the same machine) and using multiple machines (PC)?
2. How to implement this with multiple machines (PC) using Hyplerledger Composer?
Thank you in advance!
As answered on Hyperledger Rocket Chat:
The tutorial you refer to (Multi Organisation on one PC) is used to illustrate the Composer Aspects of a Multi Organisation - Multi Peer configuration. It is not necessary to use Docker Containers to build a Fabric, but it is easier and the majority choose to do it that way.
It is easy for Composer to work with a Multi Machine setup - you just create a different connection.json file to 'point' to the various addresses! The real question is how to implement a Multi-Org Hyperledger Fabric.
Docker Compose is the tool used for a Development Fabric and for the tutorials and it provides networking between the component containers, but Docker Compose is only really intended for a single machine. To work with multiple machines Kubernetes or Docker Swarm are better choices (or cloud hosting) and certainly something other than Docker Compose is required for production.
There are however a couple of tutorials that can be used for learning or PoC - I haven't tried them, but others in the community have:
https://www.skcript.com/svr/setting-up-a-blockchain-business-network-with-hyperledger-fabric-and-composer-running-in-multiple-physical-machine/
https://medium.com/#wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f

Using more than one peer in Hyperledger Composer

I have recently deployed and started a business-network with Hyperledger Composer, I have only one peer (?) in which I have created the network and now I am using the rest-server for adding participant and doing transaction from an Android app to my personal blockchain and everything goes well.
So...Need I to configure one or more peers on my network? What's the utility of doing that?
I know that other blockchains needs a lot of peers for co-validating transactions and for maintaining a big scalability / distributed data; doesn't Hyperledger do it for me without adding more peers in my network?
If you have started with Hyperledger Composer you are probably using the 'standard' development Fabric with a Single Peer. This is a 'minimal' Fabric provided to get developers a fast start without the need to configure and deploy a Fabric. But you are correct Hyperleder Fabric can be configured for Multi Peer Multi Organisation distributed ledgers.
There are tutorials in the Fabric documentation for setting up a Fabric from scratch, and also this document covers a tool for extending the Fabric.

Create one more peer node using hyperledger-composer

I implemented hyperledger composer tutorial and create a simple business network definition and deploy it on through composer and implement it's rest API's through composer-rest-server. Now I want to add one more peer to it on a different local machine which can access blockchain I created previously, so my question is How can I achieve that a different peer node (another local machine) connected to blockchain I created in the composer tutorial?
you can check the S/Overflow link provided by Ahmed Nasser relating to adding your peer to an existing Fabric network.
Once you have your Fabric network up and running, and all of your network configuration / resolution / docker configuration tested and working, you can come to Composer to define the connection info, such as adding additional peers (and therefore create the requisite business network cards that contain that info).
This single organisation tutorial can give you an idea of what's involved - it builds upon a Fabric network that was already created (a simple, one-peer Fabric blockchain Dev environment) ..see here -> https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.html
It obviously refers to 'localhost' in this scenario - obviously, you are creating something on an IP network, so you will need IP addresses/ host resolution as appropriate.

Resources