Consensys / tessera

Tessera - Enterprise Implementation of Quorum's transaction manager
https://docs.tessera.consensys.net/
Apache License 2.0
180 stars 109 forks source link

Process to add new tessera geth peer dynamically #812

Closed subhasisbanik closed 5 years ago

subhasisbanik commented 5 years ago

I have built a network with say 3 peers where each peer contains a tessera and geth running. I have added admin.addPeer(), raft.addPeer() and also passed the detail in tessera-config.json.

Now after having all the peers set up, I wish to add 1 more peer. What should be the step to do that? Do I need to stop all Tessera running in the previous machines to add the new peer?

prd-fox commented 5 years ago

This depends on your configuration.

If you have disableAutoDiscovery set to false (or the property is omitted from your config), then all you have to do is add one of the existing peers to the new Tessera node. When the new Tessera node starts, it will communicate with the existing node, and then distribute that data to the others.

If you have disableAutoDiscovery set to true, then you will need to do one of two things:

  1. add the new node's address to the peer list of the existing nodes, and restart them.
  2. add the new node's address without restarting by using this API: http://docs.goquorum.com/en/latest/Privacy/Tessera/Usage/Admin%20Usage/
subhasisbanik commented 5 years ago

Great thanks. I will surely try it out. Regarding "disableAutoDiscovery" set to true, if I choose to use option 2 ("add the new node's address without restarting by using this API"), can I perform that using any http call? If yes, can you please help?

prd-fox commented 5 years ago

Absolutely.

It requires that you have set up an Admin App in the configuration, in order to access this API. If you have not done that, then please see this link.

Then, you can do a PUT request to http://<your-url>/config/peers with the body:

{
    "url": "<peer url here>"
}

Note: this will add the peer to your config file as well, so it will persist between restarts.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.