gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 04/48: fix permissions


From: gnunet
Subject: [taler-grid5k] 04/48: fix permissions
Date: Sat, 28 May 2022 12:11:24 +0200

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

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

commit 3ad7d6c6ad5d3e7c26f4208022c334e115044e71
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Tue May 10 08:25:37 2022 +0200

    fix permissions
---
 configs/etc/monitor/promtail.yaml |  2 +-
 experiment/env                    |  3 +++
 experiment/scripts/benchmark.sh   | 42 ++++++++++++++++++++++++++++-----------
 experiment/scripts/database.sh    |  2 +-
 experiment/scripts/monitor.sh     |  7 ++++---
 5 files changed, 39 insertions(+), 17 deletions(-)

diff --git a/configs/etc/monitor/promtail.yaml 
b/configs/etc/monitor/promtail.yaml
index a5f9260..03f5911 100644
--- a/configs/etc/monitor/promtail.yaml
+++ b/configs/etc/monitor/promtail.yaml
@@ -77,7 +77,7 @@ scrape_configs:
         selector: '{job="proxy"}'
         stages:
         - regex:
-            expression: 
'uri=/(?P<ep>[a-zA-Z]+)(?:/\w+)?(?:/(?P<act>[a-zA-Z]+))? 
s=(?P<status>\d{3}).*urt=(?P<upstream_response_time>\d+\.\d+) 
rt=(?P<response_time>\d+\.\d+) rl=(?P<request_length>\d+) 
bs=(?P<bytes_sent>\d+)'
+            expression: 
'uri=/(?P<ep>[a-zA-Z]+)(?:/\w+)?(?:/(?P<act>[a-zA-Z-]+))? 
s=(?P<status>\d{3}).*urt=(?P<upstream_response_time>\d+\.\d+) 
rt=(?P<response_time>\d+\.\d+) rl=(?P<request_length>\d+) 
bs=(?P<bytes_sent>\d+)'
         - template:
             source: endpoint
             template: '{{ printf "%s-%s" .ep .act | trimSuffix "-" }}'
diff --git a/experiment/env b/experiment/env
index f663d85..f88687e 100644
--- a/experiment/env
+++ b/experiment/env
@@ -104,6 +104,9 @@ WALLET_USE_HTTPS=true
 WALLET_WITHDRAW_ONLY=false
 # Do batch withdrawals of a reserve rather than single coins
 TALER_WALLET_BATCH_WITHDRAWAL=1
+# How the wallets select merchants, possible values: 'zipf' and 'rand'
+# If the configured value is neither zipf or rand, a single merchant is taken
+WALLET_MERCHANT_SELECTION=normal
 # Needed for wallets to accept self signed certificates
 NODE_TLS_REJECT_UNAUTHORIZED=0
 
diff --git a/experiment/scripts/benchmark.sh b/experiment/scripts/benchmark.sh
index 587e360..9783378 100755
--- a/experiment/scripts/benchmark.sh
+++ b/experiment/scripts/benchmark.sh
@@ -31,20 +31,38 @@ function start_wallet_bench() {
   if [[ ${WALLET_WITHDRAW_ONLY} == "true" ]]; then
     NUM_DEPOSITS=0
   fi
-  
-  taler-wallet-cli \
+
+  if [[ "${WALLET_MERCHANT_SELECTION}" =~ zipf|rand ]]; then
+    taler-wallet-cli \
+      -L ${LOG_LEVEL} \
+      advanced bench3 \
+      --config-json "
+    {
+      \"exchange\": \"${PROTO}://${EXCHANGE_GW_DOMAIN}/\",
+      \"bank\": \"http://bank.${DNS_ZONE}/\";,
+      \"currency\": \"KUDOS\",
+      \"paytoTemplate\": 
\"payto://x-taler-bank/bank.${DNS_ZONE}/merchant-\${id}\",
+      \"randomAlg\": \"${WALLET_MERCHANT_SELECTION}\",
+      \"numMerchants\": 100,
+      \"iterations\": 100000,
+      \"deposits\": ${NUM_DEPOSITS},
+      \"restartAfter\": 2
+    }"
+  else
+    taler-wallet-cli \
       -L ${LOG_LEVEL} \
       advanced ${WALLET_BENCHMARK} \
-        --config-json "
-  {
-    \"exchange\": \"${PROTO}://${EXCHANGE_GW_DOMAIN}/\",
-    \"bank\": \"http://bank.${DNS_ZONE}/\";,
-    \"currency\": \"KUDOS\",
-    \"payto\": \"payto://x-taler-bank/bank.${DNS_ZONE}/foo\",
-    \"iterations\": 100000,
-    \"deposits\": ${NUM_DEPOSITS},
-    \"restartAfter\": 2
-  }"
+      --config-json "
+    {
+      \"exchange\": \"${PROTO}://${EXCHANGE_GW_DOMAIN}/\",
+      \"bank\": \"http://bank.${DNS_ZONE}/\";,
+      \"currency\": \"KUDOS\",
+      \"payto\": \"payto://x-taler-bank/bank.${DNS_ZONE}/merchant-1\",
+      \"iterations\": 100000,
+      \"deposits\": ${NUM_DEPOSITS},
+      \"restartAfter\": 2
+    }"
+  fi
 }
 
 case $1 in
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 959e616..c4079de 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -315,7 +315,7 @@ EOF
   # Grant access to the databse to the remote user
   su taler-exchange-httpd -s /bin/bash << EOF
 psql -d "${DB_NAME}"
-GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public TO "${DB_USER}";
+GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO 
"${DB_USER}";
 GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
 EOF
 
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 2b9a875..867b0ae 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -19,9 +19,10 @@ set -ex
 source ~/scripts/helpers.sh
 
 # Update a data source on the external grafana instance
-# $1: Data-source name (configured in .env)
-# $2: Port for the datasource (i.e. http/http8080 or https/https8443)
-#     - https://www.grid5000.fr/w/HTTP/HTTPs_access
+# $1: Datasource name (configured in .env)
+# $2: Port where the datasource is listenig
+#     (http/http8080 or https/https8443)
+# See: https://www.grid5000.fr/w/HTTP/HTTPs_access
 function update_datasource() {
   # Get the id of the datasource to update
   ID=$(jq --arg name "$1" '.[] | select(.name == $name) | .id' ds.json)

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