Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Adding nodes (raft and istanbul) #60

Merged
merged 7 commits into from
Aug 28, 2020
Merged

Conversation

libby
Copy link
Contributor

@libby libby commented Aug 24, 2020

Simplify adding raft and istanbul nodes (adding_nodes.md):

To add new nodes to a running Quorum K8s network create by qubernetes:

Use: qubernetes.yaml to test an istanbul network and qubernetes-raft.yaml to test a raft network.

  1. Update the config used to generate the network, to include the new node(s) you wish to add. Example If we are using ./qube-init --action=create qubernetes.yaml or using the container docker run --rm -it -v $(pwd):/qubernetes -ti quorumengineering/qubernetes ./qube-init --action=create qubernetes.yaml add the node(s) to the qubernetes.yaml file:
nodes: 
...
# adding new node
  - Node_UserIdent: quorum-node5
    Key_Dir: key5
    quorum:
      quorum:
        # supported: (raft | istanbul)
        consensus: istanbul
        Quorum_Version: 2.6.0
      tm:
        # (tessera|constellation)
        Name: tessera
        Tm_Version: 0.10.4
  1. Run ./qube-init --action=update qubernetes.yaml or using the container docker run --rm -it -v $(pwd):/qubernetes -ti quorumengineering/qubernetes ./qube-init --action=update qubernetes-raft.yaml to generate the new resources.

  2. One the Quorum and K8s resources have been generated for the new node(s), run the helpers/add_nodes_to_k8s.sh $CONSENSUS script passing in the consensus (raft | istanbul) of your network.
    helpers/add_nodes_to_k8s.sh raft
    helpers/add_nodes_to_k8s.sh istanbul

  3. Verify that the new nodes see blocks and accept transactions:
    ./helpers/run_contracts.sh node4

  4. Verify that blocks are seen by all, and that peers are connected:

./geth-attach node4
connecting to POD [quorum-node4-deployment-9bbdcd6c7-p5kln]
connecting to geth /etc/quorum/qdata
Welcome to the Geth JavaScript console!

instance: Geth/v1.9.7-stable-9339be03(quorum-v2.6.0)/linux-amd64/go1.13.10
coinbase: 0xb8759ae6d3539548d18400180d3169baf972a2ff
at block: 7 (Mon, 24 Aug 2020 16:44:12 UTC)
 datadir: /etc/quorum/qdata/dd
 modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 raft:1.0 rpc:1.0 txpool:1.0 web3:1.0

> eth.blockNumber
2
> admin.peers.length

libby added 5 commits August 23, 2020 21:42
* now that permissions nodes will be updated with hosts, there is no
need to restart the nodes to pick up env changes.
* Simplier now that pemrission-nodes.json is automatically updated.
* Nodes do not have to be restarted.
* The flag --raftjoinexisting does not seem to be needed.
* Place under node-management, same as ibft.
* Move to container dir.
* Moved logic for adding new nodes for istanbul and raft from separate
script to the same script that takes a parameter helpers/add_nodes_to_k8s.sh:
helpers/add_nodes_to_k8s.sh raft
helpers/add_nodes_to_k8s.sh istanbul

* When adding a raft node, wait for the permissioned-nodes.json
configMap to be update on the running cluster before trying to add new
peers.

* Remove unused scripts.
@libby libby requested a review from jbhurat August 24, 2020 16:48
libby added 2 commits August 24, 2020 13:08
* Before attempting to add nodes as validators, wait for the
istanbul-validator.toml to be updated, only checking a single node atm.
@libby
Copy link
Contributor Author

libby commented Aug 28, 2020

I opened a related issue Consensys/quorum#1063 to remove the need to add the --raftjoinexisting $raftid flag when adding, deleting, adding nodes. For now / for this PR, quberentes will only support adding nodes to a new cluster, but not adding/removing and adding again. We will update with remove capabilities once the need for the --raftjoinexisting $raftid flag is removed.

Copy link
Contributor

@jbhurat jbhurat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@libby libby merged commit 43a545c into Consensys:master Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants