taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit ee67a917a5fc80d47371fa6004e240820fd99ea3
parent a50340f4d97b8e34cff0488cf2845bb90e20d915
Author: MS <ms@taler.net>
Date:   Thu, 13 Oct 2022 12:58:36 +0200

reduce global config values

Diffstat:
Mdocker/hybrid/config/deployment.conf | 16----------------
Mdocker/hybrid/docker-compose.yml | 2++
Mdocker/hybrid/images/exchange/startup.sh | 2+-
Mdocker/hybrid/images/libeufin/startup.sh | 11+++++++----
Mdocker/hybrid/images/merchant/startup.sh | 6+++---
5 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/docker/hybrid/config/deployment.conf b/docker/hybrid/config/deployment.conf @@ -1,18 +1,2 @@ -# In this setup, there are 3 different network views: -# -# 1, host's loopback -# 2, containers LAN -# 3, every single container's loopback - [taler-deployment] currency = EUR - -# The following URL belongs only to 2, resulting -# in the wallet NOT being able to use it. -exchange_base_url = http://exchange/ - -# The following URL belongs to 1 and 3, resulting -# in any other service _not_ running in the exchange -# container being unable to reach the exchange ( -# without an artificial bridge). -# exchange_base_url = http://localhost:5555/ diff --git a/docker/hybrid/docker-compose.yml b/docker/hybrid/docker-compose.yml @@ -31,3 +31,5 @@ services: ports: - 15000:15000 # Sandbox - 15001:15001 # Nexus + volumes: + - ${TALER_DEPLOYMENT_CONFIG}:/config/deployment.conf diff --git a/docker/hybrid/images/exchange/startup.sh b/docker/hybrid/images/exchange/startup.sh @@ -5,7 +5,7 @@ export LD_LIBRARY_PATH=/usr/local/lib # Values from config file mounted at run time: CURRENCY=`taler-config -c /config/deployment.conf -s taler-deployment -o currency` -EXCHANGE_URL=`taler-config -c /config/deployment.conf -s taler-deployment -o exchange_base_url` +EXCHANGE_URL="http://exchange/" EXCHANGE_NEXUS_USERNAME=exchange-at-nexus EXCHANGE_NEXUS_PASSWORD=x diff --git a/docker/hybrid/images/libeufin/startup.sh b/docker/hybrid/images/libeufin/startup.sh @@ -2,9 +2,12 @@ set -eu +export LD_LIBRARY_PATH=/usr/local/lib # helps taler-config +CURRENCY=`taler-config -c /config/deployment.conf -s taler-deployment -o currency` SANDBOX_PORT=15000 NEXUS_PORT=15001 SANDBOX_BASE_URL="http://localhost:${SANDBOX_PORT}" +EXCHANGE_URL="http://exchange/" # As wanted by the Libeufin CLI: export LIBEUFIN_SANDBOX_URL="${SANDBOX_BASE_URL}/demobanks/default" export LIBEUFIN_NEXUS_URL="http://localhost:${NEXUS_PORT}" @@ -41,12 +44,12 @@ EXCHANGE_IBAN=DE159593 export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:/libeufin.sqlite3" export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=secret -echo -n "Creating EUR default demobank..." -libeufin-sandbox config --currency EUR default +echo -n "Creating ${CURRENCY} default demobank..." +libeufin-sandbox config --currency ${CURRENCY} default echo DONE echo -n "Specify default exchange..." libeufin-sandbox default-exchange \ - http://localhost:5555/ \ + ${EXCHANGE_URL} \ "payto://iban/SANDBOXX/${EXCHANGE_IBAN}?receiver-name=Exchange+Company" echo DONE echo -n "Launching Sandbox..." @@ -129,7 +132,7 @@ echo -n Create the Taler facade at Nexus.. FACADE_NAME=taler-facade libeufin-cli facades \ new-taler-wire-gateway-facade \ - --currency EUR --facade-name $FACADE_NAME \ + --currency ${CURRENCY} --facade-name $FACADE_NAME \ talerconn $NEXUS_IMPORTED_BANKACCOUNT echo DONE diff --git a/docker/hybrid/images/merchant/startup.sh b/docker/hybrid/images/merchant/startup.sh @@ -4,8 +4,8 @@ set -eu export LD_LIBRARY_PATH=/usr/local/lib # Values from config file mounted at run time: -EXCHANGE_URL=`taler-config -c /config/deployment.conf -s taler-deployment -o exchange_base_url` CURRENCY=`taler-config -c /config/deployment.conf -s taler-deployment -o currency` +EXCHANGE_URL="http://exchange/" while ! pg_isready -h talerdb -d taler; do echo DB not ready yet. @@ -52,10 +52,10 @@ taler-merchant-httpd -c /config/taler.conf & 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/DE474361?receiver-name=Merchant43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"EUR:1", "default_max_deposit_fee":"EUR:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us" : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' http://merchant/management/instances +curl -s -H "Content-Type: application/json" -X POST -d '{"auth":{"method":"external"},"payto_uris":["payto://iban/SANDBOXX/DE474361?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" : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' http://merchant/management/instances echo DONE -# FIXME: the command below works around a known bug, +# FIXME: the command below works around a bug, # where demo sites ingnore the "-c" option. # mkdir ${HOME}/.config/ # ln -s /config/taler.conf ${HOME}/.config/