[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] branch master updated: -fix run script
From: |
gnunet |
Subject: |
[taler-grid5k] branch master updated: -fix run script |
Date: |
Thu, 12 May 2022 08:52:02 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository grid5k.
The following commit(s) were added to refs/heads/master by this push:
new 1022a4a -fix run script
1022a4a is described below
commit 1022a4ae384ad524de6b1b17afaf2e6e0382436a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu May 12 08:52:00 2022 +0200
-fix run script
---
additional/recover/run.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/additional/recover/run.sh b/additional/recover/run.sh
index bb0cfcb..80ed850 100755
--- a/additional/recover/run.sh
+++ b/additional/recover/run.sh
@@ -1,8 +1,15 @@
#!/bin/bash
-
+set -eu
# Script to run a local instance of grafana, loki and prometheus
# with a data (prometheus and loki) snapshot of an experiment
+function fail() {
+ echo "docker-compose needed"
+ exit 1
+}
+
+docker-compose version &> /dev/null || fail "need docker-compose"
+
if [[ -z ${1} ]]; then
echo "Usage: run.sh EXPERIMENT_ARCHIVE || EXPERIMENT_DATA_FOLDER"
exit 1
@@ -15,6 +22,9 @@ mkdir -p ${TMP_BASEDIR}
export LOKI_DATA="${TMP_BASEDIR}/loki"
export PROMETHEUS_DATA="${TMP_BASEDIR}/prometheus"
export DASHBOARDS_DIR="${TMP_BASEDIR}/dashboards"
+mkdir -p ${LOKI_DATA}
+mkdir -p ${PROMETHEUS_DATA}
+mkdir -p ${DASHBOARDS_DIR}
EXP_DATA=${1}
@@ -30,7 +40,6 @@ else
cp -r ${EXP_DATA} ${TMP_BASEDIR}
fi
-mkdir ${DASHBOARDS_DIR} || true
# load the times to adjust the grafana dashboards
source "${TMP_BASEDIR}/times.env"
@@ -74,7 +83,7 @@ trap ctrl_c INT
startup
while ! wget -q http://localhost:8080; do
- sleep 2
+ sleep 2 || exit 1
done
echo "Instances running, please head to http://localhost:8080"
xdg-open http://localhost:8080 || true
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.