Katiyman
Katiyman

Reputation: 846

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

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.

Upvotes: 1

Views: 705

Answers (2)

Artem Barger
Artem Barger

Reputation: 41222

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

Upvotes: 1

Urko
Urko

Reputation: 1477

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.

Upvotes: 1

Related Questions