[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated (251babb -> f241499)
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated (251babb -> f241499) |
Date: |
Wed, 26 Oct 2022 17:05:13 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a change to branch master
in repository deployment.
from 251babb deploy blog and donations
new e86369d move backup to script
new 086ad32 docker-compose
new 6cbf9eb helper scripts
new f241499 deploy landing
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docker/hybrid/README | 16 ++------
docker/hybrid/backup.sh | 29 +++++++++++++++
docker/hybrid/config/deployment.conf | 13 +++++++
docker/hybrid/docker-compose.yml | 4 +-
docker/hybrid/images/exchange/startup.sh | 5 ++-
docker/hybrid/images/exchange/taler.conf | 1 +
docker/hybrid/images/libeufin/Dockerfile | 1 +
.../hybrid/images/libeufin/create_bank_accounts.sh | 43 ++++++++++++++++++++++
docker/hybrid/images/libeufin/startup.sh | 26 +------------
docker/hybrid/images/merchant/Dockerfile | 1 +
docker/hybrid/images/merchant/create_instances.sh | 18 +++++++++
docker/hybrid/images/merchant/startup.sh | 28 +++++++++-----
12 files changed, 137 insertions(+), 48 deletions(-)
create mode 100755 docker/hybrid/backup.sh
create mode 100644 docker/hybrid/images/libeufin/create_bank_accounts.sh
create mode 100644 docker/hybrid/images/merchant/create_instances.sh
diff --git a/docker/hybrid/README b/docker/hybrid/README
index 77da82c..8621947 100644
--- a/docker/hybrid/README
+++ b/docker/hybrid/README
@@ -50,18 +50,10 @@ for an example.
Volumes
-------
-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.
+Data is kept into Docker volumes. From this directory,
+run the following command to export database, key material, and logs:
+
+ $ ./backup.sh
Run
---
diff --git a/docker/hybrid/backup.sh b/docker/hybrid/backup.sh
new file mode 100755
index 0000000..ae0fe75
--- /dev/null
+++ b/docker/hybrid/backup.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -eu
+
+if ! which docker > /dev/null; then
+ echo docker not found.
+ exit 1
+fi
+
+if ! docker images | grep debian | grep stable > /dev/null; then
+ echo debian:stable not found. Please extract backup with custom image.
+ exit 2
+fi
+
+BACKUP_FILE="/tmp/$(date +%Y-%m-%d)-taler-backup.tar"
+
+if test -a $BACKUP_FILE; then
+ echo "Backup file $BACKUP_FILE exists already, please move it and run the
script again."
+ exit 3
+fi
+
+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 ${BACKUP_FILE}
/taler-data /taler-logs && chown $(id --user):$(id --group) ${BACKUP_FILE}"
+
+echo Backup at: ${BACKUP_FILE}
diff --git a/docker/hybrid/config/deployment.conf
b/docker/hybrid/config/deployment.conf
index e0151f3..fb3e5c0 100644
--- a/docker/hybrid/config/deployment.conf
+++ b/docker/hybrid/config/deployment.conf
@@ -4,6 +4,13 @@ merchant-apikey = secret
exchange-nexus-username = exchange-at-nexus
exchange-nexus-password = secret-at-nexus
+# Frontends URLs
+landing-url = http://localhost:5562/
+blog-url = http://localhost:5559/
+donations-url = http://localhost:5560/
+survey-url = http://localhost:5561/
+bank-url = http://localhost:15000/
+
# Bank accounts
exchange-sandbox-username = exchange-at-sandbox
exchange-sandbox-password = secret-at-sandbox
@@ -11,6 +18,12 @@ blog-sandbox-username = blog-at-sandbox
blog-sandbox-password = secret-at-sandbox
gnunet-sandbox-username = gnunet-at-sandbox
gnunet-sandbox-password = secret-at-sandbox
+taler-sandbox-username = taler-at-sandbox
+taler-sandbox-password = secret-at-sandbox
+tor-sandbox-username = tor-at-sandbox
+tor-sandbox-password = secret-at-sandbox
+survey-sandbox-username = survey-at-sandbox
+survey-sandbox-password = secret-at-sandbox
# default merchant instance
default-sandbox-username = default-at-sandbox
default-sandbox-password = secret-at-sandbox
diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml
index 1ec5567..34c3791 100644
--- a/docker/hybrid/docker-compose.yml
+++ b/docker/hybrid/docker-compose.yml
@@ -43,9 +43,11 @@ services:
depends_on:
- talerdb
ports:
- - 5556:80
+ - 5556:80 # backend
- 5559:8080 # blog
- 5560:8081 # donations
+ - 5561:8082 # survey
+ - 5562:8083 # landing
volumes:
- talerlogs:/logs
- ${TALER_DEPLOYMENT_CONFIG:?Please export
TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf
diff --git a/docker/hybrid/images/exchange/startup.sh
b/docker/hybrid/images/exchange/startup.sh
index 28596df..a0bc725 100644
--- a/docker/hybrid/images/exchange/startup.sh
+++ b/docker/hybrid/images/exchange/startup.sh
@@ -68,7 +68,10 @@ echo Launching transfer service...
taler-exchange-transfer -L DEBUG -c /config/taler.conf 2>&1 | \
rotatelogs -e /logs/taler-exchange-transfer-%Y-%m-%d 86400 &
echo DONE
-
+echo Launching aggregator service...
+taler-exchange-aggregator -L DEBUG -c /config/taler.conf 2>&1 | \
+ rotatelogs -e /logs/taler-exchange-aggregator-%Y-%m-%d 86400 &
+echo DONE
taler-exchange-offline -L DEBUG -c /config/taler.conf \
download sign \
enable-account
"payto://iban/SANDBOXX/${EXCHANGE_IBAN}?receiver-name=Exchange+Company" \
diff --git a/docker/hybrid/images/exchange/taler.conf
b/docker/hybrid/images/exchange/taler.conf
index b19f97e..1bd5124 100644
--- a/docker/hybrid/images/exchange/taler.conf
+++ b/docker/hybrid/images/exchange/taler.conf
@@ -1,5 +1,6 @@
[taler]
currency = __CURRENCY__
+currency_round_unit = __CURRENCY__:0.01
[paths]
taler_data_home = /data/exchange
diff --git a/docker/hybrid/images/libeufin/Dockerfile
b/docker/hybrid/images/libeufin/Dockerfile
index 992c9a1..295887c 100644
--- a/docker/hybrid/images/libeufin/Dockerfile
+++ b/docker/hybrid/images/libeufin/Dockerfile
@@ -1,5 +1,6 @@
FROM taler_local/taler_base
COPY startup.sh /
+COPY create_bank_accounts.sh /
RUN chmod +x /startup.sh
ENTRYPOINT /startup.sh
diff --git a/docker/hybrid/images/libeufin/create_bank_accounts.sh
b/docker/hybrid/images/libeufin/create_bank_accounts.sh
new file mode 100644
index 0000000..449f46e
--- /dev/null
+++ b/docker/hybrid/images/libeufin/create_bank_accounts.sh
@@ -0,0 +1,43 @@
+BLOG_IBAN=DE940993
+GNUNET_IBAN=DE463312
+DEFAULT_IBAN=DE474361
+TOR_IBAN=DE358263
+TALER_IBAN=DE102893
+SURVEY_IBAN=DE731371
+
+EXCHANGE_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o exchange-sandbox-username`
+EXCHANGE_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o exchange-sandbox-password`
+BLOG_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o blog-sandbox-username`
+BLOG_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o blog-sandbox-password`
+GNUNET_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o gnunet-sandbox-username`
+GNUNET_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o gnunet-sandbox-password`
+DEFAULT_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o default-sandbox-username`
+DEFAULT_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o default-sandbox-password`
+TOR_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o tor-sandbox-username`
+TOR_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o tor-sandbox-password`
+TALER_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o taler-sandbox-username`
+TALER_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o taler-sandbox-password`
+SURVEY_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o survey-sandbox-username`
+SURVEY_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o survey-sandbox-password`
+
+echo -n "create default merchant instance bank account..."
+register_sandbox_account $DEFAULT_SANDBOX_USERNAME $DEFAULT_SANDBOX_PASSWORD
$DEFAULT_IBAN "default merchant instance"
+echo DONE
+echo -n "create exchange bank account..."
+register_sandbox_account $EXCHANGE_SANDBOX_USERNAME $EXCHANGE_SANDBOX_PASSWORD
$EXCHANGE_IBAN "exchange company"
+echo DONE
+echo -n "create Blog bank account..."
+register_sandbox_account $BLOG_SANDBOX_USERNAME $BLOG_SANDBOX_PASSWORD
$BLOG_IBAN BlogCompany
+echo DONE
+echo -n "create GNUnet bank account..."
+register_sandbox_account $GNUNET_SANDBOX_USERNAME $GNUNET_SANDBOX_PASSWORD
$GNUNET_IBAN GNUnet
+echo DONE
+echo -n "create Taler bank account..."
+register_sandbox_account $TALER_SANDBOX_USERNAME $TALER_SANDBOX_PASSWORD
$TALER_IBAN Taler
+echo DONE
+echo -n "create Tor bank account..."
+register_sandbox_account $TOR_SANDBOX_USERNAME $TOR_SANDBOX_PASSWORD $TOR_IBAN
Tor
+echo DONE
+echo -n "create survey bank account..."
+register_sandbox_account $SURVEY_SANDBOX_USERNAME $SURVEY_SANDBOX_PASSWORD
$SURVEY_IBAN Survey
+echo DONE
diff --git a/docker/hybrid/images/libeufin/startup.sh
b/docker/hybrid/images/libeufin/startup.sh
index 805d4ea..02048e8 100644
--- a/docker/hybrid/images/libeufin/startup.sh
+++ b/docker/hybrid/images/libeufin/startup.sh
@@ -40,11 +40,8 @@ is_serving() {
fi
echo $2 reachable.
}
-# IBANs referenced in the merchant container as well.
-DEFAULT_IBAN=DE474361
EXCHANGE_IBAN=DE159593
-BLOG_IBAN=DE940993
-GNUNET_IBAN=DE463312
+
mkdir -p ${MAYBE_VOLUME_MOUNTPOINT}
export
LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:${MAYBE_VOLUME_MOUNTPOINT}/sandbox.sqlite3"
export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret
@@ -62,27 +59,8 @@ libeufin-sandbox serve --no-localhost-only --port
$SANDBOX_PORT 2>&1 | \
echo DONE
is_serving ${LIBEUFIN_SANDBOX_URL} Sandbox
-EXCHANGE_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o exchange-sandbox-username`
-EXCHANGE_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o exchange-sandbox-password`
-BLOG_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o blog-sandbox-username`
-BLOG_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o blog-sandbox-password`
-GNUNET_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o gnunet-sandbox-username`
-GNUNET_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o gnunet-sandbox-password`
-DEFAULT_SANDBOX_USERNAME=`taler-config -c /config/deployment.conf -s
taler-deployment -o default-sandbox-username`
-DEFAULT_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s
taler-deployment -o default-sandbox-password`
+source create_bank_accounts.sh
-echo -n "create default merchant instance bank account..."
-register_sandbox_account $DEFAULT_SANDBOX_USERNAME $DEFAULT_SANDBOX_PASSWORD
$DEFAULT_IBAN "default merchant instance"
-echo DONE
-echo -n "create exchange bank account..."
-register_sandbox_account $EXCHANGE_SANDBOX_USERNAME $EXCHANGE_SANDBOX_PASSWORD
$EXCHANGE_IBAN "exchange company"
-echo DONE
-echo -n "create Blog bank account..."
-register_sandbox_account $BLOG_SANDBOX_USERNAME $BLOG_SANDBOX_PASSWORD
$BLOG_IBAN BlogCompany
-echo DONE
-echo -n "create GNUnet bank account..."
-register_sandbox_account $GNUNET_SANDBOX_USERNAME $GNUNET_SANDBOX_PASSWORD
$GNUNET_IBAN GNUnet
-echo DONE
echo -n "Create exchange EBICS subscriber at Sandbox.."
export LIBEUFIN_SANDBOX_USERNAME=admin
export LIBEUFIN_SANDBOX_PASSWORD=secret
diff --git a/docker/hybrid/images/merchant/Dockerfile
b/docker/hybrid/images/merchant/Dockerfile
index 4f744a5..4121177 100644
--- a/docker/hybrid/images/merchant/Dockerfile
+++ b/docker/hybrid/images/merchant/Dockerfile
@@ -2,5 +2,6 @@ FROM taler_local/taler_base
COPY taler.conf /config/taler.conf
COPY startup.sh /
+COPY create_instances.sh /
RUN chmod +x /startup.sh
ENTRYPOINT /startup.sh
diff --git a/docker/hybrid/images/merchant/create_instances.sh
b/docker/hybrid/images/merchant/create_instances.sh
new file mode 100644
index 0000000..bc0a860
--- /dev/null
+++ b/docker/hybrid/images/merchant/create_instances.sh
@@ -0,0 +1,18 @@
+echo -n "Create default instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$DEFAULT_IBAN'?receiver-name=Merchant43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
+echo -n "Create blog instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$BLOG_IBAN'?receiver-name=BlogCompany"],"id":"blog","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
+echo -n "Create GNUnet instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$GNUNET_IBAN'?receiver-name=GNUnet"],"id":"GNUnet","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
+echo -n "Create Taler instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$TALER_IBAN'?receiver-name=GNUnet"],"id":"GNUnet","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
+echo -n "Create Tor instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$TOR_IBAN'?receiver-name=GNUnet"],"id":"GNUnet","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
+echo -n "Create survey instance..."
+curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$SURVEY_IBAN'?receiver-name=GNUnet"],"id":"GNUnet","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
+echo DONE
diff --git a/docker/hybrid/images/merchant/startup.sh
b/docker/hybrid/images/merchant/startup.sh
index b6b2ca8..49dcff1 100644
--- a/docker/hybrid/images/merchant/startup.sh
+++ b/docker/hybrid/images/merchant/startup.sh
@@ -8,9 +8,13 @@ CURRENCY=`taler-config -c /config/deployment.conf -s
taler-deployment -o currenc
BACKEND_APIKEY=`taler-config -c /config/deployment.conf -s taler-deployment -o
merchant-apikey`
EXCHANGE_URL="http://exchange/"
DB_PASSWORD=`taler-config -c /config/deployment.conf -s taler-deployment -o
db-password`
+
BLOG_IBAN=DE940993
GNUNET_IBAN=DE463312
DEFAULT_IBAN=DE474361
+TOR_IBAN=DE358263
+TALER_IBAN=DE102893
+SURVEY_IBAN=DE731371
while ! pg_isready -h talerdb -d taler; do
echo DB not ready yet.
@@ -68,15 +72,14 @@ taler-merchant-httpd -c /config/taler.conf 2>&1 | \
rotatelogs -e /logs/taler-merchant-httpd-%Y-%m-%d 86400 &
echo DONE
sleep 1
-echo -n "Create default instance..."
-curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$DEFAULT_IBAN'?receiver-name=Merchant43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
-echo DONE
-echo -n "Create blog instance..."
-curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$BLOG_IBAN'?receiver-name=BlogCompany"],"id":"blog","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
-echo DONE
-echo -n "Create donations instance..."
-curl -s -H "Content-Type: application/json" -X POST -d
'{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/'$GNUNET_IBAN'?receiver-name=GNUnet"],"id":"GNUnet","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"'${CURRENCY}':1",
"default_max_deposit_fee":"'${CURRENCY}':1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
: 1000000},"default_pay_delay":{"d_us": 3600000000}}'
http://merchant/management/instances
-echo DONE
+
+source /create_instances.sh
+
+export TALER_ENV_URL_MERCHANT_BLOG=`taler-config -c /config/deployment.conf -s
taler-deployment -o blog-url`
+export TALER_ENV_URL_MERCHANT_DONATIONS=`taler-config -c
/config/deployment.conf -s taler-deployment -o donations-url`
+export TALER_ENV_URL_MERCHANT_SURVEY=`taler-config -c /config/deployment.conf
-s taler-deployment -o survey-url`
+export TALER_ENV_URL_INTRO=`taler-config -c /config/deployment.conf -s
taler-deployment -o landing-url`
+export TALER_ENV_URL_BANK=`taler-config -c /config/deployment.conf -s
taler-deployment -o bank-url`
echo -n "Launch blog..."
${HOME}/.local/bin/taler-merchant-demos -c /config/taler.conf --http-port 8080
blog &
@@ -84,5 +87,10 @@ echo DONE
echo -n "Launch donations..."
${HOME}/.local/bin/taler-merchant-demos -c /config/taler.conf --http-port 8081
donations &
echo DONE
-
+echo -n "Launch Survey..."
+${HOME}/.local/bin/taler-merchant-demos -c /config/taler.conf --http-port 8082
survey &
+echo DONE
+echo -n "Launch Landing..."
+${HOME}/.local/bin/taler-merchant-demos -c /config/taler.conf --http-port 8083
landing &
+echo DONE
wait
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-deployment] branch master updated (251babb -> f241499),
gnunet <=