gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 92/189: configure merchant instance


From: gnunet
Subject: [taler-grid5k] 92/189: configure merchant instance
Date: Thu, 28 Apr 2022 10:47:42 +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 edb715b3d2384a2e8b3c2ec7b89769cc99ef2a14
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Mar 17 22:56:21 2022 +0100

    configure merchant instance
---
 experiment/env                 |  3 +++
 experiment/scripts/database.sh |  6 ++++++
 experiment/scripts/merchant.sh | 21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)

diff --git a/experiment/env b/experiment/env
index 452022f..f3e9bd6 100644
--- a/experiment/env
+++ b/experiment/env
@@ -67,6 +67,9 @@ EXCHANGE_CIPHER=RSA
 # When using the RSA cipher, which key size to use
 RSA_KEY_SIZE=2048
 
+# Token used in Authorize: Bearer $TOKEN for the merchant
+TALER_MERCHANT_TOKEN=taler-perf
+
 # Datasource names registered in the grafana instance
 PROMETHEUS_DATASOURCE_NAME=Prometheus
 LOKI_DATASOURCE_NAME=Loki
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 7ca125d..5d2e591 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -308,6 +308,12 @@ GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public 
TO "${DB_USER}";
 GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
 EOF
 
+  for i in $(seq $NUM_PARTITIONS); do
+    su postgres << EOF
+psql -d ${DB_NAME} -tAc "ALTER TABLE known_coins_${i} SET (fillfactor=90)";
+EOF
+  done
+
   enable_remote_access
   systemctl restart postgresql
 }
diff --git a/experiment/scripts/merchant.sh b/experiment/scripts/merchant.sh
index d4a63fd..7c445fa 100755
--- a/experiment/scripts/merchant.sh
+++ b/experiment/scripts/merchant.sh
@@ -61,6 +61,26 @@ EOF
   sudo -u taler-merchant-httpd taler-merchant-dbinit
 }
 
+function create_instance() {
+  curl -X POST \
+       -H "Authorization: Bearer ${TALER_MERCHANT_TOKEN}" \
+       -H "Content-Type: application/json" \
+       -d "{
+             \"payto_uris\": [ 
\"payto://x-taler-bank/${BANK_DOMAIN}/${NODE_NAME}\" ],
+            \"id\": \"default\",
+            \"name\": \"${NODE_NAME}\",
+            \"address\": {\"country\": \"CH\"},
+            \"auth\": {\"method\": \"token\", \"token\": 
\"${TALER_MERCHANT_TOKEN}\",
+            \"jurisdiction\": {\"country\": \"CH\"},
+            \"default_max_wire_fee\": \"KUDOS:1\",
+            \"default_wire_fee_amortizazion\": \"10\",
+            \"default_max_deposit_fee\": \"KUDOS:1\",
+            \"default_wire_transfer_delay\": {\"d_ms\": 1209600000},
+            \"default_pay_delay\": \{\"d_ms\": 1209600000},
+          }" \
+        http://localhost:8080/management/instances
+}
+
 # Initialize the merchant
 function init_merchant() {
   restart_rsyslog
@@ -68,6 +88,7 @@ function init_merchant() {
   configure_db
   init_db
   systemctl restart taler-merchant-httpd
+  create_instance
 }
 
 case $1 in 

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