mirror of
https://github.com/logos-messaging/logos-messaging-simulator.git
synced 2026-01-04 06:53:08 +00:00
Naive tool to generate multiple nodes
This commit is contained in:
parent
f06076d45c
commit
70f45e31ed
2
.env
2
.env
@ -1,5 +1,5 @@
|
|||||||
export GOWAKU_IMAGE=statusteam/go-waku:latest
|
export GOWAKU_IMAGE=statusteam/go-waku:latest
|
||||||
export NWAKU_IMAGE=057383cb7328f525585f4cecb6a36c0d3859da94be84add8dab6a56af5eba75d
|
export NWAKU_IMAGE=f2ad7066ff4b05180b8acb10d20dec08ddce5b855d60d3d6400a01fff9639761
|
||||||
export NUM_NWAKU_NODES=5
|
export NUM_NWAKU_NODES=5
|
||||||
export NUM_GOWAKU_NODES=0
|
export NUM_GOWAKU_NODES=0
|
||||||
export MSG_PER_SECOND=10
|
export MSG_PER_SECOND=10
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
|
|
||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# TODO: disable relay and make it just bootstrap? discv5
|
#TODO: disable relay and make it just bootstrap? discv5
|
||||||
bootstrap:
|
bootstrap:
|
||||||
image: ${NWAKU_IMAGE}
|
image: ${NWAKU_IMAGE}
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
# TODO: expose some ports to inject traffic
|
#TODO: expose some ports to inject traffic
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:60000:60000
|
- 127.0.0.1:60000:60000
|
||||||
- 127.0.0.1:8008:8008
|
- 127.0.0.1:8008:8008
|
||||||
@ -17,356 +18,6 @@ services:
|
|||||||
- '/opt/run_bootstrap.sh'
|
- '/opt/run_bootstrap.sh'
|
||||||
volumes:
|
volumes:
|
||||||
- ./run_bootstrap.sh:/opt/run_bootstrap.sh:Z
|
- ./run_bootstrap.sh:/opt/run_bootstrap.sh:Z
|
||||||
|
|
||||||
nwaku_1:
|
|
||||||
container_name: waku-simulator_nwaku_1
|
|
||||||
environment:
|
|
||||||
REPLICA: 1
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_2:
|
|
||||||
container_name: waku-simulator_nwaku_2
|
|
||||||
environment:
|
|
||||||
REPLICA: 2
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_3:
|
|
||||||
container_name: waku-simulator_nwaku_3
|
|
||||||
environment:
|
|
||||||
REPLICA: 3
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_4:
|
|
||||||
container_name: waku-simulator_nwaku_4
|
|
||||||
environment:
|
|
||||||
REPLICA: 4
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_5:
|
|
||||||
container_name: waku-simulator_nwaku_5
|
|
||||||
environment:
|
|
||||||
REPLICA: 5
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_6:
|
|
||||||
container_name: waku-simulator_nwaku_6
|
|
||||||
environment:
|
|
||||||
REPLICA: 6
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_7:
|
|
||||||
container_name: waku-simulator_nwaku_7
|
|
||||||
environment:
|
|
||||||
REPLICA: 7
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_8:
|
|
||||||
container_name: waku-simulator_nwaku_8
|
|
||||||
environment:
|
|
||||||
REPLICA: 8
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_9:
|
|
||||||
container_name: waku-simulator_nwaku_9
|
|
||||||
environment:
|
|
||||||
REPLICA: 9
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_10:
|
|
||||||
container_name: waku-simulator_nwaku_10
|
|
||||||
environment:
|
|
||||||
REPLICA: 10
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_11:
|
|
||||||
container_name: waku-simulator_nwaku_11
|
|
||||||
environment:
|
|
||||||
REPLICA: 11
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_12:
|
|
||||||
container_name: waku-simulator_nwaku_12
|
|
||||||
environment:
|
|
||||||
REPLICA: 12
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_13:
|
|
||||||
container_name: waku-simulator_nwaku_13
|
|
||||||
environment:
|
|
||||||
REPLICA: 13
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_14:
|
|
||||||
container_name: waku-simulator_nwaku_14
|
|
||||||
environment:
|
|
||||||
REPLICA: 14
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_15:
|
|
||||||
container_name: waku-simulator_nwaku_15
|
|
||||||
environment:
|
|
||||||
REPLICA: 15
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_16:
|
|
||||||
container_name: waku-simulator_nwaku_16
|
|
||||||
environment:
|
|
||||||
REPLICA: 16
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_17:
|
|
||||||
container_name: waku-simulator_nwaku_17
|
|
||||||
environment:
|
|
||||||
REPLICA: 17
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_18:
|
|
||||||
container_name: waku-simulator_nwaku_18
|
|
||||||
environment:
|
|
||||||
REPLICA: 18
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_19:
|
|
||||||
container_name: waku-simulator_nwaku_19
|
|
||||||
environment:
|
|
||||||
REPLICA: 19
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
|
|
||||||
nwaku_20:
|
|
||||||
container_name: waku-simulator_nwaku_20
|
|
||||||
environment:
|
|
||||||
REPLICA: 20
|
|
||||||
image: ${NWAKU_IMAGE}
|
|
||||||
restart: on-failure
|
|
||||||
entrypoint: sh
|
|
||||||
command:
|
|
||||||
- '/opt/run_nwaku.sh'
|
|
||||||
volumes:
|
|
||||||
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
|
||||||
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
|
||||||
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
|
||||||
depends_on:
|
|
||||||
- bootstrap
|
|
||||||
|
|
||||||
# rpc-traffic:
|
|
||||||
# build: .
|
|
||||||
# #context: ./
|
|
||||||
# #dockerfile: Dockerfile
|
|
||||||
# restart: "no"
|
|
||||||
# depends_on:
|
|
||||||
# - nwaku
|
|
||||||
# command:
|
|
||||||
# - --node=http://bootstrap:8545
|
|
||||||
# - --msg-size-kbyte=10
|
|
||||||
|
|
||||||
gowaku:
|
gowaku:
|
||||||
image: ${GOWAKU_IMAGE}
|
image: ${GOWAKU_IMAGE}
|
||||||
@ -381,15 +32,15 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- bootstrap
|
- bootstrap
|
||||||
|
|
||||||
# waku-publisher:
|
#waku-publisher:
|
||||||
# image: alrevuelta/waku-publisher:9fb206c
|
# image: alrevuelta/waku-publisher:9fb206c
|
||||||
# entrypoint: sh
|
# entrypoint: sh
|
||||||
# - 'opt/run_wakupublisher.sh'
|
# - 'opt/run_wakupublisher.sh'
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./run_wakupublisher.sh:/opt/run_wakupublisher.sh:Z
|
# - ./run_wakupublisher.sh:/opt/run_wakupublisher.sh:Z
|
||||||
# environment:
|
# environment:
|
||||||
# MSG_PER_SECOND: 10
|
# MSG_PER_SECOND: 10
|
||||||
# MSG_SIZE_KBYTES: 10
|
# MSG_SIZE_KBYTES: 10
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:latest
|
||||||
@ -440,3 +91,324 @@ services:
|
|||||||
container_name: redis
|
container_name: redis
|
||||||
#ports:
|
#ports:
|
||||||
# - 6379:6379
|
# - 6379:6379
|
||||||
|
|
||||||
|
|
||||||
|
nwaku_1:
|
||||||
|
container_name: waku-simulator_nwaku_1
|
||||||
|
environment:
|
||||||
|
REPLICA: 1
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_2:
|
||||||
|
container_name: waku-simulator_nwaku_2
|
||||||
|
environment:
|
||||||
|
REPLICA: 2
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_3:
|
||||||
|
container_name: waku-simulator_nwaku_3
|
||||||
|
environment:
|
||||||
|
REPLICA: 3
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_4:
|
||||||
|
container_name: waku-simulator_nwaku_4
|
||||||
|
environment:
|
||||||
|
REPLICA: 4
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_5:
|
||||||
|
container_name: waku-simulator_nwaku_5
|
||||||
|
environment:
|
||||||
|
REPLICA: 5
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_6:
|
||||||
|
container_name: waku-simulator_nwaku_6
|
||||||
|
environment:
|
||||||
|
REPLICA: 6
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_7:
|
||||||
|
container_name: waku-simulator_nwaku_7
|
||||||
|
environment:
|
||||||
|
REPLICA: 7
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_8:
|
||||||
|
container_name: waku-simulator_nwaku_8
|
||||||
|
environment:
|
||||||
|
REPLICA: 8
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_9:
|
||||||
|
container_name: waku-simulator_nwaku_9
|
||||||
|
environment:
|
||||||
|
REPLICA: 9
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_10:
|
||||||
|
container_name: waku-simulator_nwaku_10
|
||||||
|
environment:
|
||||||
|
REPLICA: 10
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_11:
|
||||||
|
container_name: waku-simulator_nwaku_11
|
||||||
|
environment:
|
||||||
|
REPLICA: 11
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_12:
|
||||||
|
container_name: waku-simulator_nwaku_12
|
||||||
|
environment:
|
||||||
|
REPLICA: 12
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_13:
|
||||||
|
container_name: waku-simulator_nwaku_13
|
||||||
|
environment:
|
||||||
|
REPLICA: 13
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_14:
|
||||||
|
container_name: waku-simulator_nwaku_14
|
||||||
|
environment:
|
||||||
|
REPLICA: 14
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_15:
|
||||||
|
container_name: waku-simulator_nwaku_15
|
||||||
|
environment:
|
||||||
|
REPLICA: 15
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_16:
|
||||||
|
container_name: waku-simulator_nwaku_16
|
||||||
|
environment:
|
||||||
|
REPLICA: 16
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_17:
|
||||||
|
container_name: waku-simulator_nwaku_17
|
||||||
|
environment:
|
||||||
|
REPLICA: 17
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_18:
|
||||||
|
container_name: waku-simulator_nwaku_18
|
||||||
|
environment:
|
||||||
|
REPLICA: 18
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_19:
|
||||||
|
container_name: waku-simulator_nwaku_19
|
||||||
|
environment:
|
||||||
|
REPLICA: 19
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
nwaku_20:
|
||||||
|
container_name: waku-simulator_nwaku_20
|
||||||
|
environment:
|
||||||
|
REPLICA: 20
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|||||||
123
generate_compose.py
Normal file
123
generate_compose.py
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
base = '''
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
#TODO: disable relay and make it just bootstrap? discv5
|
||||||
|
bootstrap:
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
#TODO: expose some ports to inject traffic
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:60000:60000
|
||||||
|
- 127.0.0.1:8008:8008
|
||||||
|
- 127.0.0.1:9000:9000
|
||||||
|
- 127.0.0.1:8545:8545
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_bootstrap.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_bootstrap.sh:/opt/run_bootstrap.sh:Z
|
||||||
|
|
||||||
|
gowaku:
|
||||||
|
image: ${GOWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
deploy:
|
||||||
|
replicas: ${NUM_GOWAKU_NODES}
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_gowaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_gowaku.sh:/opt/run_gowaku.sh:Z
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
|
||||||
|
#waku-publisher:
|
||||||
|
# image: alrevuelta/waku-publisher:9fb206c
|
||||||
|
# entrypoint: sh
|
||||||
|
# - 'opt/run_wakupublisher.sh'
|
||||||
|
# volumes:
|
||||||
|
# - ./run_wakupublisher.sh:/opt/run_wakupublisher.sh:Z
|
||||||
|
# environment:
|
||||||
|
# MSG_PER_SECOND: 10
|
||||||
|
# MSG_SIZE_KBYTES: 10
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:latest
|
||||||
|
volumes:
|
||||||
|
- ./monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:z
|
||||||
|
command:
|
||||||
|
- --config.file=/etc/prometheus/prometheus.yml
|
||||||
|
- --storage.tsdb.retention.time=7d
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9090:9090
|
||||||
|
restart: on-failure
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana:latest
|
||||||
|
env_file:
|
||||||
|
- ./monitoring/configuration/grafana-plugins.env
|
||||||
|
volumes:
|
||||||
|
- ./monitoring/configuration/grafana.ini:/etc/grafana/grafana.ini:z
|
||||||
|
- ./monitoring/configuration/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:z
|
||||||
|
- ./monitoring/configuration/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:z
|
||||||
|
- ./monitoring/configuration/dashboards:/var/lib/grafana/dashboards/:z
|
||||||
|
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_icon.svg:z
|
||||||
|
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_typelogo.svg:z
|
||||||
|
- ./monitoring/configuration/customizations/custom-logo.png:/usr/share/grafana/public/img/fav32.png:z
|
||||||
|
ports:
|
||||||
|
#- 127.0.0.1:3000:3000
|
||||||
|
# open port to access the dashboard
|
||||||
|
- 3000:3000
|
||||||
|
restart: on-failure
|
||||||
|
depends_on:
|
||||||
|
- prometheus
|
||||||
|
|
||||||
|
cadvisor:
|
||||||
|
image: gcr.io/cadvisor/cadvisor:latest
|
||||||
|
container_name: cadvisor
|
||||||
|
#ports:
|
||||||
|
# - 8080:8080
|
||||||
|
volumes:
|
||||||
|
- /:/rootfs:ro
|
||||||
|
- /var/run:/var/run:rw
|
||||||
|
- /sys:/sys:ro
|
||||||
|
- /var/lib/docker/:/var/lib/docker:ro
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: redis
|
||||||
|
#ports:
|
||||||
|
# - 6379:6379
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
nwaku = '''
|
||||||
|
nwaku_INDEX:
|
||||||
|
container_name: waku-simulator_nwaku_INDEX
|
||||||
|
environment:
|
||||||
|
REPLICA: INDEX
|
||||||
|
image: ${NWAKU_IMAGE}
|
||||||
|
restart: on-failure
|
||||||
|
entrypoint: sh
|
||||||
|
command:
|
||||||
|
- '/opt/run_nwaku.sh'
|
||||||
|
volumes:
|
||||||
|
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
|
||||||
|
- ./rlnKeystore.json:/rlnKeystore.json:Z
|
||||||
|
# - ./rln_tree.db:/rln_tree.db:Z # this should not be done as its being written by all the replicas
|
||||||
|
depends_on:
|
||||||
|
- bootstrap
|
||||||
|
'''
|
||||||
|
|
||||||
|
fname = "docker-compose.yml"
|
||||||
|
f = open(fname, "w")
|
||||||
|
f.write(base)
|
||||||
|
|
||||||
|
for i in range(1, 20+1):
|
||||||
|
my_copy= nwaku.replace("INDEX", str(i))
|
||||||
|
f.write(my_copy)
|
||||||
|
f.close()
|
||||||
|
print("done writting to:", fname)
|
||||||
Loading…
x
Reference in New Issue
Block a user