taler-deployment

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

commit 81b9ff7793ce77f7f025fa0e1e946b8445c3a425
parent 5310e58bd923eecee249b0fa1c7aebb28f8af3e5
Author: MS <ms@taler.net>
Date:   Fri, 11 Sep 2020 15:46:01 +0200

offline deployment, WIP

Diffstat:
Mbin/taler-deployment | 30++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/bin/taler-deployment b/bin/taler-deployment @@ -26,6 +26,7 @@ from pathlib import Path from dataclasses import dataclass from typing import List, Callable from shutil import copy +from taler_urls import get_urls activate_template = """\ #!/bin/bash @@ -40,15 +41,15 @@ export PYTHONUSERBASE=$HOME/local export TALER_BOOTSTRAP_TIMESTAMP={timestamp} export TALER_CONFIG_CURRENCY={currency} export TALER_ENV_NAME={envname} -export TALER_ENV_URL_INTRO="https://{envname}.taler.net/" -export TALER_ENV_URL_BANK="https://bank.{envname}.taler.net/" -export TALER_ENV_URL_MERCHANT_BLOG="https://shop.{envname}.taler.net/" -export TALER_ENV_URL_MERCHANT_DONATIONS="https://donations.{envname}.taler.net/" -export TALER_ENV_URL_MERCHANT_SURVEY="https://survey.{envname}.taler.net/" -export TALER_ENV_URL_AUDITOR="https://auditor.{envname}.taler.net/" -export TALER_ENV_URL_BACKOFFICE="https://backoffice.{envname}.taler.net/" -export TALER_ENV_URL_SYNC="https://sync.{envname}.taler.net/" -export TALER_ENV_MERCHANT_BACKEND="http://backend.{envname}.taler.net/" +export TALER_ENV_URL_INTRO="{landing}" +export TALER_ENV_URL_BANK="https://{bank}/" +export TALER_ENV_URL_MERCHANT_BLOG="https://{blog}/" +export TALER_ENV_URL_MERCHANT_DONATIONS="https://{donations}/" +export TALER_ENV_URL_MERCHANT_SURVEY="https://{survey}/" +export TALER_ENV_URL_AUDITOR="https://{auditor}/" +export TALER_ENV_URL_BACKOFFICE="https://{backoffice}/" +export TALER_ENV_URL_SYNC="https://{sync}/" +export TALER_ENV_MERCHANT_BACKEND="http://{merchant_backend}/" export TALER_COVERAGE={coverage} """ @@ -82,7 +83,8 @@ currmap = { "euro": "EUR", "chf": "CHF", "auditor-reporter-test": "TESTKUDOS", - "auditor-reporter-demo": "KUDOS" + "auditor-reporter-demo": "KUDOS", + "local": "LOCALKUDOS" } @@ -518,7 +520,6 @@ def sync_repos() -> None: r_dir = home / "sources" / r.name subprocess.run(["git", "-C", str(r_dir), "clean", "-fdx"], check=True) - @cli.command() def bootstrap() -> None: """Bootstrap a GNU Taler deployment.""" @@ -543,12 +544,13 @@ def bootstrap() -> None: currency=currmap[envname], curr_path=os.environ["PATH"], coverage=1 if envname == "coverage" else 0, + **get_urls(envname) ) ) + if envname != "local": + (home / "sockets").mkdir(parents=True, exist_ok=True) - (home / "sockets").mkdir(parents=True, exist_ok=True) - - if envname in ("test", "int"): + if envname in ("test", "int", "local"): (home / "taler-data").mkdir(parents=True, exist_ok=True) if envname == "demo": create_bb_worker("buildbot-worker-demo-topper.service",