monitoring: stage.lefrancpaysan like hacktivism (inside+versions via stagepaysan)
Expand default phases for TESTPAYSAN to urls + inside + versions + e2e. Inside/version/load use low-priv francpaysan-stage-user (stagepaysan) and stage-lfp-* containers on 9030–9032; public stats.json stays outside-in.
This commit is contained in:
parent
19bbcc09da
commit
08c55e71a7
7 changed files with 398 additions and 48 deletions
|
|
@ -211,6 +211,19 @@ apply_taler_domain() {
|
|||
: "${E2E_TEMPLATE_MAP:=5=oeufs-6 4.5=pain-seigle 6=jus-pomme 8.5=fromage-chevre 12=miel-printemps 25=panier-legumes}"
|
||||
: "${E2E_PAY_VALUES:=5 8.5 6}"
|
||||
: "${E2E_WITHDRAW_VALUES:=20 50}"
|
||||
# Inside checks as low-priv stagepaysan (podman, no sudo) — not koopa
|
||||
INSIDE_PROFILE="${INSIDE_PROFILE:-stage-lfp}"
|
||||
INSIDE_SSH="${INSIDE_SSH:-francpaysan-stage-user}"
|
||||
INSIDE_BANK_CTR="${INSIDE_BANK_CTR:-stage-lfp-bank}"
|
||||
INSIDE_EXCHANGE_CTR="${INSIDE_EXCHANGE_CTR:-stage-lfp-exchange-ansible}"
|
||||
INSIDE_MERCHANT_CTR="${INSIDE_MERCHANT_CTR:-stage-lfp-merchant}"
|
||||
# Host pasta ports (127.0.0.1 on francpaysan-host)
|
||||
INSIDE_BANK_PORT="${INSIDE_BANK_PORT:-9032}"
|
||||
INSIDE_EXCHANGE_PORT="${INSIDE_EXCHANGE_PORT:-9031}"
|
||||
INSIDE_MERCHANT_PORT="${INSIDE_MERCHANT_PORT:-9030}"
|
||||
INSIDE_DNS_BANK="${INSIDE_DNS_BANK:-stage.bank.lefrancpaysan.ch}"
|
||||
INSIDE_DNS_EXCHANGE="${INSIDE_DNS_EXCHANGE:-stage.exchange.lefrancpaysan.ch}"
|
||||
INSIDE_DNS_MERCHANT="${INSIDE_DNS_MERCHANT:-stage.monnaie.lefrancpaysan.ch}"
|
||||
;;
|
||||
CHF)
|
||||
WITHDRAW_AMT="${WITHDRAW_AMT:-CHF:20}"
|
||||
|
|
@ -246,10 +259,14 @@ apply_taler_domain() {
|
|||
EXCHANGE_PUBLIC=${EXCHANGE_PUBLIC%/}
|
||||
MERCHANT_PUBLIC=${MERCHANT_PUBLIC%/}
|
||||
|
||||
# Hard rule: only the local koopa/hacktivism stack may use SSH
|
||||
# Koopa SSH only for LOCAL_STACK=1. Stage LFP uses INSIDE_SSH (stagepaysan) separately.
|
||||
if [ "${LOCAL_STACK}" != "1" ]; then
|
||||
SKIP_SSH=1
|
||||
fi
|
||||
# Default inside profile for local GOA
|
||||
if [ "${LOCAL_STACK}" = "1" ]; then
|
||||
INSIDE_PROFILE="${INSIDE_PROFILE:-koopa}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Apply TALER_DOMAIN from env once (CLI exports TALER_DOMAIN_APPLIED=1 after overrides).
|
||||
|
|
@ -310,6 +327,20 @@ with_timeout() {
|
|||
' "$secs" "$@"
|
||||
}
|
||||
|
||||
# Generic short SSH to a named host (low-priv stagepaysan or koopa).
|
||||
# usage: mon_ssh_bash HOST [timeout] <<'EOF' ... EOF
|
||||
mon_ssh_bash() {
|
||||
local host="$1" t="${2:-$SSH_CMD_TIMEOUT}"
|
||||
[ -n "$host" ] || return 1
|
||||
with_timeout "$t" ssh "${SSH_BASE_OPTS[@]}" "$host" bash -s
|
||||
}
|
||||
mon_ssh_ok() {
|
||||
local host="$1"
|
||||
[ -n "$host" ] || return 1
|
||||
with_timeout $((SSH_CONNECT_TIMEOUT + 5)) \
|
||||
ssh "${SSH_BASE_OPTS[@]}" "$host" true >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Pick a working SSH host: KOOPA_SSH first, then KOOPA_SSH_FALLBACKS (koopa-external).
|
||||
# Sets KOOPA_SSH to the first host that answers. 0 = ok, 1 = none.
|
||||
KOOPA_SSH_RESOLVED=0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue