gnunet-svn
[Top][All Lists]
Advanced

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

[taler-sandcastle-ng] branch master updated (25e8dbe -> 84f629d)


From: gnunet
Subject: [taler-sandcastle-ng] branch master updated (25e8dbe -> 84f629d)
Date: Tue, 10 Dec 2024 19:25:53 +0100

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

dold pushed a change to branch master
in repository sandcastle-ng.

    from 25e8dbe  define hooks for merchant config
     new 25b9d12  Add script sandcastle-stop.
     new 3b6994b  Add documentation about script 'sandcastle-plow'.
     new 3c0f892  sandcastle-run: Add support for specifying the host ip to 
listen on.
     new 9f6a1be  sandcastle-run: With "external port" listen on localhost only 
by default.
     new 52ca148  Enhance Readme.
     new 12b5764  sandcastle-logs: Pass arguments on to journalctl in container.
     new ffed199  Add documentation about script 'sandcastle-logs'.
     new 84f629d  setup-sandcastle: Fix error in reverse proxy config.

The 8 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:
 README.md                        | 78 ++++++++++++++++++++++++++++++++++++----
 sandcastle-logs                  |  4 +--
 sandcastle-run                   |  3 +-
 sandcastle-stop                  |  7 ++++
 scripts/demo/setup-sandcastle.sh |  2 +-
 5 files changed, 83 insertions(+), 11 deletions(-)
 create mode 100755 sandcastle-stop

diff --git a/README.md b/README.md
index 4902899..a42bb35 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,12 @@ port for each of the services.
 
 # Configuring the Deployment
 
