View Issue Details

IDProjectCategoryView StatusLast Update
0010830Talersandcastle (containerized demo deployment)public2025-12-23 18:15
Reporterhtgoebel Assigned ToFlorian Dold  
PrioritynormalSeveritytweakReproducibilityalways
Status assignedResolutionopen 
Summary0010830: [PATCH] Small enhancements
DescriptionEnclosed please find patches for
- enhance readme
- sandcastle-enter: Allow running other program than shell
- sandcastle-build: Allow passing arguments to podman build.

     On my system this was needed to pass `--runtime=…`.
TagsNo tags attached.
Attached Files
0001-Enhance-Readme.patch (4,207 bytes)   
From 59533f037e57da15fb262416fa69930b07e9f6f8 Mon Sep 17 00:00:00 2001
Message-ID: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Tue, 10 Dec 2024 18:10:47 +0100
Subject: [PATCH 1/3] Enhance Readme.

---
 README.md | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 0a9c3b9..9c3c232 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,16 @@ port for each of the services.
 
 # Building the Container Image
 
-1. Set buildconfig/$component.tag to the right git tag you want to build
-2. Run ./sandcastle-build to build the Taler container.  The resulting container
-   is tagged as taler-base-all
+1. In `buildconfig/$component.tag` set the git tag you want to build.
+
+2. Run `./sandcastle-build` to build the Taler container.  The resulting container
+   will be tagged as `taler-base-all`.
+
+   By default `sandcastle-build` builds from the `Dockerfile`
+   in the same directory as the script.
+   Anyhow you can pass a different container file like this:
+
+       ./sandcastle-build nightly.Dockerfile
 
 
 # Configuring the Deployment
@@ -43,7 +50,7 @@ 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.
+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
@@ -55,7 +62,7 @@ Currently there is not much configuration.
 The main adjustments to be made are:
 
 * scripts/demo/setup-sandcastle.sh has the currency on top of the file
-* sandcastle-run has variables for the port that'll be exposed ("published") on
+* sandcastle-run has variables for the ports that'll be exposed ("published") on
   the host.  They can be overwritten with environment variables
   (``TALER_SANDCASTLE_PORT_$COMPONENT``).
 
@@ -81,7 +88,7 @@ The following variables are typically adjusted in an override file:
   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!
+    WARNING! Use only when listening to localhost!
 
 
 # Running the Deployment
@@ -161,7 +168,7 @@ where you have access to systemd, journalctl, etc.
 # Data Storage
 
 All persistent data is stored in a podman volume called
-talerdata.  You can see where it is in your filesystem
+_talerdata_.  You can see where it is in your filesystem
 by running ``podman volume inspect talerdata``.
 
 That volume also contains the postgres database files.
@@ -179,7 +186,8 @@ and for cleaning also the persistent storage run
 
 # Provisioning Details
 
-The whole deployment is configured by the script ``/provision/setup-sandcastle.sh``.
+The whole deployment is configured by a script
+mounted into the container as ``/provision/setup-sandcastle.sh``.
 This script will be run as a oneshot systemd service and will disable itself after
 the first success.
 
@@ -189,13 +197,18 @@ There are different setup scripts in the ``scripts/$SANDCASTLE_SETUP_NAME``
 folders. Specifically:
 
 * ``none`` does no setup at all
-* ``demo`` is the usual Taler demo
+* ``demo`` set up the usual Taler demo
 * TBD: ``regio`` is a currency conversion setup
 
-By default, ``demo`` is used.  To mount a different provision script, set ``$SANDCASTLE_SETUP_NAME``
-when running ``./sandcastle-run``.
+By default, ``demo`` is used.
+To mount a different provision script,
+set ``$SANDCASTLE_SETUP_NAME`` when running ``./sandcastle-run``,
+like this
+
+    SANDCASTLE_SETUP_NAME=none ./sandcastle-run
+
 
-You can always manually run the provisioning script inside the container as
+You can always manually run any of the provisioning script inside the container as
 ``/scripts/$SANDCASTLE_SETUP_NAME/setup-sandcastle.sh``.
 
 # Importing / exporting
-- 
2.41.3

0001-Enhance-Readme.patch (4,207 bytes)   
0002-sandcastle-enter-Allow-running-other-program-than-sh.patch (1,018 bytes)   
From ec4d066758f50ad78302fa202e6c6f5280f2c9e1 Mon Sep 17 00:00:00 2001
Message-ID: <ec4d066758f50ad78302fa202e6c6f5280f2c9e1.1766509916.git.h.goebel@crazy-compilers.com>
In-Reply-To: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
References: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Wed, 23 Apr 2025 21:03:42 +0200
Subject: [PATCH 2/3] sandcastle-enter: Allow running other program than shell.

---
 sandcastle-enter | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sandcastle-enter b/sandcastle-enter
index 7b165f6..b84b433 100755
--- a/sandcastle-enter
+++ b/sandcastle-enter
@@ -1,3 +1,9 @@
 #!/usr/bin/env bash
 
-exec podman exec -e=TERM -it taler-sandcastle /bin/bash
+set -e
+
+if [[ $# == 0 ]] ; then
+    exec podman exec -e=TERM -it taler-sandcastle /bin/bash
+else
+    exec podman exec -e=TERM -it taler-sandcastle "$@"
+fi
-- 
2.41.3

0003-sandcastle-build-Allow-passing-arguments-to-podman-b.patch (1,588 bytes)   
From 21c672dffb1aa8ed04c6ca88a1c0dab053808e90 Mon Sep 17 00:00:00 2001
Message-ID: <21c672dffb1aa8ed04c6ca88a1c0dab053808e90.1766509916.git.h.goebel@crazy-compilers.com>
In-Reply-To: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
References: <59533f037e57da15fb262416fa69930b07e9f6f8.1766509916.git.h.goebel@crazy-compilers.com>
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Mon, 10 Nov 2025 17:40:59 +0100
Subject: [PATCH 3/3] sandcastle-build: Allow passing arguments to podman
 build.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On my system this was needed to pass `--runtime=…`.
---
 sandcastle-build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sandcastle-build b/sandcastle-build
index 1613354..15f3a42 100755
--- a/sandcastle-build
+++ b/sandcastle-build
@@ -3,11 +3,17 @@
 set -eu
 
 CONTAINERFILE="${1:-Dockerfile}"
+[ $# -gt 0 ] && shift
 
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 
 cd "$SCRIPT_DIR"
 
+if [ ! -r "${CONTAINERFILE}" ] ; then
+    echo >&2 "Containerfile '${CONTAINERFILE}' not found or not readable."
+    exit 1
+fi
 echo "Building with containerfile: ${CONTAINERFILE}"
 # The nofile ulimit is required to prevent fakeroot from becoming sluggish.
-exec podman build --ulimit=nofile=2048:2048 -f "${CONTAINERFILE}" --target taler-final -t taler-base-all .
+exec podman build --ulimit=nofile=2048:2048 -f "${CONTAINERFILE}" \
+     --target taler-final -t taler-base-all "$@" .
-- 
2.41.3

Activities

Issue History

Date Modified Username Field Change
2025-12-23 18:15 htgoebel New Issue
2025-12-23 18:15 htgoebel Status new => assigned
2025-12-23 18:15 htgoebel Assigned To => Florian Dold
2025-12-23 18:15 htgoebel File Added: 0001-Enhance-Readme.patch
2025-12-23 18:15 htgoebel File Added: 0002-sandcastle-enter-Allow-running-other-program-than-sh.patch
2025-12-23 18:15 htgoebel File Added: 0003-sandcastle-build-Allow-passing-arguments-to-podman-b.patch