Commit Graph
70 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Fable 5 e2f8d4c304 refactor(container): drive exec timeout and CA paths from group_vars SPOTs
Two wrapper behaviours move onto single sources of truth:

Exec timeout: SYS_TIMEOUT_CONTAINER_EXEC (07_schedule.yml, default 7d so a
hard kill never beats a production migration; the dev/CI inventory
tightens it to 60min) reaches every task host via the play environment as
CONTAINER_EXEC_TIMEOUT. The wrapper prefixes only the exec subcommand with
coreutils timeout --kill-after=15. Ansible task timeouts are SIGALRM-based
and slept through the last wedged docker socket for 4.5 hours; the OS
level kill still fires there and returns 124, which until/failed_when and
the rescue diagnostics react to. Unset or 0 keeps todays behaviour.

CA container paths: the bind-mount targets for the injected root CA and
wrapper script lived as string literals in container.py, compose_ca.py
and the filter plugin. They now live once in the CA_TRUST group_vars SPOT
(inject_cert_container, inject_wrapper_container) and reach container.py
as env vars (play environment plus CA_TRUST_SYSTEMD_ENV) and compose_ca.py
as CLI arguments built by the compose_ca_inject_cmd lookup. A caller that
provides the host CA env but not the container paths is half-migrated and
fails loudly instead of silently dropping CA injection; a host without any
CA env keeps the soft fallback. All tests read the paths from the SPOT,
and a regression test asserts the runtime scripts carry no literal copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:58:28 +02:00
kevinveenbirkenbachandClaude Opus 4.8 094c02a69d feat(diagnostics): single SPOT rescue script with CI-uploaded snapshots
Every Ansible rescue: block used to carry ad-hoc per-role failure dumps that
drifted apart and captured different subsets. Replace them all with one
diagnostics script (scripts/system/diagnostics/rescue.sh) that snapshots
containers (full logs plus inspect per container), swarm services (ps plus
logs per service), journal, host resources, runtime info and stats into a
per-run folder and always exits 1 so the deploy still fails. A new lint
enforces the shape: every rescue ends with the script, at most one
nocheck-justified extra task before it (postgres pg_hba dump, xwiki
extension-repo probe), and a nocheck rescue-recovery exemption for the one
block that must genuinely recover: keycloak object updates, where a
cross-node reschedule needs a swarm-wide node re-resolve plus a delegate_to
change that only a rescue can express; its recovery is kept and now also
captures diagnostics before the terminal failure.

The snapshot folder path is a group_vars SPOT: DIR_RESCUE_DIAGNOSTICS and
DIR_VAR_LIB live in group_vars/all/05_paths.yml as plain strings; new env
handlers derive INFINITO_RESCUE_DIAGNOSTICS_DIR and INFINITO_DIR_VAR_LIB
from it for the generated .env, replacing the default.env entries, and the
play-level environment forwards the value to every task host so rescue.sh
needs no second default. CI uploads the folder like the inventory and
playwright artifacts: compose copies it out of the deploy container in
dedicated.sh, swarm captures per node (manager and both workers) into
node-named subfolders.

Deleting the ad-hoc dumps orphaned helper files (postgres inspect_container,
terminator docker_diagnostics, peertube diagnostics, matomo bootstrap debug,
xwiki and openresty rescue includes) and 14 role vars; all removed. Generic
pieces of those dumps (runtime version and info, stats, dmesg oom evidence,
swapon) moved into the SPOT script instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 03:04:06 +02:00
kevinveenbirkenbachandClaude Opus 4.7 ebff14798a chore(playbook): any_errors_fatal so swarm deploys abort on first host failure
Without `any_errors_fatal`, a per-host failure (e.g. a stuck swarm task
convergence wait on one node) lets Ansible keep iterating through the
rest of the play before reporting the failure. For swarm test runs that
take 30+ minutes, that wastes a full second pass of irrelevant role
work after the root cause is already visible. Aborting at the first
fatal lets the operator inspect the live cluster while the failure
context is fresh and shortens the iteration loop materially.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 00:17:11 +02:00
kevinveenbirkenbach 33303bf921 refactor(env): centralize compose/docker env vars in playbook.yml
Move `COMPOSE_HTTP_TIMEOUT`, `DOCKER_CLIENT_TIMEOUT`, `DOCKER_BUILDKIT`
and `COMPOSE_DOCKER_CLI_BUILD` from per-task `environment:` blocks to
the play-level `environment:` directive in playbook.yml so every Ansible
task that shells out to docker/compose picks them up automatically.

Removes three duplicate blocks (sys-svc-compose handlers `compose pull`
+ `Build compose`, web-app-matrix `compose up`, web-app-bigbluebutton
`create compose.yml`). The `compose up` handler keeps its
`COMPOSE_PARALLEL_LIMIT` (not in the centralised set).
2026-05-22 02:53:05 +02:00
kevinveenbirkenbachandClaude Opus 4.7 6b78a05abc refactor(ca): invert CA toggle to INFINITO_CONTAINER_CA_ENABLED
Renames the container-wrapper CA toggle from the negated INFINITO_CONTAINER_NO_CA
to the positive INFINITO_CONTAINER_CA_ENABLED, mirroring the BUILDKIT_ENABLED
pattern: SPOT in env/default.env (default 1), passthrough handler + .env baseline
test, compose.yml env block, the CA_CONTAINER_ENABLED ansible var in
group_vars/all/02_tls.yml, a playbook-level CA_CONTAINER_ENABLED task-env
projection, and a strict `== "1"` read in container.py. Also drops the
redundant INFINITO_ prefix from the DNS/DOMAIN/IP4 vars that the DinD-DNS
test-dns.sh handler injects, since those names are local to the script's
caller-controlled env block. Finally lets pull.py fall back to a plain
`compose build` when `compose build --pull` fails — BuildKit can then use the
local FROM image instead of requiring a registry round-trip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 14:55:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 5f60f959be chore: working-tree drift sync
Picked up by the make-test setup phase regenerating generated artefacts
during recent test runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 01:54:54 +02:00
kevinveenbirkenbach 84782f3b22 refactor(invokable): centralize app discovery, add type grouping, and derive deploy stages from inventory groups
https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 10:53:53 +01:00
kevinveenbirkenbach c1d50d78da refactor(container): replace BIN_CONTAINER usages with system-wide container wrapper
https://chatgpt.com/share/698660b7-4c78-800f-b25f-af5408cff034
2026-02-06 23:00:21 +01:00
kevinveenbirkenbach 646bd80290 Expose CA_TRUST environment variables at play level for container wrapper
https://chatgpt.com/share/698659d9-62e4-800f-89a1-5d44f309bde4
2026-02-06 22:14:55 +01:00
kevinveenbirkenbach 8a81630391 Added newline at file and POSIX compatible 2026-02-04 19:49:56 +01:00
kevinveenbirkenbach 94f97ed1f3 Refactor: Migrate deprecated Ansible facts to ansible_facts[] syntax
Why:
- Ansible 2.20+ deprecates INJECT_FACTS_AS_VARS and direct usage of top-level ansible_* facts.
- This change updates all affected roles and vars files to the new supported syntax.
- Ensures compatibility with upcoming Ansible 2.24 removal of implicit fact injection.

Conversation reference:
https://chatgpt.com/share/692f639b-1380-800f-9f18-732f7108e9e2
2025-12-02 23:09:46 +01:00
kevinveenbirkenbach 79db2419a6 fix(Makefile, playbook.yml): ensure Ansible syntax-check has access to group_vars and clean up playbook formatting
- Add all group_vars/all/*.yml as extra-vars (-e @file) in Makefile syntax-check
- Use consistent quoting in playbook.yml for SOFTWARE_NAME and host_type templating

Ref: https://chatgpt.com/share/68cdee8a-4e88-800f-bf62-bed66dbbb417
2025-09-20 02:00:25 +02:00
kevinveenbirkenbach 1b638c366e Introduced variable SOFTWARE_NAME, to make better visible when software components are used. Will be relevant for OIDC 2025-08-14 12:49:06 +02:00
kevinveenbirkenbach 44e0fea0b2 Renamed cymais to infinito and did some other optimations and logout implementations 2025-07-29 16:35:42 +02:00
kevinveenbirkenbach 6e32b20240 Finished new role identification system implementation 2025-07-11 00:42:36 +02:00
kevinveenbirkenbach cdfd464bce Refactored docker logic 2025-05-25 17:44:58 +02:00
kevinveenbirkenbach 83de47921d Refactored playbooks and optimized main.py 2025-03-19 13:05:03 +01:00
kevinveenbirkenbach 994b61dd1a refactored playbooks, tracking and implemented multi domain for mybb 2023-12-06 16:29:34 +01:00
kevinveenbirkenbach 4a540e21b3 refactored wordpress role 2023-12-06 14:40:18 +01:00
kevinveenbirkenbach 39d406a659 implemented listmonk base role 2023-12-05 13:46:06 +01:00
kevinveenbirkenbach 4b9f2b9be2 renamed latex role and removed deprecated packages 2023-12-03 16:34:25 +01:00
kevinveenbirkenbach 2cf9fcddfc Implemented GnuCash 2023-12-03 10:56:07 +01:00
kevinveenbirkenbach 29ea125179 Refactored pc roles and added README.md's with help of ChatGPT. See https://chat.openai.com/share/df22ba6a-76d0-47c2-a8c7-daec3f42b4e5 2023-12-02 18:49:50 +01:00
kevinveenbirkenbach 0b21168a78 Refactored docker role 2023-12-02 14:41:08 +01:00
kevinveenbirkenbach 16d802e687 solved wordpress tracking bug 2023-11-18 21:25:51 +01:00
kevinveenbirkenbach a60ec9fa21 implemented cross-domain matomo tracking on nginx level 2023-11-18 20:02:55 +01:00
kevinveenbirkenbach 66280fdbde integrated madomo 2023-11-17 15:15:25 +01:00
kevinveenbirkenbach 2a8ae618f0 renamed nginx roles 2023-11-17 14:08:03 +01:00
kevinveenbirkenbach eebf359d0a renamed and optimized homepage role 2023-11-17 13:54:56 +01:00
kevinveenbirkenbach 3dbdd1dfcb Cleaned up and refactored 2023-11-16 23:29:43 +01:00
kevinveenbirkenbach db112f3efa renamed to backup-remote-to-local 2023-11-16 17:55:54 +01:00
kevinveenbirkenbach c70f0b2580 Renamed to backup and cleanup roles 2023-11-16 17:07:28 +01:00
kevinveenbirkenbach 0cd2b109e4 Solved bugs 2023-11-16 16:40:45 +01:00
kevinveenbirkenbach d9d6c8060a Renamed health services 2023-11-16 15:32:29 +01:00
kevinveenbirkenbach 8f715f8d81 Added docker baserow role 2023-09-02 18:09:06 +02:00
kevinveenbirkenbach 96b0d10ea8 Refactored native- 2023-09-02 13:13:28 +02:00
kevinveenbirkenbach c11333be9a Refactored independent_ 2023-09-02 09:45:26 +02:00
kevinveenbirkenbach 4254642313 Removed server_ for better overview 2023-08-22 22:53:44 +02:00
kevinveenbirkenbach 571bed27a3 Removed pc_ for better overview 2023-08-22 22:46:37 +02:00
kevinveenbirkenbach 55701f1c3c Added draft for attendize 2023-05-29 13:03:57 +02:00
kevinveenbirkenbach df6e2c7fc5 Optimized msi-keyboard-color and caffeine 2023-05-28 08:28:21 +02:00
kevinveenbirkenbach b8a23f95db Optimized udev rules for backup to usb with the help of chat gpt https://chat.openai.com/share/a75ca771-d8a4-4b75-9912-c515ba371ae4 2023-05-27 23:04:22 +02:00
kevinveenbirkenbach 9ea51d9db7 Optimized Joomla 2023-05-25 20:58:52 +02:00
kevinveenbirkenbach 7eed695623 Finished backup-to-swappable draft 2023-04-26 22:12:40 +02:00
kevinveenbirkenbach 1b8ff143e3 Refactored docker roles 2023-04-26 11:52:11 +02:00
kevinveenbirkenbach 36e41b8c99 Implemented deletion of not fully pulled backups 2023-04-25 21:39:44 +02:00
kevinveenbirkenbach 1e5b9317d7 Optimized wireguard roles 2023-04-18 18:24:55 +02:00
kevinveenbirkenbach 9f1a4c6fdb Solved bugs 2023-04-18 17:00:30 +02:00
kevinveenbirkenbach 3157f504b0 Removed host prefix 2023-04-18 15:45:52 +02:00
kevinveenbirkenbach cd9eca8ee3 Renamed server roles 2023-04-18 15:41:14 +02:00