From 21b75b8930f3a4394da5c2333908f0054159777d Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Tue, 10 Jan 2023 10:21:42 +0300 Subject: [PATCH] no-grafana-startup-delay option in run.sh (#1751) --- deployments/monitoring/docker-compose.yml | 2 +- deployments/run.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deployments/monitoring/docker-compose.yml b/deployments/monitoring/docker-compose.yml index 05209041d13b..4f7d958da4a8 100644 --- a/deployments/monitoring/docker-compose.yml +++ b/deployments/monitoring/docker-compose.yml @@ -22,7 +22,7 @@ services: - prometheus-metrics # SIGTERM won't work because of our custom entrypoint. Should be ok to use SIGKILL. stop_signal: SIGKILL - entrypoint: sh -c "echo 'sleeping for 10m' && sleep 600 && /run.sh" + entrypoint: sh -c "${NO_GRAFANA_STARTUP_DELAY:-echo 'sleeping for 10m' && sleep 600} && /run.sh" grafana-matrix-notifier: build: diff --git a/deployments/run.sh b/deployments/run.sh index bbae47331767..a2a1900c1f03 100755 --- a/deployments/run.sh +++ b/deployments/run.sh @@ -43,6 +43,7 @@ function show_help () { echo " --local-rialto Use prebuilt local/rialto-bridge-node image when starting nodes" echo " --local-rialto-parachain Use prebuilt local/rialto-parachain-collator image when starting nodes" echo " --local-millau Use prebuilt local/millau-bridge-node image when starting nodes" + echo " --no-grafana-startup-delay Start Grafana without any delay (you may see some false alerts during startup)" echo " " echo "You can start multiple bridges at once by passing several bridge names:" echo " ./run.sh rialto-millau rialto-parachain-millau westend-millau [stop|update]" @@ -81,6 +82,7 @@ do export RIALTO_BRIDGE_NODE_IMAGE=local/rialto-bridge-node export RIALTO_PARACHAIN_COLLATOR_IMAGE=local/rialto-parachain-collator export MILLAU_BRIDGE_NODE_IMAGE=local/millau-bridge-node + export IMMEDIATE_ shift continue ;; @@ -104,6 +106,11 @@ do shift continue ;; + --no-grafana-startup-delay) + export NO_GRAFANA_STARTUP_DELAY="echo 'No Grafana startup delay'" + shift + continue + ;; everything|all) BRIDGES=(${RIALTO_MILLAU:-} ${RIALTO_PARACHAIN_MILLAU:-} ${WESTEND_MILLAU:-}) NETWORKS="${RIALTO:-} ${RIALTO_PARACHAIN:-} ${MILLAU:-}"