gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: creating TALER_ENV_FRONTENDS_A


From: gnunet
Subject: [taler-deployment] branch master updated: creating TALER_ENV_FRONTENDS_APITOKEN
Date: Wed, 28 Apr 2021 11:09:34 +0200

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

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 1e1b898  creating TALER_ENV_FRONTENDS_APITOKEN
1e1b898 is described below

commit 1e1b898c45f9b20f0e8ab7f3fce53bd5459818da
Author: MS <ms@taler.net>
AuthorDate: Wed Apr 28 11:09:31 2021 +0200

    creating TALER_ENV_FRONTENDS_APITOKEN
---
 bin/taler-deployment | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bin/taler-deployment b/bin/taler-deployment
index 6ecb171..12e7087 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -27,6 +27,8 @@ from dataclasses import dataclass
 from typing import List, Callable
 from shutil import copy
 from taler_urls import get_urls
+from string import ascii_letters, ascii_uppercase
+import random
 
 activate_template = """\
 #!/bin/bash
@@ -51,6 +53,7 @@ export TALER_ENV_URL_BACKOFFICE="{backoffice}"
 export TALER_ENV_URL_SYNC="{sync}"
 export TALER_ENV_MERCHANT_BACKEND="{merchant_backend}"
 export TALER_COVERAGE={coverage}
+export TALER_ENV_FRONTENDS_APITOKEN="{frontends_apitoken}"
 """
 
 
@@ -642,6 +645,9 @@ def sync_repos() -> None:
         r_dir = home / "sources" / r.name
         subprocess.run(["git", "-C", str(r_dir), "clean", "-fdx"], check=True)
 
+def generate_apitoken():
+    return ''.join(random.choices(ascii_letters + ascii_uppercase, k=10))
+
 @cli.command()
 def bootstrap() -> None:
     """Bootstrap a GNU Taler deployment."""
@@ -672,6 +678,7 @@ def bootstrap() -> None:
                 currency=currmap[envname],
                 curr_path=":".join(path_list),
                 coverage=1 if envname == "coverage" else 0,
+                
frontends_apitoken="secret-token:{}".format(generate_apitoken()),
                 **get_urls(envname)
             )
         )

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