diff options
author | MS <ms@taler.net> | 2020-09-11 16:27:18 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2020-09-11 16:27:18 +0200 |
commit | 0fbbaa89361621e3bce53945f41430c2d3fa8817 (patch) | |
tree | 7e00424ee20c97becc9033a8a1864fdc2ac39252 /bin/taler-config-generate | |
parent | 3958a9931eb2f182a05e1978e92dc4f62135e737 (diff) | |
download | deployment-0fbbaa89361621e3bce53945f41430c2d3fa8817.tar.gz deployment-0fbbaa89361621e3bce53945f41430c2d3fa8817.tar.bz2 deployment-0fbbaa89361621e3bce53945f41430c2d3fa8817.zip |
remove twister from config generator
Diffstat (limited to 'bin/taler-config-generate')
-rwxr-xr-x | bin/taler-config-generate | 77 |
1 files changed, 8 insertions, 69 deletions
diff --git a/bin/taler-config-generate b/bin/taler-config-generate index 435fa51..24ca6f4 100755 --- a/bin/taler-config-generate +++ b/bin/taler-config-generate @@ -9,12 +9,11 @@ import stat from taler_urls import get_urls class ConfigFile: - def __init__(self, envname, currency, exchange_pub, twisted, filename): + def __init__(self, envname, currency, exchange_pub, filename): self.sections = OrderedDict() self.envname = envname self.filename = filename self.currency = currency - self.twisted = twisted self.exchange_pub = exchange_pub def destroy(self): @@ -68,23 +67,6 @@ def config(obj): obj.cfg_put("taler", "CURRENCY", obj.currency) obj.cfg_put("taler", "CURRENCY_ROUND_UNIT", f"{obj.currency}:0.01") - # Twisting the merchant backend responses. - if obj.twisted: - - ## - # Instructs ARM to lunch the Twisters, any value works. - # If missing, ARM will not launch Twisters. - obj.cfg_put("twister", "taler_deploy", "") - - obj.cfg_put("twister", "serve", "unix") - obj.cfg_put("twister", "chaos_rate", "20") - obj.cfg_put("twister", "destination_base_url", urls["merchant_backend"]) - obj.cfg_put("twister", "serve_unixpath", "$HOME/sockets/twister.http") - obj.cfg_put("twister", "serve_unixmode", "660") - obj.cfg_put("twister", "unixpath", "$HOME/sockets/twister-control.sock") - obj.cfg_put("twister", "unix_match_uid", "no") - obj.cfg_put("twister", "unix_match_gid", "yes") - obj.cfg_put("bank", "serve", "uwsgi") obj.cfg_put("bank", "uwsgi_serve", "unix") obj.cfg_put("bank", "uwsgi_unixpath", "$HOME/sockets/bank.uwsgi") @@ -127,23 +109,15 @@ def config(obj): obj.cfg_put("merchant", "wire_transfer_delay", "0 s") obj.cfg_put("merchant", "default_max_wire_fee", obj.currency + ":" + "0.01") obj.cfg_put("merchant", "default_max_deposit_fee", obj.currency + ":" + "0.05") - obj.cfg_put("merchantdb-postgres", "config", "postgres:///taler{}".format(obj.envname)) obj.cfg_put("frontends", "backend_apikey", "sandbox") - - if "demo" != obj.envname and obj.twisted: - obj.cfg_put("frontends", "backend", "https://twister-backend.wild.gv.taler.net/") - else: - obj.cfg_put("frontends", "backend", urls["merchant_backend"]) + obj.cfg_put("frontends", "backend", urls["merchant_backend"]) obj.cfg_put("merchant-exchange-{}".format(obj.currency), "master_key", obj.exchange_pub) obj.cfg_put("merchant-exchange-{}".format(obj.currency), "currency", obj.currency) - if "demo" != obj.envname and obj.twisted: - obj.cfg_put("merchant-exchange-{}".format(obj.currency), "exchange_base_url", "https://twister-exchange.wild.gv.taler.net/") - else: - obj.cfg_put("merchant-exchange-{}".format(obj.currency), "exchange_base_url", urls["exchange"]) + obj.cfg_put("merchant-exchange-{}".format(obj.currency), "exchange_base_url", urls["exchange"]) obj.cfg_put("auditor", "serve", "unix") obj.cfg_put("auditor", "auditor_url", urls["auditor"]) obj.cfg_put("auditor", "unixpath", "$HOME/sockets/auditor.http") @@ -161,10 +135,7 @@ def config(obj): obj.cfg_put("auditordb-postgres", "db_conn_str", "postgres:///taler{}".format(obj.envname)) obj.cfg_put("auditordb-postgres", "config", "postgres:///taler{}".format(obj.envname)) - if "demo" != obj.envname and obj.twisted: - bank_acct_url = "https://twister-bank.wild.gv.taler.net/taler-wire-gateway/Exchange/" - else: - bank_acct_url = f"{}taler-wire-gateway/Exchange/".format(urls["bank"]) + bank_acct_url = f"{}taler-wire-gateway/Exchange/".format(urls["bank"]) obj.cfg_put("exchange-account-1", "payto_uri", "{}Exchange".format(urls["talerbank_payto"])) obj.cfg_put("exchange-account-1", "wire_response", "${TALER_DATA_HOME}/exchange/wire/test.json") @@ -206,14 +177,10 @@ def config(obj): # how long do we generate denomination and signing keys # ahead of time? obj.cfg_put("exchange_keys", "lookahead_sign", "32 weeks 1 day") - obj.cfg_put("exchange_keys", "lookahead_provide", "4 weeks 1 day") - if "demo" != obj.envname and obj.twisted: - obj.cfg_put("merchant-account-merchant", "payto_uri", "payto://x-taler-bank/twister-bank.taler.net/Tutorial") - else: - obj.cfg_put("merchant-account-merchant", "payto_uri", "{}Tutorial".format(urls["talerbank_payto"])) + obj.cfg_put("merchant-account-merchant", "payto_uri", "{}Tutorial".format(urls["talerbank_payto"])) obj.cfg_put("merchant-account-merchant", "wire_response", "${TALER_DATA_HOME}/merchant/wire/merchant.json") obj.cfg_put("merchant-account-merchant", "wire_file_mode", "770") @@ -236,8 +203,7 @@ def config(obj): @click.option("--outdir", required=True) # datadir is where all keys / wire-details files / are placed. @click.option("--exchange-pub", required=True) -@click.option("--twisted", is_flag=True) -def main(currency, envname, outdir, exchange_pub, twisted): +def main(currency, envname, outdir, exchange_pub): if envname not in ("demo", "test", "int", "euro", "chf"): print("envname (%s) not demo/test/int, aborting config generation" % envname) @@ -245,11 +211,11 @@ def main(currency, envname, outdir, exchange_pub, twisted): config_files = [] - mc = ConfigFile(envname, currency, exchange_pub, twisted, "taler.conf") + mc = ConfigFile(envname, currency, exchange_pub, "taler.conf") config(mc) config_files.append(mc) - sc = ConfigFile(envname, currency, exchange_pub, twisted, "sync.conf") + sc = ConfigFile(envname, currency, exchange_pub, "sync.conf") sc.cfg_put("sync", "annual_fee", sc.currency+":0.1") sc.cfg_put("sync", "serve", "unix") sc.cfg_put("syncdb-postgres", "config", "postgres:///taler%s" % envname) @@ -258,33 +224,6 @@ def main(currency, envname, outdir, exchange_pub, twisted): sc.cfg_put("sync", "unixpath", "$HOME/sockets/sync.http") config_files.append(sc) - if "demo" != envname and twisted: - - # Twisting the exchange. - twist_exchange_conf = ConfigFile(envname, currency, exchange_pub, "twister-exchange.conf") - twist_exchange_conf.cfg_put("twister", "serve", "unix") - twist_exchange_conf.cfg_put("twister", "chaos_rate", "20") - twist_exchange_conf.cfg_put("twister", "destination_base_url", urls["exchange"]) - twist_exchange_conf.cfg_put("twister", "serve_unixpath", "$HOME/sockets/twister-exchange.http") - twist_exchange_conf.cfg_put("twister", "serve_unixmode", "660") - twist_exchange_conf.cfg_put("twister", "unixpath", "$HOME/sockets/twister-exchange-control.sock") - twist_exchange_conf.cfg_put("twister", "unix_match_uid", "no") - twist_exchange_conf.cfg_put("twister", "unix_match_gid", "yes") - config_files.append(twist_exchange_conf) - - # Twisting the bank. - twist_bank_conf = ConfigFile(envname, currency, exchange_pub, "twister-bank.conf") - twist_bank_conf.cfg_put("twister", "serve", "unix") - twist_bank_conf.cfg_put("twister", "chaos_rate", "20") - twist_bank_conf.cfg_put("twister", "destination_base_url", urls["bank"]) - twist_bank_conf.cfg_put("twister", "serve_unixpath", "$HOME/sockets/twister-bank.http") - twist_bank_conf.cfg_put("twister", "serve_unixmode", "660") - twist_bank_conf.cfg_put("twister", "unixpath", "$HOME/sockets/twister-bank-control.sock") - twist_bank_conf.cfg_put("twister", "unix_match_uid", "no") - twist_bank_conf.cfg_put("twister", "unix_match_gid", "yes") - - config_files.append(twist_bank_conf) - assert (0 < len(config_files)) for obj in config_files: obj.cfg_write(outdir) |