consensus-deployment-ansible icon indicating copy to clipboard operation
consensus-deployment-ansible copied to clipboard

Add collect_enodes playbook

Open dapplion opened this issue 3 years ago • 1 comments
trafficstars

Similar to https://github.com/parithosh/consensus-deployment-ansible/pull/55

Collects enodes and writes them to a file in the root, enodes.json

[
  "enode://37f1929c49100ad8c4dd4155abc798de59307f3289d8a88a16b3d20320cf291a7ed2576d2f4c9e488be5bd6bb6c08ad39994f254aba50c53923427ca0af5d813@146.190.25.207:30303"
  "enode://683fc52a836fe75236cd69c48ff5d86fde2408fc38c270e21a749a86921363fce569bcd9ae40d39c8caa8edf24a07512f755d90e4d500f49dea6cfe8bc9fdd9d@167.71.90.58:30303"
]

You can then copy the contents and paste as-is in eth1_bootnode_enode: since YAML supports JSON syntax.

Very convenient to grab those of any group, since it leverages -f ansible functionality

Note: Not as robust as https://github.com/parithosh/consensus-deployment-ansible/pull/55 since it grabs from logs but so far has not broke for me. Not sure if ELs have an API to programmatically grab the enode, @parithosh ?

Note: Depends on https://github.com/parithosh/consensus-deployment-ansible/pull/61 to query by execution_container_name

dapplion avatar Jun 27 '22 20:06 dapplion

This one might need a bit more work. The nodes also log the enodes of peers in the list and grabbing from logs might get very messy.

I'd switch to getting the data from admin_nodeInfo, that will list the enode of just the node

parithosh avatar Jun 29 '22 10:06 parithosh