Hyperledger composer on hyperledger fabric deployed on Docker swarm - hyperledger-fabric

I have deployed a one org hyperledger fabric network over docker swarm. Where one node has an orderer, peer , ca and couchdb and other node has one couchdb and node. I was able to invoke basic chaincode over it. Now I want to deploy composer over it. But I am not sure what shall I give in request and event url of connection.json. I already tried giving individual IPs instead of localhost,but no luck. I used this tutorial to deploy one org fabric network over docker swarm.

See https://discourse.skcript.com/t/setting-up-a-blockchain-business-network-with-hyperledger-fabric-composer-running-in-multiple-physical-machine/602
you will need the requestURL and eventURL definition, along with peer addresses from the other 'node' (I assume you mean 'machine') on your node 1.

Related

How to add peer nodes to an existing running Hyperledger fabric blockchain using Hyperledger composer?

My Hyperledger fabric blockchain is already up and running using Hyperledger composer. Now I want to add one more peer node that should be running on physically different machine. What will be the steps for extending blockchain and I already issued PeerAdmin card and few others user cards with all peer nodes IP entries. Do I also need to add IP address of newly added node in the cards?

Multi Org Setup using HyperLedger Composer in multiple machines

I am working on setting up a Business Network for Multiple Organizations (two physical machines).
I did the setup of a business network using Hyperledger Composer Playground and achieved querying, rest-server implementation etc.
I have configured a multi-org (multiple organizations) setup for a single business network in a single cloud server (Reference link used: https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org). But, as in real scenario, I want to configure a multi-org functionality with two separate cloud servers.
I met with an error like below.
Error: Unable to Communicate with Peers. Peers not found.
Version of Composer : latest
Version of Fabric : V1.0
Thanks in Advance.
If you are using Composer latest (v0.19) then you have to use Fabric v1.1.
If you are Running on 2 servers with 2 IP addresses you need to solve the communications (IP Addressing and Routing) between you client and the servers, and between the containers on each server.
For the client to server you need to manage the addresses in the connection.json files for composer.
For the connectivity between the Peers and other containers the correct solution is to use Kubernetes or Docker Swarm to manage the addressing/routing. It is possible to use the extra_hosts feature of docker-compose for a simple demo but you might be restricted to one peer per org because of port conflicts.

Hyperledger Fabric add new peers in different machine

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.

Hyperledger composer integration with Fabric

I have 3 physical machines namely node1,node2 and node3.
node 1 is orderer
node 2 and node 3 are the peers
I was able to to deploy chain code and retrieve back the result. Now I am trying to use Hyper ledger composer and deploy chain code.
I have installed composer play-ground locally in node1 (orderer). Started Orderer and 2 peers.
Is it possible to deploy chain code in node1 written in composer-playground. Could you explain how to set up or point me to right document.
How to set up connection profile in composer-playground?
Please follow these instructions:
https://hyperledger.github.io/composer/installing/development-tools.html
That will create and start a Fabric for you and configure the security such that Composer can deploy.

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