gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 58/141: update wallet script


From: gnunet
Subject: [taler-grid5k] 58/141: update wallet script
Date: Thu, 18 Nov 2021 14:49:59 +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 57c70cb8c1c5b327b373c5bd1192b2259df06924
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Oct 20 11:05:37 2021 +0200

    update wallet script
---
 configs/etc/nginx/sites-available/proxy |  2 +-
 configs/etc/rsyslog.d/taler.conf        |  2 +-
 experiment/scripts/proxy.sh             | 10 ++++++++--
 experiment/scripts/test.sh              | 27 +++++++++++++++++++++++----
 experiment/scripts/wallet.sh            |  5 ++++-
 5 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/configs/etc/nginx/sites-available/proxy 
b/configs/etc/nginx/sites-available/proxy
index b8346a9..8d734e5 100644
--- a/configs/etc/nginx/sites-available/proxy
+++ b/configs/etc/nginx/sites-available/proxy
@@ -17,7 +17,7 @@ server {
 
   server_name localhost;
 
-  access_log 
syslog:server=<MONITOR_HOST_HERE>:1514,facility=user,tag=proxy,severity=info 
taler;
+  access_log syslog:server=localhost,facility=user,tag=proxy,severity=info 
taler;
 
   allow 172.16.0.0/12;
   deny all;
diff --git a/configs/etc/rsyslog.d/taler.conf b/configs/etc/rsyslog.d/taler.conf
index c509eef..fa2e47f 100644
--- a/configs/etc/rsyslog.d/taler.conf
+++ b/configs/etc/rsyslog.d/taler.conf
@@ -1,7 +1,7 @@
 module(load="omprog")
 # Need to load due to parser error https://github.com/grafana/loki/issues/1783
 module(load="mmutf8fix")
-if $programname startswith 'taler' then {
+if ($programname startswith 'taler' or $syslogtag startswith 'nginx' then) {
   action(type="mmutf8fix" replacementChar="?")
 # 
https://grafana.com/docs/loki/latest/clients/promtail/scraping/#rsyslog-output-configuration
   action(type="omfwd"
diff --git a/experiment/scripts/proxy.sh b/experiment/scripts/proxy.sh
index 1df79cb..3f691e9 100755
--- a/experiment/scripts/proxy.sh
+++ b/experiment/scripts/proxy.sh
@@ -3,8 +3,8 @@ set -eux
 
 source ~/scripts/helpers.sh
 
-sed "/<SERVERS_HERE>/a \ \ server ${EXCHANGE_DOMAIN}:80;
-     s/<MONITOR_HOST_HERE>/${MONITOR_DOMAIN}/g" \
+sed -e "/<SERVERS_HERE>/a \ \ server ${EXCHANGE_DOMAIN}:80;" \
+    -e "s/<MONITOR_HOST_HERE>/${MONITOR_DOMAIN}/g" \
         /etc/nginx/sites-available/proxy > /etc/nginx/sites-enabled/proxy
 
 # We want n processes, one is already enabled on port 80
@@ -14,6 +14,12 @@ do
         /etc/nginx/sites-enabled/proxy
 done
 
+sed -i -e '/module(load="imudp")/s/^#/g' \
+       -e '/input(type="imudp" port="514")/s/^#/g' \
+          /etc/rsyslog.conf
+
+systemctl restart rsyslog
+
 # Nginx does not start until the destination server is reachable - wait here
 # nginx: [emerg] host not found in upstream "exch.perf.taler" ...
 wait_for_keys "${EXCHANGE_DOMAIN}"
diff --git a/experiment/scripts/test.sh b/experiment/scripts/test.sh
index cdb8856..c3efa0c 100755
--- a/experiment/scripts/test.sh
+++ b/experiment/scripts/test.sh
@@ -1,9 +1,28 @@
 #!/bin/bash
 
+DB_FILE=~/walletdb/wallet."${1}".json
+
 for i in {0..10000};
 do
-  taler-wallet-cli advanced withdraw-fakebank \
-      --exchange "http://${PROXY_DOMAIN}/"; \
-      --bank "http://${BANK_DOMAIN}/"; \
-      --amount KUDOS:10
+
+  taler-wallet-cli \
+      --wallet-db="${DB_FILE}" \
+      advanced withdraw-fakebank \
+        --exchange "http://${PROXY_DOMAIN}/"; \
+        --bank "http://${BANK_DOMAIN}/"; \
+        --amount KUDOS:1000 \
+
+  taler-wallet-cli \
+      --wallet-db="${DB_FILE}" \
+      run-until-done \
+        --max-retries=5 \
+
+  for i in {1..10};
+  do
+    taler-wallet-cli \
+        --wallet-db="${DB_FILE}" \
+       deposit create KUDOS:100 \
+        "payto://x-taler-bank/${BANK_DOMAIN}/Exchange"
+  done
+
 done
diff --git a/experiment/scripts/wallet.sh b/experiment/scripts/wallet.sh
index e339dd9..2440e0c 100755
--- a/experiment/scripts/wallet.sh
+++ b/experiment/scripts/wallet.sh
@@ -9,4 +9,7 @@ taler-wallet-cli advanced withdraw-manually \
        --exchange "http://${PROXY_DOMAIN}/"; \
        --amount KUDOS:10 
 
-parallel -n0 ~/scripts/test.sh ::: {1..100}
+mkdir ~/walletdb
+mount -t tmpfs -o size=250m tmpfs ~/walletdb
+
+parallel ~/scripts/test.sh ::: {1..64}

-- 
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]