From decb0db24d89f4f9d0df0b02d65cd7a07504e4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 14:50:09 +0100 Subject: [PATCH 01/28] initial version of Dockerfile for synthetic network aleph-node --- docker/Dockerfile.synthetic_network | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docker/Dockerfile.synthetic_network diff --git a/docker/Dockerfile.synthetic_network b/docker/Dockerfile.synthetic_network new file mode 100644 index 0000000000..a8c8550155 --- /dev/null +++ b/docker/Dockerfile.synthetic_network @@ -0,0 +1,11 @@ +FROM aleph-node:latest as binary-image + +FROM syntheticnet:latest + +RUN apt update && \ + apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver -y + +COPY --from=binary-image /usr/local/bin/aleph-node /usr/local/bin/ +COPY --from=binary-image /node/docker_entrypoint.sh /node/ + +ENV ENTRY="/node/docker_entrypoint.sh" From 437921d016532823138064cc58e9713248420bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 16:50:34 +0100 Subject: [PATCH 02/28] working synthetic-network --- docker/Dockerfile.synthetic_network | 2 +- docker/docker-compose.synthetic-network.yml | 72 +++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 docker/docker-compose.synthetic-network.yml diff --git a/docker/Dockerfile.synthetic_network b/docker/Dockerfile.synthetic_network index a8c8550155..004c605da6 100644 --- a/docker/Dockerfile.synthetic_network +++ b/docker/Dockerfile.synthetic_network @@ -3,7 +3,7 @@ FROM aleph-node:latest as binary-image FROM syntheticnet:latest RUN apt update && \ - apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver -y + apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver stress -y COPY --from=binary-image /usr/local/bin/aleph-node /usr/local/bin/ COPY --from=binary-image /node/docker_entrypoint.sh /node/ diff --git a/docker/docker-compose.synthetic-network.yml b/docker/docker-compose.synthetic-network.yml new file mode 100644 index 0000000000..9388580856 --- /dev/null +++ b/docker/docker-compose.synthetic-network.yml @@ -0,0 +1,72 @@ +services: + Node0: + image: aleph-node:syntheticnet + networks: + - synthetic-network + cap_add: + - NET_ADMIN + - NET_RAW + - SYS_PTRACE + environment: + - SYNTHETIC_NETWORK=10.77.0.0/16 + ports: + - 3000:80 + + Node1: + image: aleph-node:syntheticnet + networks: + - synthetic-network + cap_add: + - NET_ADMIN + - NET_RAW + - SYS_PTRACE + environment: + - SYNTHETIC_NETWORK=10.77.0.0/16 + ports: + - 3001:80 + + Node2: + image: aleph-node:syntheticnet + networks: + - synthetic-network + cap_add: + - NET_ADMIN + - NET_RAW + - SYS_PTRACE + environment: + - SYNTHETIC_NETWORK=10.77.0.0/16 + ports: + - 3002:80 + + Node3: + image: aleph-node:syntheticnet + networks: + - synthetic-network + cap_add: + - NET_ADMIN + - NET_RAW + - SYS_PTRACE + environment: + - SYNTHETIC_NETWORK=10.77.0.0/16 + ports: + - 3003:80 + + Node4: + image: aleph-node:syntheticnet + networks: + - synthetic-network + cap_add: + - NET_ADMIN + - NET_RAW + - SYS_PTRACE + environment: + - SYNTHETIC_NETWORK=10.77.0.0/16 + ports: + - 3004:80 + +networks: + synthetic-network: + ipam: + config: + - subnet: 10.77.0.0/16 + From 511e1212c78015f78d1eb9f95d6ae55bbfd9de2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 17:56:29 +0100 Subject: [PATCH 03/28] build script for aleph-node:synthetic-network --- scripts/build_synthetic-network.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 scripts/build_synthetic-network.sh diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh new file mode 100644 index 0000000000..85bdc2a08a --- /dev/null +++ b/scripts/build_synthetic-network.sh @@ -0,0 +1,26 @@ +#!/bin/env bash + +set -euo pipefail + +source ./scripts/common.sh + +GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} + +TMPDIR=$(mktemp -d --tmpdir=.) +log "created a temporary folder at $TMPDIR" + +pushd . + +cd $TMPDIR +git clone https://github.com/daily-co/synthetic-network.git +cd synthetic-network +git checkout $GIT_COMMIT +sed -i 's/FROM node:12.20.2/FROM node:19.2/' Dockerfile + +log "building base docker image for synthetic-network with support for synthetic-network" +docker build -t syntheticnet . + +popd + +log "building docker image for aleph-node with support for synthetic-network" +docker build -t aleph-node:syntheticnet -f docker/Dockerfile.synthetic_network . From fae6256c590a35e618276010c7131d0e84e51381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 18:49:02 +0100 Subject: [PATCH 04/28] added script for running synthetic-network --- scripts/build_synthetic-network.sh | 6 ++- scripts/common.sh | 2 +- scripts/run_consensus_synthetic-network.sh | 56 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 scripts/run_consensus_synthetic-network.sh diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh index 85bdc2a08a..d53e20fd6b 100644 --- a/scripts/build_synthetic-network.sh +++ b/scripts/build_synthetic-network.sh @@ -21,6 +21,10 @@ log "building base docker image for synthetic-network with support for synthetic docker build -t syntheticnet . popd +log "removing temporary folder $TMPDIR" +rm -rf $TMPDIR -log "building docker image for aleph-node with support for synthetic-network" +log "building docker image for aleph-node that supports synthetic-network" docker build -t aleph-node:syntheticnet -f docker/Dockerfile.synthetic_network . + +exit 0 diff --git a/scripts/common.sh b/scripts/common.sh index 7e575d265b..9df43ce744 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -103,7 +103,7 @@ function get_last_block() { local validator=$1 local rpc_port=$2 - local last_block=0 + local last_block="" while [[ -z "$last_block" ]]; do last_block=$(retrieve_last_block $validator $rpc_port) sleep 1 diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh new file mode 100644 index 0000000000..c32eeedefa --- /dev/null +++ b/scripts/run_consensus_synthetic-network.sh @@ -0,0 +1,56 @@ +#!/bin/env bash + +set -euo pipefail + +source ./scripts/common.sh + +function usage(){ + cat << EOF +Usage: + $0 + --no-build-image + skip docker image build + --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 + commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5 +EOF + exit 0 +} + +function build_test_image() { + local commit=$1 + + GIT_COMMIT=$commit ./scripts/build_synthetic-network.sh +} + +while [[ $# -gt 0 ]]; do + case $1 in + --no-build-image) + BUILD_IMAGE=false + shift + ;; + --commit) + GIT_COMMIT="$2" + shift;shift + ;; + --help) + usage + shift + ;; + *) + error "Unrecognized argument $1!" + ;; + esac +done + +BUILD_IMAGE=${BUILD_IMAGE:-true} +GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} + +if [[ "$BUILD_IMAGE" = true ]]; then + log "building custom docker image for synthetic-network tests" + build_test_image $GIT_COMMIT +fi + +log "running synthetic-network" +OVERRIDE_DOCKER_COMPOSE=./docker/docker-compose.synthetic-network.yml DOCKER_COMPOSE=./docker/docker-compose.bridged.yml ./.github/scripts/run_consensus.sh + +exit 0 From 6b2f12540162d6216a70fdaf0e0a40f9d059c105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 20:41:37 +0100 Subject: [PATCH 05/28] added descriptive log line to run-synthetic-network --- scripts/run_consensus_synthetic-network.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh index c32eeedefa..34d664ac3a 100644 --- a/scripts/run_consensus_synthetic-network.sh +++ b/scripts/run_consensus_synthetic-network.sh @@ -52,5 +52,6 @@ fi log "running synthetic-network" OVERRIDE_DOCKER_COMPOSE=./docker/docker-compose.synthetic-network.yml DOCKER_COMPOSE=./docker/docker-compose.bridged.yml ./.github/scripts/run_consensus.sh +log "open a web browser at http://localhost:3000 (port 3000 is Node0, 3001 is Node1, ...)" exit 0 From c3b46ada0e4b0d4bd45a60466df2f9bceb05d6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 20:59:43 +0100 Subject: [PATCH 06/28] extended `help` of run_consensus_synthetic-network.sh --- scripts/run_consensus_synthetic-network.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh index 34d664ac3a..ab1d824150 100644 --- a/scripts/run_consensus_synthetic-network.sh +++ b/scripts/run_consensus_synthetic-network.sh @@ -8,6 +8,10 @@ function usage(){ cat << EOF Usage: $0 + This script allows you to run aleph-node within docker and simulate some custom network conditions, e.g. delays, rate limit, + package loss. Additionally, each node is preinstalled with the 'stress' tool, that allows to simulate high occupancy of nodes + cpu and io. It should allow us test more realistic high volume network conditions without the need to spawn hundreds of + aws instances. For more details on networking part of this solution, visit https://github.com/daily-co/synthetic-network . --no-build-image skip docker image build --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 From 61b5ec533f280b4406baf67b4515cb7f48f88d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 22:15:36 +0100 Subject: [PATCH 07/28] refactored build_synthetic-network... --- scripts/build_synthetic-network.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh index d53e20fd6b..56308a1a32 100644 --- a/scripts/build_synthetic-network.sh +++ b/scripts/build_synthetic-network.sh @@ -6,23 +6,26 @@ source ./scripts/common.sh GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} -TMPDIR=$(mktemp -d --tmpdir=.) +TMPDIR="$(dirname $0)/vendor" +mkdir -p $TMPDIR log "created a temporary folder at $TMPDIR" pushd . +log "cloning synthetic-network's git repo" cd $TMPDIR -git clone https://github.com/daily-co/synthetic-network.git +if [[ -f ./synthetic-network ]]; then + git clone https://github.com/daily-co/synthetic-network.git +fi cd synthetic-network +git fetch origin git checkout $GIT_COMMIT -sed -i 's/FROM node:12.20.2/FROM node:19.2/' Dockerfile log "building base docker image for synthetic-network with support for synthetic-network" +sed -i 's/FROM node:12.20.2/FROM node:19.2/' Dockerfile docker build -t syntheticnet . popd -log "removing temporary folder $TMPDIR" -rm -rf $TMPDIR log "building docker image for aleph-node that supports synthetic-network" docker build -t aleph-node:syntheticnet -f docker/Dockerfile.synthetic_network . From 75abb858212810aeed9c22306158f473254008dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Mon, 5 Dec 2022 22:16:01 +0100 Subject: [PATCH 08/28] added script for running scripts for synthetic-network --- scripts/run_script_for_synthetic-network.sh | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/run_script_for_synthetic-network.sh diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh new file mode 100644 index 0000000000..9a1dac5785 --- /dev/null +++ b/scripts/run_script_for_synthetic-network.sh @@ -0,0 +1,29 @@ +#!/bin/env bash + +set -euo pipefail + +source ./scripts/common.sh + +GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} +SCRIPT_PATH=${SCRIPT_PATH:-scripts/synthetic-network.js} +SCRIPT_PATH=$(realpath $SCRIPT_PATH) + +TMPDIR="$(dirname $0)/vendor" +mkdir -p $TMPDIR +log "created a temporary folder at $TMPDIR" + +log "cloning synthetic-network's git repo" +cd $TMPDIR +if [[ -f ./synthetic-network ]]; then + git clone https://github.com/daily-co/synthetic-network.git +fi +cd synthetic-network +git fetch origin +git checkout $GIT_COMMIT +cd frontend + +log "running .js script" +cp $SCRIPT_PATH ./ +node $(basename $SCRIPT_PATH) + +exit 0 From afb69698f8871f21d6ff10423eb546ed0eebf9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 10:10:14 +0100 Subject: [PATCH 09/28] refactored synthetic-network scripts --- scripts/build_synthetic-network.sh | 2 +- scripts/run_consensus_synthetic-network.sh | 1 + scripts/run_script_for_synthetic-network.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh index 56308a1a32..c4a16a7f51 100644 --- a/scripts/build_synthetic-network.sh +++ b/scripts/build_synthetic-network.sh @@ -14,7 +14,7 @@ pushd . log "cloning synthetic-network's git repo" cd $TMPDIR -if [[ -f ./synthetic-network ]]; then +if [[ ! -d ./synthetic-network ]]; then git clone https://github.com/daily-co/synthetic-network.git fi cd synthetic-network diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh index ab1d824150..d4a7539d7b 100644 --- a/scripts/run_consensus_synthetic-network.sh +++ b/scripts/run_consensus_synthetic-network.sh @@ -57,5 +57,6 @@ fi log "running synthetic-network" OVERRIDE_DOCKER_COMPOSE=./docker/docker-compose.synthetic-network.yml DOCKER_COMPOSE=./docker/docker-compose.bridged.yml ./.github/scripts/run_consensus.sh log "open a web browser at http://localhost:3000 (port 3000 is Node0, 3001 is Node1, ...)" +xdg-open http://localhost:3000 exit 0 diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh index 9a1dac5785..2024043784 100644 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -14,7 +14,7 @@ log "created a temporary folder at $TMPDIR" log "cloning synthetic-network's git repo" cd $TMPDIR -if [[ -f ./synthetic-network ]]; then +if [[ ! -d ./synthetic-network ]]; then git clone https://github.com/daily-co/synthetic-network.git fi cd synthetic-network From f61ae0a961d24a316cc243c9988d3854ca358f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 10:20:24 +0100 Subject: [PATCH 10/28] refactored run_script_for_synthetic-network.sh --- scripts/run_script_for_synthetic-network.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh index 2024043784..43050c6473 100644 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -5,7 +5,7 @@ set -euo pipefail source ./scripts/common.sh GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} -SCRIPT_PATH=${SCRIPT_PATH:-scripts/synthetic-network.js} +SCRIPT_PATH=${SCRIPT_PATH:-scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js} SCRIPT_PATH=$(realpath $SCRIPT_PATH) TMPDIR="$(dirname $0)/vendor" @@ -23,7 +23,7 @@ git checkout $GIT_COMMIT cd frontend log "running .js script" -cp $SCRIPT_PATH ./ -node $(basename $SCRIPT_PATH) +cp $SCRIPT_PATH ./script.js +node script.js exit 0 From f4c7e866f652545c0cc01f715d943d39c31baeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 10:28:36 +0100 Subject: [PATCH 11/28] refactored run_script_for_synthetic-network.sh: added help and args --- scripts/run_script_for_synthetic-network.sh | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh index 43050c6473..04ff310b02 100644 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -4,6 +4,40 @@ set -euo pipefail source ./scripts/common.sh +function usage(){ + cat << EOF +Usage: + $0 + This script allows you to run a custom .js script using the synthetic-network network simulation tool. + --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 + commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5 + --script-path scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js + path to a synthetic-network scrypt. Default is a demo scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js + from the synthetic-network repo. Please consult synthetic-network repo for details: https://github.com/daily-co/synthetic-network +EOF + exit 0 +} + +while [[ $# -gt 0 ]]; do + case $1 in + --commit) + GIT_COMMIT="$2" + shift;shift + ;; + --script-path) + SCRIPT_PATH="$2" + shift;shift + ;; + --help) + usage + shift + ;; + *) + error "Unrecognized argument $1!" + ;; + esac +done + GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} SCRIPT_PATH=${SCRIPT_PATH:-scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js} SCRIPT_PATH=$(realpath $SCRIPT_PATH) From bc5d27f024e66184a31828fa46af7672b4c411d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 10:39:13 +0100 Subject: [PATCH 12/28] added description to patching step in build-synthetic-network script --- scripts/build_synthetic-network.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh index c4a16a7f51..ddb803829c 100644 --- a/scripts/build_synthetic-network.sh +++ b/scripts/build_synthetic-network.sh @@ -22,6 +22,8 @@ git fetch origin git checkout $GIT_COMMIT log "building base docker image for synthetic-network with support for synthetic-network" +log "patching synthetic network" +# aleph-node crashes since it uses newer glibc than this image sed -i 's/FROM node:12.20.2/FROM node:19.2/' Dockerfile docker build -t syntheticnet . From d607f6a3ab638f6307b221ad8de8393fd5728c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 10:41:39 +0100 Subject: [PATCH 13/28] added description about aleph-node:latest docker image requirement in run_consensus_synthetic-network.sh --- scripts/run_consensus_synthetic-network.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh index d4a7539d7b..67e486eaa5 100644 --- a/scripts/run_consensus_synthetic-network.sh +++ b/scripts/run_consensus_synthetic-network.sh @@ -12,6 +12,7 @@ Usage: package loss. Additionally, each node is preinstalled with the 'stress' tool, that allows to simulate high occupancy of nodes cpu and io. It should allow us test more realistic high volume network conditions without the need to spawn hundreds of aws instances. For more details on networking part of this solution, visit https://github.com/daily-co/synthetic-network . + IMPORTANT: this script requires aleph-node:latest docker image. --no-build-image skip docker image build --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 From e6cbc9ab2afd6463402f7ffc9278899a0fffeb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 12:34:44 +0100 Subject: [PATCH 14/28] reformated Dockerfile.synthetic-network --- docker/Dockerfile.synthetic_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.synthetic_network b/docker/Dockerfile.synthetic_network index 004c605da6..99f28d513d 100644 --- a/docker/Dockerfile.synthetic_network +++ b/docker/Dockerfile.synthetic_network @@ -3,7 +3,7 @@ FROM aleph-node:latest as binary-image FROM syntheticnet:latest RUN apt update && \ - apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver stress -y + apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver stress -y COPY --from=binary-image /usr/local/bin/aleph-node /usr/local/bin/ COPY --from=binary-image /node/docker_entrypoint.sh /node/ From 065dc6fb48eb8213238eb4b12d0070d1c15dd7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Tue, 6 Dec 2022 15:38:00 +0100 Subject: [PATCH 15/28] added PREREQ to run_script_for_synthetic-network.sh --- scripts/run_script_for_synthetic-network.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh index 04ff310b02..d3bdda064f 100644 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -9,6 +9,8 @@ function usage(){ Usage: $0 This script allows you to run a custom .js script using the synthetic-network network simulation tool. + IMPORTANT: first you need to call 'scripts/run_consensus_synthetic-network.sh' and let it run in background. + It spawns docker-compose configured with synthetic-network. --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5 --script-path scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js From b74c4306607bcf2f989522939461ef396b1aa050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 10:39:01 +0100 Subject: [PATCH 16/28] +x on synthetic-network scripts --- scripts/build_synthetic-network.sh | 0 scripts/run_consensus_synthetic-network.sh | 0 scripts/run_script_for_synthetic-network.sh | 3 +-- 3 files changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 scripts/build_synthetic-network.sh mode change 100644 => 100755 scripts/run_consensus_synthetic-network.sh mode change 100644 => 100755 scripts/run_script_for_synthetic-network.sh diff --git a/scripts/build_synthetic-network.sh b/scripts/build_synthetic-network.sh old mode 100644 new mode 100755 diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh old mode 100644 new mode 100755 diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh old mode 100644 new mode 100755 index d3bdda064f..9ff7460a51 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -59,7 +59,6 @@ git checkout $GIT_COMMIT cd frontend log "running .js script" -cp $SCRIPT_PATH ./script.js -node script.js +node $SCRIPT_PATH exit 0 From b8f6e5863103282ca7631d43bc39190c7a89264a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 10:45:52 +0100 Subject: [PATCH 17/28] added note about node.js in run_script_for_synthetic-network.sh --- scripts/run_script_for_synthetic-network.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/run_script_for_synthetic-network.sh index 9ff7460a51..12a0e363e4 100755 --- a/scripts/run_script_for_synthetic-network.sh +++ b/scripts/run_script_for_synthetic-network.sh @@ -11,6 +11,7 @@ Usage: This script allows you to run a custom .js script using the synthetic-network network simulation tool. IMPORTANT: first you need to call 'scripts/run_consensus_synthetic-network.sh' and let it run in background. It spawns docker-compose configured with synthetic-network. + It requires node.js to run. --commit 72bbb4fde915e4132c19cd7ce3605364abac58a5 commit hash used to build synthetic-network, default is 72bbb4fde915e4132c19cd7ce3605364abac58a5 --script-path scripts/vendor/synthetic-network/frontend/udp_rate_sine_demo.js From fdaaed1c8f7666eff88e2b3e3d25e569e5ea0e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 15:13:42 +0100 Subject: [PATCH 18/28] more robust Dockerfile.synthetic_network --- docker/Dockerfile.synthetic_network | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile.synthetic_network b/docker/Dockerfile.synthetic_network index 99f28d513d..7b67c65c6b 100644 --- a/docker/Dockerfile.synthetic_network +++ b/docker/Dockerfile.synthetic_network @@ -1,11 +1,13 @@ -FROM aleph-node:latest as binary-image +FROM syntheticnet:latest as synthnet -FROM syntheticnet:latest +FROM aleph-node:latest +# Linux networking tools and node.js RUN apt update && \ - apt install curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver stress -y - -COPY --from=binary-image /usr/local/bin/aleph-node /usr/local/bin/ -COPY --from=binary-image /node/docker_entrypoint.sh /node/ + apt install nodejs curl iproute2 iputils-ping net-tools netwox tcpdump gdb gdbserver stress -y +COPY --from=synthnet /opt/lib/ /opt/lib/ +WORKDIR /opt/lib +ENTRYPOINT [] ENV ENTRY="/node/docker_entrypoint.sh" +CMD ["/opt/lib/setup.sh"] \ No newline at end of file From e1b57184942cc4338b90e02b0e78971fee81cf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 16:38:56 +0100 Subject: [PATCH 19/28] FIX: docker-compose for synthetic-network was using two seperate networks and somehow libp2p was using the other one, not controlled by us --- docker/docker-compose.synthetic-network.yml | 24 +++++++++++++++++++++ scripts/run_consensus_synthetic-network.sh | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.synthetic-network.yml b/docker/docker-compose.synthetic-network.yml index 9388580856..a9438eddaa 100644 --- a/docker/docker-compose.synthetic-network.yml +++ b/docker/docker-compose.synthetic-network.yml @@ -1,5 +1,8 @@ services: Node0: + extends: + file: docker-compose.base.yml + service: Node0 image: aleph-node:syntheticnet networks: - synthetic-network @@ -9,10 +12,14 @@ services: - SYS_PTRACE environment: - SYNTHETIC_NETWORK=10.77.0.0/16 + - PUBLIC_VALIDATOR_ADDRESS=Node0:30343 ports: - 3000:80 Node1: + extends: + file: docker-compose.base.yml + service: Node1 image: aleph-node:syntheticnet networks: - synthetic-network @@ -22,10 +29,15 @@ services: - SYS_PTRACE environment: - SYNTHETIC_NETWORK=10.77.0.0/16 + - PUBLIC_VALIDATOR_ADDRESS=Node1:30344 + - BOOT_NODES=/dns4/Node0/tcp/30333/p2p/$BOOTNODE_PEER_ID ports: - 3001:80 Node2: + extends: + file: docker-compose.base.yml + service: Node2 image: aleph-node:syntheticnet networks: - synthetic-network @@ -35,10 +47,15 @@ services: - SYS_PTRACE environment: - SYNTHETIC_NETWORK=10.77.0.0/16 + - PUBLIC_VALIDATOR_ADDRESS=Node2:30345 + - BOOT_NODES=/dns4/Node0/tcp/30333/p2p/$BOOTNODE_PEER_ID ports: - 3002:80 Node3: + extends: + file: docker-compose.base.yml + service: Node3 image: aleph-node:syntheticnet networks: - synthetic-network @@ -48,10 +65,15 @@ services: - SYS_PTRACE environment: - SYNTHETIC_NETWORK=10.77.0.0/16 + - PUBLIC_VALIDATOR_ADDRESS=Node3:30346 + - BOOT_NODES=/dns4/Node0/tcp/30333/p2p/$BOOTNODE_PEER_ID ports: - 3003:80 Node4: + extends: + file: docker-compose.base.yml + service: Node4 image: aleph-node:syntheticnet networks: - synthetic-network @@ -61,6 +83,8 @@ services: - SYS_PTRACE environment: - SYNTHETIC_NETWORK=10.77.0.0/16 + - PUBLIC_VALIDATOR_ADDRESS=Node4:30347 + - BOOT_NODES=/dns4/Node0/tcp/30333/p2p/$BOOTNODE_PEER_ID ports: - 3004:80 diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/run_consensus_synthetic-network.sh index 67e486eaa5..3ebd19bf08 100755 --- a/scripts/run_consensus_synthetic-network.sh +++ b/scripts/run_consensus_synthetic-network.sh @@ -56,7 +56,7 @@ if [[ "$BUILD_IMAGE" = true ]]; then fi log "running synthetic-network" -OVERRIDE_DOCKER_COMPOSE=./docker/docker-compose.synthetic-network.yml DOCKER_COMPOSE=./docker/docker-compose.bridged.yml ./.github/scripts/run_consensus.sh +DOCKER_COMPOSE=./docker/docker-compose.synthetic-network.yml ./.github/scripts/run_consensus.sh log "open a web browser at http://localhost:3000 (port 3000 is Node0, 3001 is Node1, ...)" xdg-open http://localhost:3000 From 20ffabc75a3f2f6414e1cd6782d065bcb48dfb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 18:36:08 +0100 Subject: [PATCH 20/28] added a shell script allowing to reset to default settings a node within synthetic-network --- scripts/set_defaults_synthetic-network.sh | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 scripts/set_defaults_synthetic-network.sh diff --git a/scripts/set_defaults_synthetic-network.sh b/scripts/set_defaults_synthetic-network.sh new file mode 100644 index 0000000000..d51e180bde --- /dev/null +++ b/scripts/set_defaults_synthetic-network.sh @@ -0,0 +1,89 @@ +#!/bin/env bash + +set -euo pipefail + +source ./scripts/common.sh + +function usage() { + cat << EOF +Usage: + $0 + This scripts sets network settings for the synthetic-network to some sane defaults. + + --node Node0 + name of the docker container where this script should be executed, default is 'Node1' +EOF + exit 0 +} + +while [[ $# -gt 0 ]]; do + case $1 in + --node) + NODE="$2" + shift;shift + ;; + --help) + usage + shift + ;; + *) + error "Unrecognized argument $1!" + ;; + esac +done + +NODE=${NODE:-Node0} + +docker exec $NODE curl -H "Content-Type: application/json" \ +-d \ +'{ + "default_link": { + "ingress": { + "rate": 27800000, + "loss": 0, + "latency": 0, + "jitter": 0, + "jitter_strength": 0, + "reorder_packets": false + }, + "egress": { + "rate": 1000000, + "loss": 0, + "latency": 0, + "jitter": 0, + "jitter_strength": 0, + "reorder_packets": false + } + }, + "flows": [ + { + "label": "http", + "flow": { + "ip": 0, + "protocol": 6, + "port_min": 80, + "port_max": 80 + }, + "link": { + "ingress": { + "rate": 96500000, + "loss": 0, + "latency": 0, + "jitter": 0, + "jitter_strength": 0, + "reorder_packets": false + }, + "egress": { + "rate": 96500000, + "loss": 0, + "latency": 0, + "jitter": 0, + "jitter_strength": 0, + "reorder_packets": false + } + } + } + ] +}' http://localhost:80/qos + +exit 0 From 4e095f19729468728ce7f997e849f99a2b2cd4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 18:42:48 +0100 Subject: [PATCH 21/28] moved scripts for synthetic-network --- .../{ => synthetic-network_scripts}/build_synthetic-network.sh | 0 .../run_consensus_synthetic-network.sh | 0 .../run_script_for_synthetic-network.sh | 0 .../set_defaults_synthetic-network.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename scripts/{ => synthetic-network_scripts}/build_synthetic-network.sh (100%) rename scripts/{ => synthetic-network_scripts}/run_consensus_synthetic-network.sh (100%) rename scripts/{ => synthetic-network_scripts}/run_script_for_synthetic-network.sh (100%) rename scripts/{ => synthetic-network_scripts}/set_defaults_synthetic-network.sh (100%) diff --git a/scripts/build_synthetic-network.sh b/scripts/synthetic-network_scripts/build_synthetic-network.sh similarity index 100% rename from scripts/build_synthetic-network.sh rename to scripts/synthetic-network_scripts/build_synthetic-network.sh diff --git a/scripts/run_consensus_synthetic-network.sh b/scripts/synthetic-network_scripts/run_consensus_synthetic-network.sh similarity index 100% rename from scripts/run_consensus_synthetic-network.sh rename to scripts/synthetic-network_scripts/run_consensus_synthetic-network.sh diff --git a/scripts/run_script_for_synthetic-network.sh b/scripts/synthetic-network_scripts/run_script_for_synthetic-network.sh similarity index 100% rename from scripts/run_script_for_synthetic-network.sh rename to scripts/synthetic-network_scripts/run_script_for_synthetic-network.sh diff --git a/scripts/set_defaults_synthetic-network.sh b/scripts/synthetic-network_scripts/set_defaults_synthetic-network.sh similarity index 100% rename from scripts/set_defaults_synthetic-network.sh rename to scripts/synthetic-network_scripts/set_defaults_synthetic-network.sh From 0bc6cf90e0dc62f7ac8dae756c4bdc9202783ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 18:43:11 +0100 Subject: [PATCH 22/28] example .js script for synthetic-network --- scripts/synthetic-network_scripts/latency.js | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/synthetic-network_scripts/latency.js diff --git a/scripts/synthetic-network_scripts/latency.js b/scripts/synthetic-network_scripts/latency.js new file mode 100644 index 0000000000..fb34459479 --- /dev/null +++ b/scripts/synthetic-network_scripts/latency.js @@ -0,0 +1,22 @@ +const argv = require('node:process').argv; +const inLatency = argv.length <= 2 ? 0 : argv.at(2); +const outLatency = argv.length <= 3 ? 0 : argv.at(3); +console.log("setting in-latency to", inLatency); +console.log("setting out-latency to", outLatency); + +const SyntheticNetwork = require('../vendor/synthetic-network/frontend'); + +async function setLatency(host, port, inLatency, outLatency) { + const synthnet = new SyntheticNetwork({ hostname: host, port: port }); + synthnet.default_link.egress.latency(outLatency); + synthnet.default_link.ingress.latency(inLatency); + await synthnet.commit(); +} + +async function run(inLatency, outLatency) { + for (let it = 0; it < 5; it++) { + await setLatency('localhost', 3000 + it, inLatency, outLatency); + } +} + +run(inLatency, outLatency); From 0ec5a40f06f8cb4c16fa6f77847c7b3faba94399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 18:55:16 +0100 Subject: [PATCH 23/28] moved synthetic-network scripts --- .../build_synthetic-network.sh | 0 .../{synthetic-network_scripts => synthetic-network}/latency.js | 0 .../run_consensus_synthetic-network.sh | 0 .../run_script_for_synthetic-network.sh | 0 .../set_defaults_synthetic-network.sh | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename scripts/{synthetic-network_scripts => synthetic-network}/build_synthetic-network.sh (100%) rename scripts/{synthetic-network_scripts => synthetic-network}/latency.js (100%) rename scripts/{synthetic-network_scripts => synthetic-network}/run_consensus_synthetic-network.sh (100%) rename scripts/{synthetic-network_scripts => synthetic-network}/run_script_for_synthetic-network.sh (100%) rename scripts/{synthetic-network_scripts => synthetic-network}/set_defaults_synthetic-network.sh (100%) diff --git a/scripts/synthetic-network_scripts/build_synthetic-network.sh b/scripts/synthetic-network/build_synthetic-network.sh similarity index 100% rename from scripts/synthetic-network_scripts/build_synthetic-network.sh rename to scripts/synthetic-network/build_synthetic-network.sh diff --git a/scripts/synthetic-network_scripts/latency.js b/scripts/synthetic-network/latency.js similarity index 100% rename from scripts/synthetic-network_scripts/latency.js rename to scripts/synthetic-network/latency.js diff --git a/scripts/synthetic-network_scripts/run_consensus_synthetic-network.sh b/scripts/synthetic-network/run_consensus_synthetic-network.sh similarity index 100% rename from scripts/synthetic-network_scripts/run_consensus_synthetic-network.sh rename to scripts/synthetic-network/run_consensus_synthetic-network.sh diff --git a/scripts/synthetic-network_scripts/run_script_for_synthetic-network.sh b/scripts/synthetic-network/run_script_for_synthetic-network.sh similarity index 100% rename from scripts/synthetic-network_scripts/run_script_for_synthetic-network.sh rename to scripts/synthetic-network/run_script_for_synthetic-network.sh diff --git a/scripts/synthetic-network_scripts/set_defaults_synthetic-network.sh b/scripts/synthetic-network/set_defaults_synthetic-network.sh similarity index 100% rename from scripts/synthetic-network_scripts/set_defaults_synthetic-network.sh rename to scripts/synthetic-network/set_defaults_synthetic-network.sh From 7024beb0b90350564bf2749be4560ab3fa0e04aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 19:13:53 +0100 Subject: [PATCH 24/28] added README.md for synthetic-network --- scripts/synthetic-network/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/synthetic-network/README.md diff --git a/scripts/synthetic-network/README.md b/scripts/synthetic-network/README.md new file mode 100644 index 0000000000..25d7b941cc --- /dev/null +++ b/scripts/synthetic-network/README.md @@ -0,0 +1,21 @@ +# synthetic-network + +This folder contains various scripts that allows to spawn and interact with `aleph-node` executed within a so called +synthetic-network. synthetic-network is a tool for docker that allows you to simulate different network conditions, like +variable latency, rate limit, etc. Easiest way to manage parameters of a synthetic-network is to use its web-ui - after +executing `run_consensus_synthetic-network.sh` it should be available at http://localhost:3000 (each node has separate settings +page, i.e. :3001 is Node1, ...). + +# Content of this folder + +Main file in this folder is `run_consensus_synthetic-network.sh`. It builds a docker-image containing `aleph-node` and some +arbitrary set of networking and debugging tools. It also consist of files required to spawn an instance of the +synthetic-network. Its requirements are: docker, docker-compose, git, `aleph-node:latest` docker-image. + +`set_defaults_synthetic-network.sh` allows you to reset settings of the synthetic-network to some sane defaults. You might need +to use in case you set too restrictive values for some of its parameters, e.g. rate limit that make you unable to further +interact with its web-ui. + +Additionally, this folder contains an example .js script introducing API of the synthetic-network. You can use it by executing +`run_script_for_synthetic-network.sh --script-path ./latency.js`. + From 7799653bfe120714a05248c6aacd60bcb784aa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Wed, 7 Dec 2022 19:21:52 +0100 Subject: [PATCH 25/28] FIX: run_consensus_synthetic-network.sh after it was moved --- .../synthetic-network/run_consensus_synthetic-network.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/synthetic-network/run_consensus_synthetic-network.sh b/scripts/synthetic-network/run_consensus_synthetic-network.sh index 3ebd19bf08..9c66c4d0f4 100755 --- a/scripts/synthetic-network/run_consensus_synthetic-network.sh +++ b/scripts/synthetic-network/run_consensus_synthetic-network.sh @@ -23,8 +23,9 @@ EOF function build_test_image() { local commit=$1 + local path=$2 - GIT_COMMIT=$commit ./scripts/build_synthetic-network.sh + GIT_COMMIT=$commit ${path}/build_synthetic-network.sh } while [[ $# -gt 0 ]]; do @@ -52,7 +53,8 @@ GIT_COMMIT=${GIT_COMMIT:-72bbb4fde915e4132c19cd7ce3605364abac58a5} if [[ "$BUILD_IMAGE" = true ]]; then log "building custom docker image for synthetic-network tests" - build_test_image $GIT_COMMIT + path=$(dirname $0) + build_test_image $GIT_COMMIT $path fi log "running synthetic-network" From 75439c6fc3d59430baa911b67d4b51199cb9c360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Thu, 8 Dec 2022 00:01:23 +0100 Subject: [PATCH 26/28] passing args to invoked script in run_script_for_synthetic-network.sh --- scripts/synthetic-network/run_script_for_synthetic-network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/synthetic-network/run_script_for_synthetic-network.sh b/scripts/synthetic-network/run_script_for_synthetic-network.sh index 12a0e363e4..b8b44d98c3 100755 --- a/scripts/synthetic-network/run_script_for_synthetic-network.sh +++ b/scripts/synthetic-network/run_script_for_synthetic-network.sh @@ -36,7 +36,7 @@ while [[ $# -gt 0 ]]; do shift ;; *) - error "Unrecognized argument $1!" + break ;; esac done @@ -60,6 +60,6 @@ git checkout $GIT_COMMIT cd frontend log "running .js script" -node $SCRIPT_PATH +node $SCRIPT_PATH ${@:1} exit 0 From 943190e55b7e2e2ddda16a1c1c51916c3d9f1665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Thu, 8 Dec 2022 10:32:34 +0100 Subject: [PATCH 27/28] small change in README.md for synthetic-network --- scripts/synthetic-network/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/synthetic-network/README.md b/scripts/synthetic-network/README.md index 25d7b941cc..ce2897ea5a 100644 --- a/scripts/synthetic-network/README.md +++ b/scripts/synthetic-network/README.md @@ -13,7 +13,7 @@ arbitrary set of networking and debugging tools. It also consist of files requir synthetic-network. Its requirements are: docker, docker-compose, git, `aleph-node:latest` docker-image. `set_defaults_synthetic-network.sh` allows you to reset settings of the synthetic-network to some sane defaults. You might need -to use in case you set too restrictive values for some of its parameters, e.g. rate limit that make you unable to further +to use it when you set too restrictive values for some of its parameters, i.e. rate limit that make you unable to further interact with its web-ui. Additionally, this folder contains an example .js script introducing API of the synthetic-network. You can use it by executing From 3bbbad9788393ffec45716260537e651e69e94fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Lachowski?= Date: Thu, 8 Dec 2022 10:37:09 +0100 Subject: [PATCH 28/28] review changes for synthetic-network --- docker/Dockerfile.synthetic_network | 3 ++- scripts/synthetic-network/set_defaults_synthetic-network.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/synthetic-network/set_defaults_synthetic-network.sh diff --git a/docker/Dockerfile.synthetic_network b/docker/Dockerfile.synthetic_network index 7b67c65c6b..145b85762f 100644 --- a/docker/Dockerfile.synthetic_network +++ b/docker/Dockerfile.synthetic_network @@ -10,4 +10,5 @@ COPY --from=synthnet /opt/lib/ /opt/lib/ WORKDIR /opt/lib ENTRYPOINT [] ENV ENTRY="/node/docker_entrypoint.sh" -CMD ["/opt/lib/setup.sh"] \ No newline at end of file +CMD ["/opt/lib/setup.sh"] + diff --git a/scripts/synthetic-network/set_defaults_synthetic-network.sh b/scripts/synthetic-network/set_defaults_synthetic-network.sh old mode 100644 new mode 100755 index d51e180bde..767e700077 --- a/scripts/synthetic-network/set_defaults_synthetic-network.sh +++ b/scripts/synthetic-network/set_defaults_synthetic-network.sh @@ -11,7 +11,7 @@ Usage: This scripts sets network settings for the synthetic-network to some sane defaults. --node Node0 - name of the docker container where this script should be executed, default is 'Node1' + name of the docker container inside which this script should be executed, default is 'Node0' EOF exit 0 }