Merge pull request #1218 from status-im/testnets
run 6 nodes per testnet [skip ci]
This commit is contained in:
commit
8cdb262189
|
@ -1,5 +1,5 @@
|
|||
import
|
||||
strformat, os, confutils, algorithm
|
||||
strformat, os, confutils, algorithm, sequtils
|
||||
|
||||
type
|
||||
Command = enum
|
||||
|
@ -9,15 +9,15 @@ type
|
|||
CliConfig = object
|
||||
network: string
|
||||
|
||||
depositsDir {.
|
||||
defaultValue: "deposits"
|
||||
name: "deposits-dir" }: string
|
||||
|
||||
case cmd {.command.}: Command
|
||||
of restart_nodes:
|
||||
discard
|
||||
|
||||
of reset_network:
|
||||
depositsDir {.
|
||||
defaultValue: "deposits"
|
||||
name: "deposits-dir" }: string
|
||||
|
||||
secretsDir {.
|
||||
defaultValue: "secrets"
|
||||
name: "secrets-dir" }: string
|
||||
|
@ -38,9 +38,9 @@ type
|
|||
var conf = load CliConfig
|
||||
|
||||
var
|
||||
serverCount = 10
|
||||
instancesCount = 2
|
||||
validators = listDirs(conf.depositsDir)
|
||||
serverCount = 6
|
||||
instancesCount = 1
|
||||
validators = listDirs(conf.depositsDir).mapIt(splitPath(it)[1])
|
||||
|
||||
sort(validators)
|
||||
|
||||
|
@ -115,6 +115,7 @@ of reset_network:
|
|||
for n, firstValidator, lastValidator in validatorAssignments():
|
||||
var
|
||||
validatorDirs = ""
|
||||
secretFiles = ""
|
||||
networkDataFiles = conf.networkDataDir & "/{genesis.ssz,bootstrap_nodes.txt}"
|
||||
|
||||
for i in firstValidator ..< lastValidator:
|
||||
|
@ -125,15 +126,14 @@ of reset_network:
|
|||
|
||||
let dockerPath = &"/docker/{n.container}/data/BeaconNode"
|
||||
echo &"echo Syncing {lastValidator - firstValidator} keys starting from {firstValidator} to container {n.container}@{n.server} ... && \\"
|
||||
echo &" ssh {n.server} 'sudo rm -rf /tmp/nimbus && mkdir -p /tmp/nimbus/{{validators,secrets}}' && \\"
|
||||
echo &" ssh {n.server} 'sudo rm -rf /tmp/nimbus && mkdir -p /tmp/nimbus/{{net-data,validators,secrets}}' && \\"
|
||||
echo &" rsync -a -zz {networkDataFiles} {n.server}:/tmp/nimbus/net-data/ && \\"
|
||||
if validator.len > 0:
|
||||
if validators.len > 0:
|
||||
echo &" rsync -a -zz {validatorDirs} {n.server}:/tmp/nimbus/validators/ && \\"
|
||||
echo &" rsync -a -zz {secretFiles} {n.server}:/tmp/nimbus/secrets/ && \\"
|
||||
|
||||
echo &" ssh {n.server} 'sudo docker container stop {n.container}; " &
|
||||
&"sudo rm -rf {dockerPath}/{{db,validators,secrets}}* && " &
|
||||
(if validators.len > 0: &"sudo mv /tmp/nimbus/* {dockerPath}/ && " else: "") &
|
||||
&"sudo mv /tmp/nimbus/net-data/* {dockerPath}/ && " &
|
||||
&"sudo rm -rf {dockerPath}/{{db,validators,secrets,net-data}}* && " &
|
||||
&"sudo mv /tmp/nimbus/* {dockerPath}/ && " &
|
||||
&"sudo chown dockremap:docker -R {dockerPath}'"
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import json, parseopt, strutils
|
||||
|
||||
# usage: process_dashboard --in=local_dashboard.json --out=remote_dashboard.json --testnet=0
|
||||
# Usage: process_dashboard --in=local_dashboard.json --out=remote_dashboard.json --testnet=0
|
||||
|
||||
# Import the result on metrics.status.im
|
||||
|
||||
var
|
||||
p = initOptParser()
|
||||
inputFileName, outputFilename: string
|
||||
|
@ -41,7 +44,7 @@ outputData["templating"]["list"] = parseJson("""
|
|||
"text": "beacon-node-testnet""" & $testnet & """-1",
|
||||
"value": "beacon-node-testnet""" & $testnet & """-1"
|
||||
},
|
||||
"datasource": "master-01.do-ams3.metrics.hq",
|
||||
"datasource": "node-01.do-ams3.public.hq",
|
||||
"definition": "label_values(process_virtual_memory_bytes{job=\"beacon-node-metrics\"},container)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
|
@ -68,7 +71,7 @@ outputData["templating"]["list"] = parseJson("""
|
|||
"text": "master-01.aws-eu-central-1a.nimbus.test",
|
||||
"value": "master-01.aws-eu-central-1a.nimbus.test"
|
||||
},
|
||||
"datasource": "master-01.do-ams3.metrics.hq",
|
||||
"datasource": "node-01.do-ams3.public.hq",
|
||||
"definition": "label_values(process_virtual_memory_bytes{job=\"beacon-node-metrics\"},instance)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
|
|
Loading…
Reference in New Issue