gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 149/189: update proxy configuration for merchant and bank


From: gnunet
Subject: [taler-grid5k] 149/189: update proxy configuration for merchant and bank
Date: Thu, 28 Apr 2022 10:48:39 +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 db2c367f2a9c68b30e786b6785e136eb20d8d241
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Apr 14 13:45:56 2022 +0200

    update proxy configuration for merchant and bank
---
 configs/etc/nginx/sites-available/fakebank |  5 ++++-
 configs/etc/nginx/sites-available/merchant |  3 +++
 configs/etc/taler/conf.d/fake-bank.conf    |  4 ++--
 experiment/scripts/bank.sh                 |  2 +-
 experiment/scripts/benchmark.sh            |  2 +-
 experiment/scripts/exchange-proxy.sh       |  9 ++-------
 experiment/scripts/helpers.sh              | 10 ++++++++++
 experiment/scripts/merchant.sh             |  1 +
 8 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/configs/etc/nginx/sites-available/fakebank 
b/configs/etc/nginx/sites-available/fakebank
index 36aa131..1c32413 100644
--- a/configs/etc/nginx/sites-available/fakebank
+++ b/configs/etc/nginx/sites-available/fakebank
@@ -14,10 +14,13 @@ server {
 
   server_name 0.0.0.0;
 
+  allow 172.16.0.0/12;
+  deny all;
+
   access_log 
syslog:server=localhost,facility=user,tag=taler_fakebank_proxy,severity=info 
taler;
 
   location / {
-     proxy_pass http://unix:/var/run/taler/fakebank/fakebank.sock;
+     proxy_pass http://localhost:8082
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-Host $remote_addr;
diff --git a/configs/etc/nginx/sites-available/merchant 
b/configs/etc/nginx/sites-available/merchant
index 3e5a425..655cbb7 100644
--- a/configs/etc/nginx/sites-available/merchant
+++ b/configs/etc/nginx/sites-available/merchant
@@ -14,6 +14,9 @@ server {
 
   server_name 0.0.0.0;
 
+  allow 172.16.0.0/12;
+  deny all;
+
   access_log 
syslog:server=localhost,facility=user,tag=taler_merchant_proxy,severity=info 
taler;
 
   location / {
diff --git a/configs/etc/taler/conf.d/fake-bank.conf 
b/configs/etc/taler/conf.d/fake-bank.conf
index 1b08d69..223a389 100644
--- a/configs/etc/taler/conf.d/fake-bank.conf
+++ b/configs/etc/taler/conf.d/fake-bank.conf
@@ -1,5 +1,5 @@
 [bank]
-SERVE = UNIX
-UNIXPATH = /var/run/taler/fakebank/fakebank.sock
+SERVE = http
+PORT = 8082
 MAX_DEBT = KUDOS:100000000000.0
 MAX_DEBT_BANK = KUDOS:1000000000000000.0
diff --git a/experiment/scripts/bank.sh b/experiment/scripts/bank.sh
index 2ce81e0..6184bd4 100755
--- a/experiment/scripts/bank.sh
+++ b/experiment/scripts/bank.sh
@@ -14,8 +14,8 @@ source ~/scripts/helpers.sh
 # Start the taler-fakebank
 function init_bank() {
   create_cert "${NODE_NAME}.${DNS_ZONE}" "/etc/ssl/bank"
+  setup_rsyslog_for_nginx
   restart_rsyslog
-  mkdir -p /var/run/taler/fakebank || true
   ln -sf /etc/nginx/sites-available/fakebank /etc/nginx/sites-enabled/fakebank
   systemctl restart taler-fakebank.service \
                     nginx
diff --git a/experiment/scripts/benchmark.sh b/experiment/scripts/benchmark.sh
index a79cc7a..f095b9d 100755
--- a/experiment/scripts/benchmark.sh
+++ b/experiment/scripts/benchmark.sh
@@ -35,7 +35,7 @@ function start_wallet_bench() {
     \"currency\": \"KUDOS\",
     \"payto\": \"payto://x-taler-bank/bank.${DNS_ZONE}/foo\",
     \"iterations\": 100000,
-    \"deposits\": $((RANDOM %21)),
+    \"deposits\": 0,
     \"restartAfter\": 2
   }"
 }
diff --git a/experiment/scripts/exchange-proxy.sh 
b/experiment/scripts/exchange-proxy.sh
index 8e2febd..c65c5d9 100755
--- a/experiment/scripts/exchange-proxy.sh
+++ b/experiment/scripts/exchange-proxy.sh
@@ -42,14 +42,9 @@ function setup_config() {
 
   
   add_exchanges "0" ${NUM_EXCHANGE_PROCESSES}
-  
-  # Nginx will log to our rsyslog directly an then from there it will be 
-  # redirected to promtail - there was an issue doing it directly that's
-  # why it is done this way
-  sed -i -e '/module(load="imudp")/s/^#//g' \
-         -e '/input(type="imudp" port="514")/s/^#//g' \
-          /etc/rsyslog.conf
 
+  setup_rsyslog_for_nginx
+  
   # Change the port, since we have to limit the number of log lines to parse
   # in loki for best performance
   sed -i 's/port="1514"/port="1516"/g' \
diff --git a/experiment/scripts/helpers.sh b/experiment/scripts/helpers.sh
index 53b717a..67953cc 100755
--- a/experiment/scripts/helpers.sh
+++ b/experiment/scripts/helpers.sh
@@ -104,6 +104,16 @@ function wait_for_keys() {
   done
 } 
 
+# Nginx will log to our rsyslog directly an then from there it will be 
+# redirected to promtail - there was an issue doing it directly that's
+# why it is done this way
+function setup_rsyslog_for_nginx() {
+  sed -i -e '/module(load="imudp")/s/^#//g' \
+         -e '/input(type="imudp" port="514")/s/^#//g' \
+          /etc/rsyslog.conf
+}
+
+
 # Setup taler.conf for aggregator etc. with downloading the 
 # master public key from the exchange API 
 function setup_exchange_config_master_key_from_api() {
diff --git a/experiment/scripts/merchant.sh b/experiment/scripts/merchant.sh
index 59ac227..80d4c93 100755
--- a/experiment/scripts/merchant.sh
+++ b/experiment/scripts/merchant.sh
@@ -86,6 +86,7 @@ function create_instance() {
 # Initialize the merchant
 function init_merchant() {
   create_cert "${NODE_NAME}.${DNS_ZONE}" "/etc/ssl/merchant"
+  setup_rsyslog_for_nginx
   restart_rsyslog
   configure_merchant
   configure_db

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