Adding peer to a existing network in hyperledger v1.0 from a different machine

707 Views Asked by At

I followed the link below to setup a Hyperledger Fabric http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html

I see the two orgs and two peers running in the same machine. I wanted to add another peer to this already setup network. Requesting some help here as to what steps i should follow to get this thing done.

2

There are 2 best solutions below

6
On

You should change the docker-compose-cli.yaml file, and restart the docker-compose. There, you have to add and define a new Peer.

Then, you should execute the CHANNEL_NAME=$CHANNEL_NAME TIMEOUT=<pick_a_value> docker-compose -f docker-compose-cli.yaml up -d command (again). With that command, I think that you will maintain the previous Docker containers and a new one will create for your network.

0
On

First of all if you would like to span multi host deployment, you might consider to use:

  1. Fabric deploy script
  2. Ansible playbook

Apart from this you can join remote peer simply by using peer cli tool (assuming you'd like to add peer from allowed organization).

  1. First of all you need to fetch config block by:

    peer channel fetch config -o orderer:7050 -c mychannel

  2. Next join peer using config block:

    peer channel join -o orderer:7050 --blockpath mychannel.block