gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated (8bc85c2 -> 503cb67)


From: gnunet
Subject: [taler-deployment] branch master updated (8bc85c2 -> 503cb67)
Date: Sat, 27 Nov 2021 07:52:09 +0100

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

ms pushed a change to branch master
in repository deployment.

    from 8bc85c2  taler-local proxy
     new 3b62a61  taler-local: fix frontends navigation bar
     new 503cb67  taler-local: get instances payto RESTfully

The 2 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:
 bin/WIP/taler-local | 73 +++++++++++++++++++++++++++++++++++------------------
 1 file changed, 49 insertions(+), 24 deletions(-)

diff --git a/bin/WIP/taler-local b/bin/WIP/taler-local
index 7fe431a..a777ac7 100755
--- a/bin/WIP/taler-local
+++ b/bin/WIP/taler-local
@@ -742,7 +742,6 @@ def prepare():
         # This value is BOTH a username
         # and a bank account label.
         bank_account_name,
-        bank_account_iban,
         password
     ):
         demobank_url = urljoin_nodrop(sandbox_url, "/demobanks/default")
@@ -799,7 +798,9 @@ def prepare():
     # Instances
     INSTANCES = {
         "GNUnet": IBAN_MERCHANT_DEMOSHOP,
-        "FSF": IBAN_MERCHANT_DEMOSHOP,
+        "Taler": IBAN_MERCHANT_DEMOSHOP,
+        "Tor": IBAN_MERCHANT_DEMOSHOP,
+        "survey": IBAN_MERCHANT_DEMOSHOP,
         "blog": IBAN_MERCHANT_DEMOSHOP
     }
     
@@ -966,7 +967,6 @@ def prepare():
         currency,
         rev_proxy_url,
         wire_method,
-        exchange_iban,
         merchant_wire_address,
         exchange_wire_gateway_username,
         exchange_wire_gateway_password,
@@ -1087,12 +1087,6 @@ def prepare():
         obj.cfg_put("exchangedb-postgres", "config", "postgres:///taler")
         obj.cfg_put("auditordb-postgres", "db_conn_str", "postgres:///taler")
         obj.cfg_put("auditordb-postgres", "config", "postgres:///taler")
-    
-        # Better to get this value from GET /accounts at Sandbox.
-        obj.cfg_put(
-            "exchange-account-1",
-            "payto_uri", 
f"payto://iban/SANDBOXX/{exchange_iban}?receiver-name=Unknown"
-        )
         obj.cfg_put("exchange-account-1", "enable_debit", "yes")
         obj.cfg_put("exchange-account-1", "enable_credit", "yes")
         obj.cfg_put("merchant-account-merchant", "payto_uri",
@@ -1176,7 +1170,6 @@ def prepare():
         currency=CURRENCY,
         rev_proxy_url=REV_PROXY_URL,
         wire_method=WIRE_METHOD,
-        exchange_iban=IBAN_EXCHANGE,
         merchant_wire_address=IBAN_MERCHANT_DEFAULT,
         exchange_wire_gateway_username=EXCHANGE_NEXUS_USERNAME,
         exchange_wire_gateway_password=EXCHANGE_NEXUS_PASSWORD,
@@ -1361,12 +1354,11 @@ Logs: {rev_proxy.get_log_filename()}"
         ebics_user_id=EXCHANGE_EBICS_USER_ID,
         person_name="Exchange Owner",
         bank_account_name=EXCHANGE_BANK_ACCOUNT_SANDBOX,
-        bank_account_iban=IBAN_EXCHANGE,
         password=EXCHANGE_BANK_ACCOUNT_PASSWORD
     )
     print(" OK")
     print_nn("Getting exchange payto-URI from the bank.")
-    exchange_bank_account_info=get_sandbox_account_info(
+    exchange_bank_account_info = get_sandbox_account_info(
         SANDBOX_URL,
         EXCHANGE_BANK_ACCOUNT_SANDBOX,
         EXCHANGE_BANK_ACCOUNT_PASSWORD
@@ -1404,7 +1396,6 @@ Logs: {rev_proxy.get_log_filename()}"
             ebics_user_id=f"unused{instance_id}EbicsUserId",
             person_name=f"Shop Owner of {instance_id}",
             bank_account_name=f"sandbox-account-{instance_id.lower()}",
-            bank_account_iban=iban,
             password=ALL_INSTANCES_BANK_PASSWORD
         )
         print(" OK")
@@ -1416,7 +1407,6 @@ Logs: {rev_proxy.get_log_filename()}"
         ebics_user_id="unusedCustomerEbicsUserId",
         person_name="Customer Person",
         bank_account_name=CUSTOMER_BANK_ACCOUNT,
-        bank_account_iban=IBAN_CUSTOMER,
         password=CUSTOMER_BANK_PASSWORD
     )
     print(" OK")
@@ -1501,9 +1491,6 @@ Logs: {rev_proxy.get_log_filename()}"
     print_nn("Terminating Nexus...")
     nexus_handle.stop()
     print(" OK")
