gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 55/141: add possibilty for dynamic amount of wallets


From: gnunet
Subject: [taler-grid5k] 55/141: add possibilty for dynamic amount of wallets
Date: Thu, 18 Nov 2021 14:49:56 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit bf8a63404f560c04840af2d294d11e9d00580a0a
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sat Oct 16 17:01:15 2021 +0200

    add possibilty for dynamic amount of wallets
---
 configs/etc/monitor/node-exporters.yaml.tpl |  4 +---
 experiment/cleardns.sh                      |  8 ++++++--
 experiment/scripts/monitor.sh               |  4 ++++
 experiment/scripts/proxy.sh                 |  2 +-
 experiment/scripts/test.sh                  |  9 +++++++++
 experiment/scripts/wallet.sh                | 13 ++-----------
 6 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/configs/etc/monitor/node-exporters.yaml.tpl 
b/configs/etc/monitor/node-exporters.yaml.tpl
index 2fe1158..99b79ed 100644
--- a/configs/etc/monitor/node-exporters.yaml.tpl
+++ b/configs/etc/monitor/node-exporters.yaml.tpl
@@ -19,9 +19,7 @@
     - labels:
         component: 'wallet'
       targets:
-      - 'wallet-0.perf.taler:9100'
-      - 'wallet-1.perf.taler:9100'
-      - 'wallet-2.perf.taler:9100'
+      # <WALLETS_HERE>
     - labels:
         component: 'monitor'
       targets:
diff --git a/experiment/cleardns.sh b/experiment/cleardns.sh
index 24ac4a3..f1dd585 100644
--- a/experiment/cleardns.sh
+++ b/experiment/cleardns.sh
@@ -8,15 +8,17 @@ function del_ddn() {
   nsupdate -k /root/ddns.key -v << EOF
 server ${DNS_HOST}
 zone ${DNS_ZONE}
-update delete ${value} A
+update delete ${1}
 send
 EOF
 }
 
+dig -t AXFR ${DNS_ZONE} ${DNS_HOST}
+
 # Delete all old dns entries of the previous experitment
 while IFS='=' read -r name value; do
   if [[ $name == *"_DOMAIN" ]] && [[ $value == *".${DNS_ZONE}" ]]; then 
-    if [[ $value == "wallet"* ]]: then 
+    if [[ $value == "wallet"* ]]; then 
       # We will probably never use more than 20 wallet hosts 
       for (( i=0; i < 20; i++ )) ;
       do
@@ -31,3 +33,5 @@ while IFS='=' read -r name value; do
   fi
 done < .env
 
+dig -t AXFR ${DNS_ZONE} ${DNS_HOST}
+
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index fa2a9a3..ebaa325 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -33,6 +33,10 @@ update_datasource "${LOKI_DATASOURCE_NAME}" 
"${LOKI_G5K_PROXY_PORT}"
 if [[ "${ENABLE_EXPORTERS}" == "true" ]];
 then
   cat /etc/monitor/node-exporters.yaml.tpl >> /etc/monitor/prometheus.yaml
+  for (( i=0; i < ${NUM_WALLET__HOSTS}; i++ ))
+  do
+    sed -i "/<WALLETS_HERE>/a \ \ \ \ \ \ - 'wallet-${i}.perf.taler:9100"
+  done
 fi
 
 systemctl restart prometheus \
diff --git a/experiment/scripts/proxy.sh b/experiment/scripts/proxy.sh
index 0727269..16dda23 100755
--- a/experiment/scripts/proxy.sh
+++ b/experiment/scripts/proxy.sh
@@ -9,7 +9,7 @@ sed $"/<SERVERS_HERE>/a \ \ server ${EXCHANGE_DOMAIN}:80;" \
 # We want n processes, one is already enabled on port 80
 for (( i=1; i < ${NUM_EXCHANGE_PROCESSES}; i++ ))
 do
-  sed -i $"/<SERVERS_HERE>/a \ \ server ${EXCHANGE_DOMAIN}:808${i};" \
+  sed -i "/<SERVERS_HERE>/a \ \ server ${EXCHANGE_DOMAIN}:808${i};" \
         /etc/nginx/sites-enabled/proxy
 done
 
diff --git a/experiment/scripts/test.sh b/experiment/scripts/test.sh
new file mode 100755
index 0000000..cdb8856
--- /dev/null
+++ b/experiment/scripts/test.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+for i in {0..10000};
+do
+  taler-wallet-cli advanced withdraw-fakebank \
+      --exchange "http://${PROXY_DOMAIN}/"; \
+      --bank "http://${BANK_DOMAIN}/"; \
+      --amount KUDOS:10
+done
diff --git a/experiment/scripts/wallet.sh b/experiment/scripts/wallet.sh
index 18407d1..e339dd9 100755
--- a/experiment/scripts/wallet.sh
+++ b/experiment/scripts/wallet.sh
@@ -7,15 +7,6 @@ wait_for_keys "${PROXY_DOMAIN}"
 
 taler-wallet-cli advanced withdraw-manually \
        --exchange "http://${PROXY_DOMAIN}/"; \
-       --amount KUDOS:10
+       --amount KUDOS:10 
 
-for i in {0..100};
-do
-  parallel -n 0 \
-       -j 252 \
-       'taler-wallet-cli advanced withdraw-fakebank \
-       --exchange "http://${PROXY_DOMAIN}/"; \
-       --bank "http://${BANK_DOMAIN}/"; \
-       --amount KUDOS:10' \
-       ::: {0..252}
-done
+parallel -n0 ~/scripts/test.sh ::: {1..100}

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]