diff options
author | Boss Marco <bossm8@bfh.ch> | 2022-04-23 20:31:38 +0200 |
---|---|---|
committer | Boss Marco <bossm8@bfh.ch> | 2022-04-23 20:31:38 +0200 |
commit | 8a52139a6ff996477c229d8d69ef9eea1c17c2cd (patch) | |
tree | a56b817e0461a5af736189c6c9c0ba344f45e412 | |
parent | cf28bd25cf3b6fa8fd5d92311849ba1f769a6b5c (diff) | |
download | grid5k-8a52139a6ff996477c229d8d69ef9eea1c17c2cd.tar.gz grid5k-8a52139a6ff996477c229d8d69ef9eea1c17c2cd.tar.bz2 grid5k-8a52139a6ff996477c229d8d69ef9eea1c17c2cd.zip |
rebuild on all nodes
-rwxr-xr-x | additional/persist.sh | 2 | ||||
-rwxr-xr-x | experiment/scripts/install.sh | 6 | ||||
-rw-r--r-- | experiment/scripts/taler-perf.sh | 32 |
3 files changed, 27 insertions, 13 deletions
diff --git a/additional/persist.sh b/additional/persist.sh index 49987fc..83448b9 100755 --- a/additional/persist.sh +++ b/additional/persist.sh @@ -84,7 +84,7 @@ function backup() { function delete() { echo "Cleaning up g5k storage" - ssh g5k 'rm grenoble/g5k.tar.gz && $(find . -type l -exec rm -rf {}/exp-logs/ {}/exp-data {}/espec-times \;)' & + ssh g5k 'rm grenoble/g5k.tar.gz || true && $(find . -type l -exec rm -rf {}/exp-logs/ {}/exp-data {}/espec-times \;)' & PID=$! while kill -0 $PID > /dev/null 2>&1; do diff --git a/experiment/scripts/install.sh b/experiment/scripts/install.sh index 74d535c..0f2e38f 100755 --- a/experiment/scripts/install.sh +++ b/experiment/scripts/install.sh @@ -11,6 +11,8 @@ Optionally, CFLAGS can be passed with: <LIBMICROHTTD|GNUNET|EXCHANGE|MERCHANT>_CFLAGS " + +set -e TALER_HOME=~/taler # Prepare the repository @@ -36,7 +38,7 @@ function build() { ./contrib/gana.sh fi CFLAGS="$1" ./configure --enable-logging=verbose --prefix=/usr || CFLAGS="$1" ./configure - make + make -j $(nproc) } # Install from a git repo @@ -47,7 +49,7 @@ function install_repo() { prepare_repo "$1" "$2" build "$3" echo "INFO installing" - make install_repo + make install ldconfig } diff --git a/experiment/scripts/taler-perf.sh b/experiment/scripts/taler-perf.sh index aec9b68..9e3340c 100644 --- a/experiment/scripts/taler-perf.sh +++ b/experiment/scripts/taler-perf.sh @@ -112,39 +112,39 @@ function rebuild() { while [[ $# -gt 0 ]]; do case "$1" in --libmicrohttpd|-m) - LIBMICROHTTPD_COMMIT_SHA=$2 + LIBMICROHTTPD_COMMIT_SHA="$2" shift 2 ;; --libmicro-cflags|-lc) - LIBMICROHTTPD_CFLAGS=$2 + LIBMICROHTTPD_CFLAGS="$2" shift 2 ;; --exchange|-e) - EXCHANGE_COMMIT_SHA=$2 + EXCHANGE_COMMIT_SHA="$2" shift 2 ;; --exch-cflags|-ec) - EXCHANGE_CFLAGS=$2 + EXCHANGE_CFLAGS="$2" shift 2 ;; --gnunet|-g) - GNUNET_COMMIT_SHA=$2 + GNUNET_COMMIT_SHA="$2" shift 2 ;; --gnunet-cflags|-gc) - GNUNET_CFLAGS=$2 + GNUNET_CFLAGS="$2" shift 2 ;; --wallet|-w) - WALLET_COMMIT_SHA=$2 + WALLET_COMMIT_SHA="$2" shift 2 ;; --merchant|-m) - MERCHANT_COMMIT_SHA=$2 + MERCHANT_COMMIT_SHA="$2" shift 2 ;; --merch-cflags|-mc) - MERCHANT_CFLAGS=$2 + MERCHANT_CFLAGS="$2" shift 2 ;; *) @@ -166,6 +166,14 @@ function rebuild() { exec ~/scripts/install.sh } +function rebuild_all() { + for NODE in $(dig -t AXFR ${DNS_ZONE} | grep "\<A\>" | awk 'print substr($1, 1, length($1)-1)}'); do + if [[ $NODE == $EXCHANGE_GW_DOMAIN ]]; then continue; fi + ssh ${NODE} "taler-perf build $(printf "%q " "$@")" & + done + wait +} + case "$1" in start) shift @@ -177,7 +185,11 @@ case "$1" in ;; rebuild) shift - rebuild + rebuild_all "$@" + ;; + build) + shift + rebuild "$@" ;; *) echo "Usage:" |