gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] 01/02: Data export: readme and path fix.


From: gnunet
Subject: [taler-deployment] 01/02: Data export: readme and path fix.
Date: Fri, 21 Oct 2022 13:32:58 +0200

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

ms pushed a commit to branch master
in repository deployment.

commit 772f50c54f5cefb0bd9fc8eb7539cf4928665d6f
Author: MS <ms@taler.net>
AuthorDate: Fri Oct 21 13:23:47 2022 +0200

    Data export: readme and path fix.
---
 docker/hybrid/README                     | 13 ++++++++++++-
 docker/hybrid/docker-compose.yml         |  4 ++--
 docker/hybrid/images/exchange/taler.conf |  2 +-
 docker/hybrid/images/libeufin/startup.sh |  7 ++++---
 docker/hybrid/images/postgres/Dockerfile |  2 +-
 5 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/docker/hybrid/README b/docker/hybrid/README
index 9071e65..77da82c 100644
--- a/docker/hybrid/README
+++ b/docker/hybrid/README
@@ -50,7 +50,18 @@ for an example.
 Volumes
 -------
 
-TBD: write how to export data.
+Data is kept into Docker volumes.  Run the following command to
+export database, key material, and logs:
+
+$ docker run \
+  -v /tmp:/tmp \
+  -v hybrid_talerdata:/taler-data \
+  -v hybrid_talerlogs:/taler-logs \
+  -it debian:stable \
+  /bin/bash -c "tar --no-same-owner --no-same-permissions -c -f 
/tmp/backup.tar /taler-data /taler-logs"
+
+If it succeeded, the file "/tmp/backup.tar" on the host system
+should now contain the data coming from the volumes.
 
 Run
 ---
diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml
index f048ce4..21fc7af 100644
--- a/docker/hybrid/docker-compose.yml
+++ b/docker/hybrid/docker-compose.yml
@@ -14,9 +14,9 @@ services:
       - talerdata:/var/lib/postgresql/data/
       - ${TALER_DEPLOYMENT_CONFIG:?Please export 
TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
     environment:
-      # the only 'role' existing in the DBMS.  That
+      # root is the only role existing in the DBMS.  That
       # matches the role used by other containers when
-      # they connect here.
+      # they connect to the database.
       POSTGRES_USER: root
       # this changes to the password used by other
       # containers to connect here.  This definition
diff --git a/docker/hybrid/images/exchange/taler.conf 
b/docker/hybrid/images/exchange/taler.conf
index e905898..b19f97e 100644
--- a/docker/hybrid/images/exchange/taler.conf
+++ b/docker/hybrid/images/exchange/taler.conf
@@ -2,7 +2,7 @@
 currency = __CURRENCY__
 
 [paths]
-taler_data_home = /data
+taler_data_home = /data/exchange
 
 [taler-exchange-secmod-eddsa]
 unixpath = /eddsa.http
diff --git a/docker/hybrid/images/libeufin/startup.sh 
b/docker/hybrid/images/libeufin/startup.sh
index d3312b6..ca66f0c 100644
--- a/docker/hybrid/images/libeufin/startup.sh
+++ b/docker/hybrid/images/libeufin/startup.sh
@@ -8,6 +8,7 @@ SANDBOX_PORT=15000
 NEXUS_PORT=15001
 SANDBOX_BASE_URL="http://localhost:${SANDBOX_PORT}";
 EXCHANGE_URL="http://exchange/";
+MAYBE_VOLUME_MOUNTPOINT="/data/libeufin"
 # As wanted by the Libeufin CLI:
 export LIBEUFIN_SANDBOX_URL="${SANDBOX_BASE_URL}/demobanks/default"
 export LIBEUFIN_NEXUS_URL="http://localhost:${NEXUS_PORT}";
@@ -39,9 +40,9 @@ is_serving() {
     fi
   echo $2 reachable.
 }
-
 EXCHANGE_IBAN=DE159593
-export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:/data/sandbox.sqlite3"
+mkdir -p ${MAYBE_VOLUME_MOUNTPOINT}
+export 
LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${MAYBE_VOLUME_MOUNTPOINT}/sandbox.sqlite3"
 export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
 echo -n "Creating ${CURRENCY} default demobank..."
 libeufin-sandbox config --currency ${CURRENCY} default
@@ -77,7 +78,7 @@ echo DONE
 ## NEXUS SETUP
 EXCHANGE_NEXUS_USERNAME=`taler-config -c /config/deployment.conf -s 
taler-deployment -o exchange-nexus-username`
 EXCHANGE_NEXUS_PASSWORD=`taler-config -c /config/deployment.conf -s 
taler-deployment -o exchange-nexus-password`
-export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:/data/nexus.sqlite3"
+export 
LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:${MAYBE_VOLUME_MOUNTPOINT}/nexus.sqlite3"
 echo -n "Creating Nexus superuser..."
 libeufin-nexus superuser $EXCHANGE_NEXUS_USERNAME \
   --password $EXCHANGE_NEXUS_PASSWORD
diff --git a/docker/hybrid/images/postgres/Dockerfile 
b/docker/hybrid/images/postgres/Dockerfile
index e6588e8..d0fde23 100644
--- a/docker/hybrid/images/postgres/Dockerfile
+++ b/docker/hybrid/images/postgres/Dockerfile
@@ -1,7 +1,7 @@
 FROM docker.io/postgres
 
 # Default "${PGDATA}/log" directory was problematic
-# when mounted in a volume.
+# when mounted in a volume.  Prefer arbitrary "/logs".
 RUN mkdir /logs
 RUN chown postgres:postgres /logs
 

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