-    print_nn("Terminating Sandbox...")
-    sandbox_handle.stop()
-    print(" OK")
     print_nn("Set suggested exchange at Sandbox...")
     Command([
         "libeufin-sandbox",
@@ -1579,12 +1566,15 @@ Logs: {rev_proxy.get_log_filename()}"
             urljoin_nodrop(backend_url, f"management/instances/{instance_id}"),
             headers = auth_header
         )
+        bankaccount_info = get_sandbox_account_info(
+            SANDBOX_URL,
+            f"sandbox-account-{instance_id.lower()}",
+            ALL_INSTANCES_BANK_PASSWORD
+        )
         req = dict(
             id=instance_id,
             name=f"Name of '{instance_id}'",
-            payto_uris=[
-                
f"payto://{wire_method}/{bank_hostname}/{merchant_wire_address}?receiver-name=Unknown"
-            ],
+            payto_uris=[bankaccount_info["paytoUri"]],
             address=dict(),
             jurisdiction=dict(),
             default_max_wire_fee=f"{currency}:1",
@@ -1626,7 +1616,17 @@ Logs: {rev_proxy.get_log_filename()}"
             rev_proxy
         )
     print(" OK")
-
+    print_nn("Give default instance a bank account...")
+    prepare_sandbox_account(
+        sandbox_url=SANDBOX_URL,
+        ebics_host_id=EBICS_HOST_ID,
+        ebics_partner_id="unusedMerchantEbicsPartnerId",
+        ebics_user_id=f"unusedDefaultInstanceEbicsUserId",
+        person_name=f"Shop Owner of default instance",
+        bank_account_name="sandbox-account-default",
+        password=ALL_INSTANCES_BANK_PASSWORD
+    )
+    print(" OK")
     ensure_instance(
         currency=CURRENCY,
         instance_id="default",
@@ -1662,7 +1662,9 @@ Logs: {rev_proxy.get_log_filename()}"
             auth_token=FRONTENDS_API_TOKEN
         )
         print(" OK")
-
+    print_nn("Terminating Sandbox...")
+    sandbox_handle.stop()
+    print(" OK")
     print_nn("Stopping the merchant backend...")
     merchant_handle.stop()
     print(" OK")
@@ -1758,9 +1760,28 @@ Logs: {rev_proxy.get_log_filename()}"
             cmd = f"{TALER_PREFIX}/bin/taler-merchant-demos blog -c 
{CFG_OUTDIR / 'taler.conf'}",
             env = TALER_UNIT_FILES_DIR / "taler-frontends-local.env"
         ))
+    with open(TALER_UNIT_FILES_DIR / "taler-survey-local.service", "w") as 
survey_unit:
+        survey_unit.write(unit_file_content(
+            description = "Survey Website awarding tips via Taler.",
+            cmd = f"{TALER_PREFIX}/bin/taler-merchant-demos survey -c 
{CFG_OUTDIR / 'taler.conf'}",
+            env = TALER_UNIT_FILES_DIR / "taler-frontends-local.env"
+        ))
+    with open(TALER_UNIT_FILES_DIR / "taler-landing-local.service", "w") as 
landing_unit:
+        landing_unit.write(unit_file_content(
+            description = "Landing Website of Taler demo.",
+            cmd = f"{TALER_PREFIX}/bin/taler-merchant-demos landing -c 
{CFG_OUTDIR / 'taler.conf'}",
+            env = TALER_UNIT_FILES_DIR / "taler-frontends-local.env"
+        ))
     with open(TALER_UNIT_FILES_DIR / "taler-frontends-local.env", "w") as 
frontends_env:
-        frontends_env.write(f"PATH={os.environ.get('PATH')}\n")
-        frontends_env.write(f"TALER_CONFIG_FILE={CFG_OUTDIR / 'taler.conf'}\n")
+        frontends_env.write((
+            f"PATH={os.environ.get('PATH')}\n"
+            f"TALER_CONFIG_FILE={CFG_OUTDIR / 'taler.conf'}\n"
+            f"TALER_ENV_URL_INTRO={REV_PROXY_URL + '/landing/'}\n"
+            f"TALER_ENV_URL_BANK={SANDBOX_URL + '/'}\n"
+            f"TALER_ENV_URL_MERCHANT_BLOG={REV_PROXY_URL + '/blog/'}\n"
+            f"TALER_ENV_URL_MERCHANT_DONATIONS={REV_PROXY_URL + 
'/donations/'}\n"
+            f"TALER_ENV_URL_MERCHANT_SURVEY={REV_PROXY_URL + '/survey/'}\n"
+        ))
     print(" OK")
 
     # more units here..
@@ -1780,6 +1801,8 @@ def launch():
     subprocess.run(["systemctl", "--user", "start", 
"libeufin-sandbox-local.service"], check=True)
     subprocess.run(["systemctl", "--user", "start", 
"taler-donations-local.service"], check=True)
     subprocess.run(["systemctl", "--user", "start", 
"taler-blog-local.service"], check=True)
+    subprocess.run(["systemctl", "--user", "start", 
"taler-survey-local.service"], check=True)
+    subprocess.run(["systemctl", "--user", "start", 
"taler-landing-local.service"], check=True)
 
     rev_proxy = TalerReverseProxy(
         LOG_DIR,
@@ -1795,6 +1818,8 @@ def launch():
     )
     # Stop with CTRL+C
     print_nn("Stopping the services...")
+    subprocess.run(["systemctl", "--user", "stop", 
"taler-landing-local.service"], check=True)
+    subprocess.run(["systemctl", "--user", "stop", 
"taler-survey-local.service"], check=True)
     subprocess.run(["systemctl", "--user", "stop", 
"taler-blog-local.service"], check=True)
     subprocess.run(["systemctl", "--user", "stop", 
"taler-donations-local.service"], check=True)
     subprocess.run(["systemctl", "--user", "stop", 
"libeufin-sandbox-local.service"], check=True)

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