Hyperledger fabric deployment (real network) - hyperledger-fabric

I have created an application using "Hyperledger Composer"
https://hyperledger.github.io/composer/tutorials/developer-guide.html
Its working fine on my local machine and I am able to access REST API's over local network.
I would like to setup real network. What I mean is multiple hosts and peers. I have been trying to figure out steps/guideline to setup a real fabric v1 network and deploy application on it, but haven't had any luck yet.
My Questions are
What are the steps of deploying real Fabric 1.0 network with multiple hosts, peers?
How to deploy application in real network (once its setup)?
Appreciate any direction here.

If you have a couple of linux VMs with ssh keys configured so you can ssh without prompting for a password you may try https://github.com/yacovm/fabricDeployment

Related

Multi host Kafka-zookeeper Hyper-ledger fabric network

I am trying to setup a Multi Org Multi Host network based on Hyperledger fabric block chain. I developed a network structure and trying to run docker containers in swarm mode. I have three aws instance Ubuntu on aws.
Here is link of my public repository https://github.com/medipal/MultiOrgNetwork
When I am running docker images there are no services replicated.
There is error while deploying the network thats why container are not starting.
How can I build a network like this or What should I have to correct in my code?
Here you have a great example of a orderer-kafka network. This is the first-network from fabric-sample with kafka. You need to adjust this to work in swarm mode and apply you changes.

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.

In Hyperledger Fabric is it possible to connect 2 Org's on 2 different machines

In Hyperledger Fabric is it possible to connect 2 Org's on 2 different machines(i.e. org1 on PC1 and org2 on PC2). If possible can you please suggest some steps?
Any help is appreciated.
Short answer is yes, though Docker Composer, which is how most of the samples are managed, won't do this without some heavy lifting.
You should take a look at Hyperledger Cello project as a means of deploying to multiple hosts leveraging kubernetes. It can deploy to most clouds supporting a kubernetes cluster capability, or can be used locally.
It's possible. Setting ip address instead of localhost for containers. Utilizing k8s or docker-swarm to handle cross-host containers.

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.

Connect local network with azure

I don't know how to begin on the following. I will explain with the picture below what i want to do.
Like you so you have 2 parts. The local part and the azure part. The azure part is my part. The local network could be a customer, ....
What i went to do is running a service on the pc's and send that data to the local server/gateway. But how can i detect to what server it needs to connect. I don't install any service on the local pc's, that does the customer itself. But i don't want that he needs to do configuration. Just like they install the server/gateway part.
I will run a webservice on azure that gets information from the server/gateway on the local network. So thats no problem. On azure there are some other application that will process the messages.
Also how can you send some message back to the local network? When you say on azure ping the other local computer on the network. You should send a message to the server/gateway on your local network. But how?
So i have 2 questions(see above for more information):
Connecting from the clients to the server/gateway
Send some information back to the local netwerk
You can use Virtual Network, Azure Connect to create a "connection" or "hybrid cloud" between the PCs and the Azure cloud. However, if you are talking about web based/simple messaging and the PCs have internet connectivity why not just route the messages through a secure (SSL/TLS) connection to the cloud?
For broadcasting/push-type notifications, please look at SignalR (http://signalr.net/). Microsoft is making that part of the ASP.NET platform: http://channel9.msdn.com/Events/Build/2012/3-034
It has some real nice functionality like gracefully, falling back on multiple mechanisms if advanced things like WebSockets are not supported by the server/client. This is an ideal solution and super scalable, since it is server based and very light on the client.
If you need to connect only one or more services running on you local network and make them available publicly via azure cloud.
The most straight forward solution i found was to use the services bus. Its require nearly no modification to you business network.

Resources