gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 30/48: add some comments to auditor.sh


From: gnunet
Subject: [taler-grid5k] 30/48: add some comments to auditor.sh
Date: Sat, 28 May 2022 12:11:50 +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 cfaa7fc4d3c22782bff3ad96f40186224105ddf8
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sat May 21 09:54:26 2022 +0200

    add some comments to auditor.sh
---
 additional/grafana/transactions.json |  3 ++-
 experiment/scripts/auditor.sh        | 18 +++++++++++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/additional/grafana/transactions.json 
b/additional/grafana/transactions.json
index e979449..a9f0d7e 100644
--- a/additional/grafana/transactions.json
+++ b/additional/grafana/transactions.json
@@ -1316,6 +1316,7 @@
             }
           },
           "mappings": [],
+          "min": 0,
           "thresholds": {
             "mode": "absolute",
             "steps": [
@@ -2541,6 +2542,6 @@
   "timezone": "",
   "title": "Transactions",
   "uid": "83vvgKKnk",
-  "version": 165,
+  "version": 166,
   "weekStart": ""
 }
\ No newline at end of file
diff --git a/experiment/scripts/auditor.sh b/experiment/scripts/auditor.sh
index 4eeac9a..ca5f71a 100755
--- a/experiment/scripts/auditor.sh
+++ b/experiment/scripts/auditor.sh
@@ -11,14 +11,17 @@ init:
   Configure and start the auditor together with its database
 "
 
+# Prevent permission denied error messages when switching user
 cd /tmp
 
+# Create the necessary users
 function create_users() {
-  for USER in auditor sync auditor-ingress auditor-wire; do
+  for USER in auditor auditor-ingress; do
     adduser --quiet --home /tmp/${USER} ${USER} || true
   done
 }
 
+# initialize the auditor database
 function init_db() {
 
   # Grid5000 mounts the default disk on /tmp
@@ -187,6 +190,8 @@ createdb -O auditor "auditor"
 EOF
 }
 
+# Initialize the replicated database and enable replication once the
+# taler-exchange db is ready
 function setup_exchange_replication() {
 
   taler-config -s exchange -o DB -V "postgres"
@@ -205,8 +210,11 @@ function setup_exchange_replication() {
 psql -d taler-ingress -U auditor-ingress -tAc 'GRANT ALL ON ALL TABLES IN 
SCHEMA public TO auditor;'
 EOF
 
+  # Wait for exchange db to be ready to accept connections
   DB_USER=egress wait_for_db   
 
+  # Complicated setup to be able to drop old and not working replication slots
+  # and create a new one
   su postgres << EOF
   psql -d taler-ingress -tAc "ALTER SUBSCRIPTION ${NODE_NAME} DISABLE;"
   psql -d taler-ingress -tAc "ALTER SUBSCRIPTION ${NODE_NAME} SET 
(slot_name=NONE);"
@@ -222,6 +230,8 @@ function enable_webservice() {
                     nginx
 }
 
+# Setup the auditor configuration and configure the exchange to add this 
auditor
+# Requires ssh access to the main exchange node
 function setup_config() {
 
   rm -rf /var/lib/taler/auditor/*
@@ -241,6 +251,8 @@ function setup_config() {
   sudo -u auditor taler-auditor-dbinit
   sudo -u auditor taler-auditor-exchange -m $(get_exchange_masterkey) -u 
"https://${EXCHANGE_GW_DOMAIN}/";
 
+  # Connect to the main exchange node and add the auditor
+  # This is done from here because we may not have an auditor in some 
experiments
   ssh -o StrictHostKeyChecking=no ${PRIMARY_EXCHANGE} \
     "/bin/bash ~/scripts/exchange.sh add-auditor '${PUB_KEY}' 
'http://${NODE_NAME}.${DNS_ZONE}/' '${NODE_NAME}'"
 
@@ -248,14 +260,14 @@ function setup_config() {
   taler-auditor-offline show < input.json
   taler-auditor-offline sign < input.json > output.json
   taler-auditor-offline upload < output.json
-
-  setup_exchange_replication
 }
 
+# Condifugre and start the auditor replication
 function init_auditor() {
   create_users
   init_db
   setup_config
+  setup_exchange_replication
 }
 
 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]