+If you just want to play around with the Taler services inside the container,
+or want to get an integration development environment,
+there is a nice preset, see below.
+Thus in these cases no configuration is required
+and you can skip to "RUnning the Deployment" below.
+
 For Taler developers, it is recommended that for each sandcastle deployment,
 you clone the sandcastle-ng.git repository
 (https://git.taler.net/sandcastle-ng.git) and create a branch with
@@ -59,32 +65,80 @@ To make adjustments for an environment without changing the
 beginning of ``setup-sandcastle.sh`` and can be used to customize
 environment-specific settings such as hostnames.
 
-In order to choose an override, set the ``SANDCASTLE_OVERRIDE_NAME`` 
environment variable
-before running `./sandcastle-run`.
+In order to choose an override,
+set the ``SANDCASTLE_OVERRIDE_NAME`` environment variable
+before running `./sandcastle-run`:
+
+    SANDCASTLE_OVERRIDE_NAME=$YOUR_ENVIRONMENT ./sandcastle-run
+
 
 The following variables are typically adjusted in an override file:
 
 * ``CURRENCY``: Currency of the deployment
 * ``MYDOMAIN``: Parent domain name for ``{bank,exchange,backend}`` services.
+* ``EXTERNAL_PORT``: The host port the services will be available on.
+* ``EXTERNAL_IP``: The host IP the services will be available on.
+  For security reasons this defaults to localhost (127.0.0.1).
+* ``USE_INSECURE_SANDBOX_PASSWORDS``:
+    If set to `1`, use password `sandbox` for all services instead of random 
ones.
+    WARNING! Use only when listening to localhost only!
 
 
 # Running the Deployment
 
-Run ``./sandcastle-run`` to run the single container.  The container will be
-named taler-sandcastle.
+Run ``./sandcastle-run`` to run the single container.
+The container will be named `taler-sandcastle`.
+On the first run, wait until everything has been set up:
+
+    ./sandcastle-logs
+
+
+Note that ``./sandcastle-run`` is just a wrapper around ``podman run``.
+If required, you can pass addtional arguments to ``./sandcastle-run``.
+These will be passed on to ``podman run``. Example:
 
-You can run the container in the background by passing ``-d``.  Note that 
``./sandcastle-run`` is just
-a wrapper around ``podman run``.
+    ./sandcastle-run --log-level=debug
 
 The running container publishes ports to the host as defined in 
``./sandcastle-run``.
 You can manually verify these port mappings via ``podman port 
taler-sandcastle``.
 
+When starting sandcastle like
+
+    SANDCASTLE_OVERRIDE_NAME=taler.localhost ./sandcastle-run
+
+the services will be available as
+
+ - http://taler.localhost:4321
+ - http://bank.taler.localhost:4321
+ - http://shop.taler.localhost:4321
+ - http://donations.taler.localhost:4321
+ - http://backend.taler.localhost:4321  - the merchant backend
+ - http://exchange.taler.localhost:4321
+ - http://auditor.taler.localhost:4321
+ - http://challenger.taler.localhost:4321
+
+This gives a nice environment for integration testing.
+
+
 # Stopping the deployment
 
+For stopping the deployment simply run
+
 ```
-podman stop taler-sandcastle
+./sandcastle-stop
 ```
 
+which is just a shortcut for ``podman stop taler-sandcastle``.
+
+
+# Watching Logs
+
+Run ``./sandcastle-logs`` to watch the logs within the container.
+You can pass addtional arguments to ``./sandcastle-logs``,
+which will be passed on to ``journalctl`` in the container.  Example:
+
+    ./sandcastle-logs --output=cat
+
 
 # Poking Around
 
@@ -112,6 +166,16 @@ by running ``podman volume inspect talerdata``.
 
 That volume also contains the postgres database files.
 
+## Cleaning the Data Storage
+
+For cleaning the data storage run
+
+    ./sandcastle-plow
+
+and for cleaning also the persistent storage run
+
+    ./sandcastle-plow all
+
 
 # Provisioning Details
 
diff --git a/sandcastle-logs b/sandcastle-logs
index 7b10f32..2034cbd 100755
--- a/sandcastle-logs
+++ b/sandcastle-logs
@@ -1,4 +1,4 @@
 #!/usr/bin/env bash
-set -exou
+set -exu
 
-exec podman exec -it taler-sandcastle journalctl -f
+exec podman exec -it taler-sandcastle journalctl -f "$@"
diff --git a/sandcastle-run b/sandcastle-run
index d038add..9b50cab 100755
--- a/sandcastle-run
+++ b/sandcastle-run
@@ -42,9 +42,10 @@ SETUP_NAME=${SANDCASTLE_SETUP_NAME:-demo}
 if [[ -n ${SANDCASTLE_OVERRIDE_NAME:-} ]]; then
   OVERRIDES="-v $PWD/overrides/${SANDCASTLE_OVERRIDE_NAME}:/overrides:Z"
   EXTERNAL_PORT=$(source $PWD/overrides/${SANDCASTLE_OVERRIDE_NAME}; echo 
${EXTERNAL_PORT:-})
+  EXTERNAL_IP=$(source $PWD/overrides/${SANDCASTLE_OVERRIDE_NAME}; echo 
${EXTERNAL_IP:-127.0.0.1})
   if [[ $EXTERNAL_PORT =~ ^[0-9]+$ ]]; then
     echo Serving via port $EXTERNAL_PORT
-    PUBLISH_EXTERNAL_PORT="-p=${EXTERNAL_PORT}:${EXTERNAL_PORT}"
+    
PUBLISH_EXTERNAL_PORT="-p=${EXTERNAL_IP}${EXTERNAL_IP:+:}${EXTERNAL_PORT}:${EXTERNAL_PORT}"
   fi
 else
   OVERRIDES=""
diff --git a/sandcastle-stop b/sandcastle-stop
new file mode 100755
index 0000000..1c4fda0
--- /dev/null
+++ b/sandcastle-stop
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# Stop the Taler container
+
+set -eu
+
+exec podman stop taler-sandcastle
diff --git a/scripts/demo/setup-sandcastle.sh b/scripts/demo/setup-sandcastle.sh
index f529433..787cfa7 100755
--- a/scripts/demo/setup-sandcastle.sh
+++ b/scripts/demo/setup-sandcastle.sh
@@ -270,7 +270,7 @@ http://$EXCHANGE_DOMAIN$PORT_SUFFIX {
 }
 
 http://$MERCHANT_DOMAIN$PORT_SUFFIX {
-  reverse_proxy unix//run/taler-exchange/httpd/merchant-http.sock {
+  reverse_proxy unix//run/taler-merchant/httpd/merchant-http.sock {
     # Set this, or otherwise wrong taler://pay URIs will be generated.
     header_up X-Forwarded-Proto "https"
   }

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