ops: goa-regio-ng default CTR for ensure/systemd bank+merchant apps
This commit is contained in:
parent
06ce2c58d1
commit
65bcddc185
8 changed files with 53 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
# Paivana needs merchant private API — start after merchant apps, not only container shell
|
# Paivana needs merchant private API — start after merchant apps, not only container shell
|
||||||
After=taler-merchant-apps.service container-taler-hacktivism.service
|
After=taler-merchant-apps.service goa-regio-ng.service
|
||||||
Wants=taler-merchant-apps.service
|
Wants=taler-merchant-apps.service
|
||||||
|
|
|
||||||
15
configs/systemd/user/goa-regio-ng.service
Normal file
15
configs/systemd/user/goa-regio-ng.service
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=goa-regio-ng Taler AIO container (vanilla live 9010-9015)
|
||||||
|
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-shared/goa-regio-ng/README.md
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
TimeoutStartSec=120
|
||||||
|
ExecStart=/usr/bin/podman start goa-regio-ng
|
||||||
|
ExecStop=/usr/bin/podman stop -t 20 goa-regio-ng
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
4
configs/systemd/user/goa-regio-ng.service.d/apps.conf
Normal file
4
configs/systemd/user/goa-regio-ng.service.d/apps.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[Unit]
|
||||||
|
# Pull in in-container bank/merchant apps after the AIO shell is up
|
||||||
|
Wants=taler-bank-apps.service taler-merchant-apps.service
|
||||||
|
Before=taler-bank-apps.service taler-merchant-apps.service
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Start Taler bank apps inside taler-hacktivism-bank
|
Description=Start Taler bank apps inside goa-regio-ng (auto-confirm + demo-withdraw)
|
||||||
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-shared/ensure-taler-apps.sh
|
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-shared/ensure-taler-apps.sh
|
||||||
After=network-online.target container-taler-hacktivism-bank.service
|
After=network-online.target goa-regio-ng.service
|
||||||
Wants=network-online.target container-taler-hacktivism-bank.service
|
Wants=network-online.target goa-regio-ng.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
TimeoutStartSec=300
|
TimeoutStartSec=300
|
||||||
|
EnvironmentFile=-%h/.config/taler-landing/stack.env
|
||||||
ExecStart=%h/.local/bin/ensure-taler-apps.sh bank
|
ExecStart=%h/.local/bin/ensure-taler-apps.sh bank
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ Description=Taler landing stats (bank full scan + exchange/merchant)
|
||||||
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-landing/README.md
|
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-landing/README.md
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
# Prefer after containers are up (ignore if unit names differ)
|
# Prefer after AIO container + in-container apps are up
|
||||||
After=container-taler-hacktivism-bank.service container-taler-hacktivism.service
|
After=goa-regio-ng.service
|
||||||
After=taler-bank-apps.service taler-merchant-apps.service
|
After=taler-bank-apps.service taler-merchant-apps.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Start Taler merchant apps inside taler-hacktivism
|
Description=Start Taler merchant apps inside goa-regio-ng
|
||||||
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-shared/ensure-taler-apps.sh
|
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-shared/ensure-taler-apps.sh
|
||||||
After=network-online.target container-taler-hacktivism.service
|
After=network-online.target goa-regio-ng.service
|
||||||
Wants=network-online.target container-taler-hacktivism.service
|
Wants=network-online.target goa-regio-ng.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
# Merchant start_base + helpers can take a while after cold boot
|
# Merchant start_base + helpers can take a while after cold boot
|
||||||
TimeoutStartSec=300
|
TimeoutStartSec=300
|
||||||
|
EnvironmentFile=-%h/.config/taler-landing/stack.env
|
||||||
ExecStart=%h/.local/bin/ensure-taler-apps.sh merchant
|
ExecStart=%h/.local/bin/ensure-taler-apps.sh merchant
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
# Host (hernani@koopa): start Taler *apps inside* merchant/bank containers.
|
# Host (hernani@koopa): start Taler *apps inside* merchant/bank containers.
|
||||||
#
|
#
|
||||||
# Containers use CMD sleep infinity — podman start alone is not enough.
|
# Containers use CMD sleep infinity — podman start alone is not enough.
|
||||||
# Called by user systemd units after container-taler-*.service.
|
# Called by user systemd units after goa-regio-ng.service (vanilla AIO).
|
||||||
|
# Override MER_CTR/BANK_CTR via env or ~/.config/taler-landing/stack.env.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ensure-taler-apps.sh # merchant + bank + helpers
|
# ensure-taler-apps.sh # merchant + bank + helpers
|
||||||
|
|
@ -11,8 +12,8 @@
|
||||||
# ensure-taler-apps.sh status
|
# ensure-taler-apps.sh status
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
MER_CTR="${MER_CTR:-taler-hacktivism}"
|
MER_CTR="${MER_CTR:-goa-regio-ng}"
|
||||||
BANK_CTR="${BANK_CTR:-taler-hacktivism-bank}"
|
BANK_CTR="${BANK_CTR:-goa-regio-ng}"
|
||||||
AUTO_LOOP_SECS="${AUTO_CONFIRM_LOOP_SECS:-2}"
|
AUTO_LOOP_SECS="${AUTO_CONFIRM_LOOP_SECS:-2}"
|
||||||
WAIT_SECS="${WAIT_SECS:-90}"
|
WAIT_SECS="${WAIT_SECS:-90}"
|
||||||
|
|
||||||
|
|
@ -140,8 +141,9 @@ ensure_bank_helpers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
echo "=== containers ==="
|
echo "=== containers (MER_CTR=$MER_CTR BANK_CTR=$BANK_CTR) ==="
|
||||||
podman ps -a --filter name='taler-hacktivism' --format '{{.Names}} {{.Status}}'
|
podman ps -a --format '{{.Names}} {{.Status}}' \
|
||||||
|
| awk '/goa-regio-ng|taler-hacktivism/ {print}'
|
||||||
echo "=== merchant procs (sample) ==="
|
echo "=== merchant procs (sample) ==="
|
||||||
podman exec "$MER_CTR" bash -lc "ps -eo args= | grep -E 'taler-merchant-httpd|postgres -D|nginx: master' | grep -v grep || true" 2>/dev/null || echo "(container down)"
|
podman exec "$MER_CTR" bash -lc "ps -eo args= | grep -E 'taler-merchant-httpd|postgres -D|nginx: master' | grep -v grep || true" 2>/dev/null || echo "(container down)"
|
||||||
echo "=== bank procs (sample) ==="
|
echo "=== bank procs (sample) ==="
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Install ensure-taler-apps + user systemd units on this host (hernani@koopa).
|
# Install ensure-taler-apps + user systemd units on this host (hernani@koopa).
|
||||||
# Run from admin-log checkout or with ADMIN_LOG set.
|
# Run from admin-log checkout or with ADMIN_LOG set.
|
||||||
|
# Defaults target goa-regio-ng (vanilla AIO). Legacy hacktivism drop-ins stay
|
||||||
|
# installable but are not required after cutover.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||||
|
|
@ -14,14 +16,20 @@ mkdir -p "$BIN_DST" "$UNIT_DST"
|
||||||
install -m 0755 "$ADMIN_LOG/scripts/taler-shared/ensure-taler-apps.sh" \
|
install -m 0755 "$ADMIN_LOG/scripts/taler-shared/ensure-taler-apps.sh" \
|
||||||
"$BIN_DST/ensure-taler-apps.sh"
|
"$BIN_DST/ensure-taler-apps.sh"
|
||||||
|
|
||||||
|
install -m 0644 "$UNIT_SRC/goa-regio-ng.service" "$UNIT_DST/"
|
||||||
install -m 0644 "$UNIT_SRC/taler-merchant-apps.service" "$UNIT_DST/"
|
install -m 0644 "$UNIT_SRC/taler-merchant-apps.service" "$UNIT_DST/"
|
||||||
install -m 0644 "$UNIT_SRC/taler-bank-apps.service" "$UNIT_DST/"
|
install -m 0644 "$UNIT_SRC/taler-bank-apps.service" "$UNIT_DST/"
|
||||||
|
install -m 0644 "$UNIT_SRC/taler-landing-stats.service" "$UNIT_DST/"
|
||||||
|
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
|
"$UNIT_DST/goa-regio-ng.service.d" \
|
||||||
"$UNIT_DST/container-taler-hacktivism.service.d" \
|
"$UNIT_DST/container-taler-hacktivism.service.d" \
|
||||||
"$UNIT_DST/container-taler-hacktivism-bank.service.d" \
|
"$UNIT_DST/container-taler-hacktivism-bank.service.d" \
|
||||||
"$UNIT_DST/container-koopa-paivana.service.d"
|
"$UNIT_DST/container-koopa-paivana.service.d"
|
||||||
|
|
||||||
|
install -m 0644 "$UNIT_SRC/goa-regio-ng.service.d/apps.conf" \
|
||||||
|
"$UNIT_DST/goa-regio-ng.service.d/apps.conf"
|
||||||
|
# Legacy drop-ins (harmless if old container units stay disabled)
|
||||||
install -m 0644 "$UNIT_SRC/container-taler-hacktivism.service.d/apps.conf" \
|
install -m 0644 "$UNIT_SRC/container-taler-hacktivism.service.d/apps.conf" \
|
||||||
"$UNIT_DST/container-taler-hacktivism.service.d/apps.conf"
|
"$UNIT_DST/container-taler-hacktivism.service.d/apps.conf"
|
||||||
install -m 0644 "$UNIT_SRC/container-taler-hacktivism-bank.service.d/apps.conf" \
|
install -m 0644 "$UNIT_SRC/container-taler-hacktivism-bank.service.d/apps.conf" \
|
||||||
|
|
@ -30,14 +38,18 @@ install -m 0644 "$UNIT_SRC/container-koopa-paivana.service.d/order.conf" \
|
||||||
"$UNIT_DST/container-koopa-paivana.service.d/order.conf"
|
"$UNIT_DST/container-koopa-paivana.service.d/order.conf"
|
||||||
|
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
systemctl --user enable taler-merchant-apps.service taler-bank-apps.service
|
systemctl --user enable goa-regio-ng.service \
|
||||||
|
taler-merchant-apps.service taler-bank-apps.service
|
||||||
|
|
||||||
echo "Installed:"
|
echo "Installed:"
|
||||||
echo " $BIN_DST/ensure-taler-apps.sh"
|
echo " $BIN_DST/ensure-taler-apps.sh"
|
||||||
|
echo " $UNIT_DST/goa-regio-ng.service (enabled)"
|
||||||
echo " $UNIT_DST/taler-{merchant,bank}-apps.service (enabled)"
|
echo " $UNIT_DST/taler-{merchant,bank}-apps.service (enabled)"
|
||||||
echo " drop-ins: container-taler-hacktivism{,-bank}.service.d/apps.conf"
|
echo " $UNIT_DST/taler-landing-stats.service (After=goa-regio-ng)"
|
||||||
|
echo " drop-in: goa-regio-ng.service.d/apps.conf"
|
||||||
echo " drop-in: container-koopa-paivana.service.d/order.conf"
|
echo " drop-in: container-koopa-paivana.service.d/order.conf"
|
||||||
echo
|
echo
|
||||||
echo "Start now (if containers already up):"
|
echo "Start now (if container already up):"
|
||||||
|
echo " systemctl --user start goa-regio-ng.service"
|
||||||
echo " systemctl --user start taler-merchant-apps.service taler-bank-apps.service"
|
echo " systemctl --user start taler-merchant-apps.service taler-bank-apps.service"
|
||||||
echo " $BIN_DST/ensure-taler-apps.sh status"
|
echo " $BIN_DST/ensure-taler-apps.sh status"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue