Commit Graph
7288 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 4.7 81d6db9e07 fix(web-app-matrix): correct port forwards for synapse on host network
CI failure 27049736006 showed the probe at http://127.0.0.1:8021 timed
out (Connection reset by peer) for the full 15-min budget even though
matrix-mdad and its inner synapse were running.

Root cause: with matrix_synapse_container_network=host, MDAD's docker
run -p flag (rendered from matrix_synapse_container_client_api_host_bind_port)
is silently ignored — host networking does not use port mappings.
Synapse binds inside matrix-mdad's network namespace on its native
container port (8008 client, 8048 federation), not on the
externally-advertised host bind port. The outer compose service was
forwarding host 127.0.0.1:8021 -> matrix-mdad:8021, where nothing was
listening.

- services.yml.j2: outer compose port forwards now target the real
  internal synapse / federation / element ports (8008 / 8048 / 8080).
  Host ports stay aligned with MATRIX_SYNAPSE_PORT / MATRIX_ELEMENT_PORT
  / MATRIX_FEDERATION_PORT so the front-proxy targets a single 127.0.0.1
  port regardless of flavor.
- vars.yml.j2: drop the now-useless matrix_synapse_container_*_host_bind_port
  and matrix_client_element_container_http_host_bind_port settings —
  they only render a -p flag MDAD would ignore on --network=host.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 13:37:42 +02:00
kevinveenbirkenbachandClaude Opus 4.7 a23100c4c5 fix(web-app-matrix): cascade host network mode to addons + jitsi
Static analysis of MDAD's group_vars/matrix_servers shows that every
bridge (heisenbridge, hookshot, appservice-*, mautrix-*), element-call,
livekit-server, livekit-jwt-service, alertmanager-receiver and the
mautrix-bluesky/discord/signal/slack/googlechat/kakaotalk roles inherit
matrix_addons_container_network (default 'matrix-addons') — not
matrix_homeserver_container_network. Pinning only the homeserver
network to host therefore left all the addons stranded on an inner
bridge with no path to the outer postgres/openldap networks.

Set matrix_addons_container_network: host so the entire bridges/RTC
stack cascades to host networking and inherits matrix-mdad's outer
network attachments.

Jitsi's four components don't inherit either base — pin each
explicitly: jitsi_web/jvb/prosody/jicofo _container_network: host.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 04:11:24 +02:00
kevinveenbirkenbachandClaude Opus 4.7 22bf806073 fix(web-app-matrix): rename matrix_coturn_* to coturn_* for MASH role
MDAD upstream moved matrix-coturn to the MASH organisation
(https://github.com/mother-of-all-self-hosting/ansible-role-coturn)
and renamed every variable from the matrix_coturn_* prefix to coturn_*.
CI failed with:

  msg: The matrix-coturn role in the playbook now lives under the MASH
  organization. Please rename matrix_coturn_* -> coturn_* on your
  configuration file (vars.yml). The following variables in your
  configuration need to be renamed: matrix_coturn_docker_network,
  matrix_coturn_enabled

Rename the two we set:
- matrix_coturn_docker_network -> coturn_container_network
- matrix_coturn_enabled -> coturn_enabled

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 04:04:56 +02:00
kevinveenbirkenbachandClaude Opus 4.7 251ce17c23 feat(web-app-matrix): central coturn + DiD-host-network via MDAD fork
Switch the ansible flavor over to a forked
github.com/kevinveenbirkenbach/matrix-docker-ansible-deploy that
supports container_network='host'. Inside the matrix-mdad DiD
container, every homeserver-stack service (synapse, element, coturn)
runs with --network=host so it shares matrix-mdad's network
namespace, which is attached to the outer compose's `postgres` and
`openldap` networks. Synapse/bridges therefore resolve `database`,
`openldap` via outer Docker DNS — no inner postgres or LDAP needed.

meta/services.yml:
- upstream.repo -> the fork; ref kept at `master` (the host-network
  patches live there). The pinned-commit story comes once the fork
  push lands.
- postgres.enabled stays `true` (matrix always needs a DB); postgres.shared
  becomes `'svc-db-postgres' in group_names` again — central when the
  DB role is up, dedicated per-app when it isn't. Both paths reach
  matrix-mdad's NS via the outer Docker daemon's DNS now that we run
  Synapse on --network=host.
- coturn becomes a first-class shared-service toggle: enabled+shared
  follow `'web-svc-coturn' in group_names`. When the central role is
  present, MDAD's bundled coturn stays off and Synapse's TURN URIs
  point at the central coturn (`turn:HOST:STUN_PORT` + tls variant)
  with the shared static_auth_secret pulled from web-svc-coturn
  credentials.

meta/variants.yml:
- V1 (ansible all-on): postgres.shared=true, coturn.shared=true.
- V2 (ansible no-auth): postgres.shared=false (dedicated path),
  coturn off — exercises both polarities for the variant-coverage
  lint and the dedicated DB code path.
- V3 (compose all-on): postgres.shared=true, coturn.shared=true.

vars/main.yml:
- MATRIX_COTURN_SHARED + MATRIX_COTURN_{HOST,STUN_TURN_PORT,STUN_TURN_TLS_PORT,AUTH_SECRET}
  lookups (gated on shared so dedicated runs don't try to read
  credentials that are not in scope).

templates/flavor/ansible/vars.yml.j2:
- matrix_homeserver_container_network / matrix_synapse_container_network
  / matrix_client_element_container_network / matrix_coturn_docker_network
  all pinned to `host`. Hits the fork's `when: var not in ['', 'host']`
  task guards (no 403 on docker_network create) and the
  `{% if var not in ['', 'host'] %}` systemd-template guards (no
  ExecStartPre=docker network connect against an additional bridge,
  which is invalid on host networking).
- When central coturn is shared: matrix_coturn_enabled=false +
  matrix_synapse_turn_uris (udp/tcp + turns udp/tcp) +
  matrix_synapse_turn_shared_secret wired to MATRIX_COTURN_AUTH_SECRET.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 01:24:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 2f4ef3cfad refactor(web-app-matrix): central postgres + shared MATRIX_POSTGRES_*
Both flavors integrate with Infinito's central postgres (no more MDAD
bundled DB inside the DiD container). The connection vars live in a
single set of MATRIX_POSTGRES_* constants in vars/main.yml and are
referenced by both flavors' templates so the source-of-truth is
explicit and identical.

- vars/main.yml: MATRIX_MDAD_POSTGRES_* renamed to MATRIX_POSTGRES_*
  (drop MDAD prefix — these are flavor-agnostic) + add
  MATRIX_POSTGRES_DATABASE.
- templates/flavor/ansible/vars.yml.j2 (was mdad-vars.yml.j2):
  postgres_enabled: false; wire postgres_connection_*/synapse
  database_* to MATRIX_POSTGRES_* + matrix_synapse_container_network:
  host so the inner Synapse inherits matrix-mdad's outer networks and
  resolves `database` / `openldap` by hostname. valkey_enabled: false
  (Synapse single-process; central redis path not used here).
- templates/flavor/ansible/hosts.j2 (was mdad-hosts.j2): renamed, no
  content change. mdad- prefix dropped since the file is already
  under flavor/ansible/.
- templates/flavor/ansible/services.yml.j2: matrix-mdad joins the
  central `postgres` network (conditional on DB shared) and
  `openldap` network (conditional on MATRIX_LDAP_ENABLED).
- templates/flavor/compose/synapse/homeserver.yaml.j2 and the six
  templates/flavor/compose/mautrix/*.config.yml.j2 templates: switch
  inline `lookup('database', application_id, 'host'/'username'/...)`
  calls to MATRIX_POSTGRES_* (same constants the ansible flavor uses).
- tasks/flavor/ansible/: renumber 01-05 cleanly
  - 03_database.yml (was 02a_database.yml) — sys-svc-rdbms include
  - 04_run_playbook.yml (was 03_run_playbook.yml)
  - 05_proxy_wiring.yml (was 04_proxy_wiring.yml)
- tasks/flavor/ansible/main.yml + 02_render_inventory.yml + README.md:
  update references to the renamed files.
- tasks/flavor/compose/02_create-and-seed-database.yml: switch host/port
  lookups to MATRIX_POSTGRES_* too.

Tests: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 19:00:46 +02:00
kevinveenbirkenbachandClaude Opus 4.7 54b6649170 fix(web-app-matrix): unshadow systemd unit dir + realistic probe budget
Failing CI run 27010233874 (job 79718652049) and the local DiD test
both timed out at `probe Synapse client API on host loopback` with
`Connection reset by peer` for the full 140s retry window. Workflow
rootcause inspection of the matrix-mdad container surface identified
two compounding issues:

1. `matrix_mdad_systemd:/etc/systemd/system` named volume shadowed the
   image-baked `multi-user.target.wants/matrix-mdad-bootstrap.service`
   enable symlink. First-boot's empty named volume masks the image
   content so systemd never sees the unit as enabled — bootstrap never
   runs, MDAD never installs, Synapse never starts. Smoking gun.

2. 60×2s = 140s probe window was an order of magnitude too short for a
   cold MDAD bootstrap (galaxy install + image pulls + ansible-playbook
   setup-all on a fresh container). Even with the unit enabled the
   probe would race the bootstrap.

Changes:
- services.yml.j2: drop `matrix_mdad_systemd:/etc/systemd/system`
  mount; MDAD-written units live in the container's writable layer
  alongside the image's enable symlinks. Add `matrix_mdad_state:
  /var/lib/matrix-mdad` so the bootstrap marker survives container
  restarts. Normalize federation port publish to `DOCKER_BIND_HOST`.
- compose.yml.j2: rename declared volume `matrix_mdad_systemd` ->
  `matrix_mdad_state`. Inside the `matrix_flavor == 'ansible'` branch
  only — compose flavor untouched.
- bootstrap.service: drop `network-online.target` (never fires in a
  container without systemd-networkd-wait-online). Add
  `ExecStartPre=/usr/bin/docker info` for fail-fast if the inner
  dockerd never came up.
- bootstrap.sh: log markers + per-step timing so the systemd journal
  inside matrix-mdad shows a clear timeline.
- 04_proxy_wiring.yml: 60×2s -> 180×5s = 900s; on probe failure under
  MODE_DEBUG, run a new diagnostics.sh script (container logs +
  systemctl --failed + journalctl + docker.service status) so the next
  iteration has actionable output instead of a silent retry stack.

make test: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 19:00:46 +02:00
kevinveenbirkenbach 9659bd713a Merge branch 'main' into feature/web-app-element-ansible 2026-06-05 19:00:46 +02:00
kevinveenbirkenbach 28a362b5c6 Merge pull request #298 from infinito-nexus/update/docker-image-versions-20260603-d1baba6
update(images): update Docker image versions
2026-06-05 19:00:46 +02:00
kevinveenbirkenbach e8f96862be Update services.yml 2026-06-05 19:00:46 +02:00
kevinveenbirkenbach d6786cd561 Update services.yml 2026-06-05 19:00:46 +02:00
kevinveenbirkenbach 63a603c980 Update services.yml 2026-06-05 19:00:46 +02:00
infinito-nexus-updater[bot] 5ea2ed7404 update(images): update Docker image versions 2026-06-05 19:00:45 +02:00
kevinveenbirkenbachandClaude Opus 4.7 257d533989 fix(web-app-matrix): bootstrap PATH + lint clean
- bootstrap.sh / bootstrap.service: systemd doesn't inherit Dockerfile
  ENV PATH, so the oneshot couldn't find ansible-galaxy. Export PATH in
  the script and set Environment=PATH in the unit explicitly.
- 04_proxy_wiring.yml: rewrite the inner-docker admin-register exec as
  shell scalar with `# nocheck: raw-docker` (the inner docker CLI talks
  to matrix-mdad's DiD daemon; not host docker).
- vars/main.yml: drop now-unused MATRIX_MDAD_POSTGRES_* + MATRIX_REDIS_*
  vars (DiD uses bundled postgres + valkey).

make test: 186/186 green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 12:26:19 +02:00
kevinveenbirkenbachandClaude Opus 4.7 0aed4aaebe refactor(web-app-matrix): full DiD isolation for ansible flavor
matrix-mdad is now a long-running compose service with systemd PID 1
and its own bundled docker daemon. MDAD writes its systemd unit files
and runs matrix-synapse/coturn/element/bridges/jitsi/element-call
entirely INSIDE that container via the inner docker daemon. Nothing
leaks to the host beyond standard /opt/compose/matrix/ role state.

Container layout:
- /sbin/init (systemd) as PID 1
- bundled docker.io daemon (inner DinD)
- bootstrap.service oneshot: runs `ansible-playbook setup.yml` once on
  first boot; marker at /var/lib/matrix-mdad/bootstrap.done
- Named volumes: matrix_mdad_docker (inner /var/lib/docker),
  matrix_mdad_systemd (/etc/systemd/system), matrix_mdad_matrix (/matrix)
- /sys/fs/cgroup:rw + cgroup: host for systemd-in-container
- Outer compose publishes synapse/element/federation ports to host loopback

mdad-vars.yml.j2:
- postgres_enabled: true (MDAD bundled postgres inside DiD)
- valkey_enabled: true (bundled redis)
- exim_relay_enabled: true when no outbound Mailu
- host_bind_port: 0.0.0.0 inside container so outer compose port-publish
  can forward to host loopback

Dropped (no longer needed):
- 02a_database.yml — MDAD provisions postgres inside the DiD container
- 00_cleanup_mdad_residue.yml — no host residue to clean
- ensure rshared mount task — no host bind-propagation needed
- container wait matrix-mdad-runner — service is long-running not one-shot
- matrix_synapse_container_additional_networks_custom — DiD has its own
  internal docker network
- matrix_synapse_container_extra_arguments CA mount — bundled CA inside
- coturn_container_additional_volumes — anonymous volumes live in inner
  docker daemon, outer hlth-volumes can't see them

04_proxy_wiring.yml:
- admin user creation now uses two-hop exec: outer `container exec
  matrix-mdad` -> inner `docker exec matrix-synapse register_new_matrix_user`

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 10:39:01 +02:00
kevinveenbirkenbachandClaude Opus 4.7 70c1a03f13 feat(web-app-matrix): add ansible flavor via unified compose.yml.j2
Implements requirement 025 (docs/requirements/025-web-app-matrix-ansible-flavor.md).

Architecture:
- services.matrix.flavor: ansible | compose
- Single templates/compose.yml.j2 branches on matrix_flavor
- ansible flavor: defines matrix-mdad-runner one-shot compose service that
  DiD-executes upstream matrix-docker-ansible-deploy (pinned ref + migration
  validated version). MDAD writes /etc/systemd/system/matrix-*.service units
  on the host; post-up Ansible task container-waits the runner, then probes
  loopback ports + wires sys-stk-front-proxy.
- compose flavor: legacy in-repo stack (synapse/element/coturn/bridges) kept
  for regression coverage, marked deprecated.

Variant-switch ansible -> compose:
- 00_cleanup_mdad_residue.yml tears down MDAD-installed systemd units +
  leftover matrix-* containers before compose-flavor brings up its own
  matrix-synapse (else: name conflict, compose down doesn't touch
  systemd-managed state).

Reorganization:
- roles/web-app-matrix/{tasks,templates,files}/flavor/{ansible,compose}/
- Renamed legacy compose-flavor task files into flavor/compose/
- New runner Dockerfile (multi-stage, ARG-parameterized FROM via build-args)

Verified: 3 variants x 2 passes (sync+async) full_cycle green, all 6
PLAY RECAPs failed=0. V1 (ansible all-on), V2 (ansible no-auth), V3
(compose deprecated all-on). Playwright matrix tests pass per variant.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 10:21:41 +02:00
kevinveenbirkenbachandClaude Opus 4.7 20745cecbd test(lint): enforce parameterized FROM in role Dockerfiles
Add tests/lint/docker/dockerfile/test_from_parameterized.py to fail any
roles/*/{files,templates}/**/Dockerfile* whose FROM does not reference an
ARG (${VAR}) or Jinja variable ({{ var }}). FROM scratch and a
`# nocheck: from-parameterized` per-line marker are exempt.

Refactor web-app-bluesky login-broker Dockerfile to satisfy the rule:
surface the base image and version via services.broker.{base_image,base_version}
-> vars/main.yml -> docker-compose build args -> ARGs in the Dockerfile.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 20:43:18 +02:00
kevinveenbirkenbachandClaude Opus 4.7 a71c5a2de6 docs(requirements): add 025 web-app-matrix ansible flavor
New requirement for adding a second deployment flavor to web-app-matrix
that delegates to the upstream matrix-docker-ansible-deploy (MDAD)
playbook. The existing role-internal compose stack stays selectable as
the `compose` flavor for one deprecation window.

Captures 12 proposed design decisions for operator review before
implementation: flavor dispatch in services.matrix.flavor (ansible
default; compose deprecated), MDAD pulled in as a pinned git checkout at
deploy time (not vendored), MDAD inventory templated from
lookup('config', ...), every supported bridge + Jitsi + Element Call
enabled by default when no operator-issued third-party token is needed,
central svc-db-postgres + svc-db-redis + Mailu reuse, sys-svc-proxy
fronts MDAD's services (MDAD's bundled traefik disabled), four variants
(V1 ansible all-on, V2 ansible all-off, V3 ansible ldap-only, Vcompose-1
regression), two new Playwright specs (element-call, bridge-roster),
lifecycle: alpha on the new flavor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 12:01:19 +02:00
kevinveenbirkenbach d142431f9c Release version 9.2.0 v9.2.0 2026-06-03 10:37:49 +02:00
kevinveenbirkenbach 0c4ee01ea2 Merge pull request #297 from kevinveenbirkenbach/feature/web-app-erpnext
feat(web-app-erpnext): ship ERPNext role with OIDC SSO, LDAP, outbound mail
2026-06-03 08:57:37 +02:00
kevinveenbirkenbach a20ab3ca22 Merge branch 'main' into feature/web-app-erpnext 2026-06-02 22:23:30 +02:00
kevinveenbirkenbachandClaude Opus 4.7 23c4a33412 fix(web-app-erpnext): move subnet to 192.168.105.176/28 to avoid web-app-jitsi clash
The 192.168.105.160/28 slot is also claimed by the open web-app-jitsi PR
(#287). CI's network-uniqueness lint catches the overlap once both branches
are checked together. Move to .176/28 (next free slot in the 105.x band).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:23:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 014fa54ad3 feat(web-app-erpnext): ship ERPNext role with OIDC SSO, LDAP, outbound mail
Implements requirement docs/requirements/024-web-app-erpnext.md.

Stack (per frappe_docker v15 single-image multi-role pattern):
- configurator (one-shot bench set-config: db_host/port, three redis URLs
  split by DB number 0/1/2 for cache/queue/socketio, socketio_port, host_name
  HTTPS)
- backend (gunicorn), frontend (nginx-entrypoint.sh), websocket (socketio),
  scheduler, queue-short (--queue short,default), queue-long
  (--queue long,default,short)

Central-service consumer pattern (Decision #7):
- ERPNEXT_DB_ROOT_PASSWORD branches on services.mariadb.shared: central
  svc-db-mariadb root pw when true, per-role MariaDB consumer pw when false
- Redis via in-compose `redis` alias, 3-DB-number split for Frappe's logical
  buses
- Explicit erpnext_assets volume mount on every container (image's
  VOLUME ['sites/assets'] otherwise creates anonymous volumes that fail the
  hlth-volumes check)

Bench bootstrap (Decision #9):
- bench new-site --install-app erpnext with 30-min hard timeout
- Post-install restart of all long-lived Frappe containers (otherwise the
  cached app set serves HTTP 500 on /login)
- TCP-port readiness probe (HTTP would 404 pre-site)
- API-bot user seed + setup_complete=1 via apply_api_bot.py

OIDC (Decisions #4 + #5):
- redirect_uris filter auto-includes ERPNext in the shared Keycloak client
- Social Login Key wired via apply_oidc_settings.py with
  social_login_provider=Keycloak (delete+recreate due to set_only_once),
  custom_base_url=1, relative authorize/token/userinfo paths,
  auth_url_data={response_type:code,scope:openid}, login_via_keycloak
  redirect path
- Group-to-Frappe-role mapping persisted as a frappe.db default; per-login
  reconciliation hook deferred to follow-up (documented in README)

LDAP (V3): LDAP Settings doctype applied via apply_ldap_source.py. End-to-end
LDAP login (auto-create Frappe user from LDAP bind) deferred to follow-up;
LDAP-login Playwright specs intentionally absent in v1 (documented).

Email (Decision #8, outbound only): outbound Email Account applied via
apply_email_account.py using db_insert/db_update to bypass Frappe's
deploy-time SMTP socket validation. IMAP inbound deferred to follow-up.

Variant matrix (Decision #11): V1 sso+ldap, V2 all-false, V3 ldap-only.
Three variants verified end-to-end via
`make compose-deploy mode=reinstall apps=web-app-erpnext full_cycle=true
purge=true` — 6 PLAY RECAPs, all failed=0, all Playwright runs
passed-or-skipped with no failures.

Playwright specs: test-landing, test-csp-headers, test-login-administrator
(OIDC), test-login-biber (OIDC), test-login-native-administrator
(break-glass local login, always runs), test-guest-persona. _shared.js
exposes signInViaErpnextOidc + signInViaErpnextLocal.

Repo-wide lint addition: tests/lint/ansible/modules/test_task_name_length.py
caps Ansible task `name:` strings at 120 chars (opt-out via
`# nocheck: name-length`). Fixed two pre-existing violations in
web-app-keycloak/tasks/update/ldap/per_app_mapper_one.yml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:01:38 +02:00
kevinveenbirkenbachandClaude Opus 4.7 e8a120f898 docs(requirements): add 024 web-app-erpnext with OIDC SSO
New requirement for a `web-app-erpnext` role that integrates ERPNext
(Frappe Framework) into Infinito.Nexus with OIDC-direct SSO against
Keycloak, reusing central `svc-db-mariadb` and `svc-db-redis` (three
Redis logical roles split by DB number 0/1/2 for cache/queue/socketio).

Captures 13 proposed design decisions for operator review before
implementation: upstream `frappe/erpnext` image pinning, central-service
reuse (Decision #7), wizard-bypass `bench` bootstrap (Decision #9),
Keycloak-group → Frappe-role reconciliation (Decision #5), Mailu IMAP
inbound + SMTP outbound (Decision #8), and the standard
V1/V2/V3 variant matrix (Decision #11) mirroring web-app-kix /
web-app-zammad. Out of scope for v1: multi-site / multi-tenant Frappe
(Decision #12).

Modeled on the layout precedents from web-app-odoo (ERP shape,
dual HTTP + WebSocket vhost) and web-app-zammad (central-service
reuse pattern, three-variant matrix).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:01:37 +02:00
kevinveenbirkenbach da58d93bde Merge pull request #286 from infinito-nexus/update/docker-image-versions-20260529-0fa0da1
update(images): update Docker image versions
2026-06-01 20:14:14 +02:00
kevinveenbirkenbach b9f6041804 Update services.yml 2026-06-01 20:11:50 +02:00
kevinveenbirkenbach d07dacf2f3 Update Friendica version to 2026.01 2026-06-01 20:11:02 +02:00
kevinveenbirkenbach 601e931ae7 Merge pull request #287 from kevinveenbirkenbach/feature/web-app-jitsi
feat(web-app-jitsi): Jitsi Meet role with oauth2-proxy + LDAP variants
2026-06-01 15:34:20 +02:00
kevinveenbirkenbach a7fbca5b09 Merge branch 'main' into feature/web-app-jitsi 2026-06-01 15:33:30 +02:00
kevinveenbirkenbach 85b9524cc2 Merge pull request #288 from infinito-nexus/dependabot/npm_and_yarn/eslint-10.4.1
chore(deps-dev): bump eslint from 10.4.0 to 10.4.1
2026-06-01 11:42:05 +02:00
kevinveenbirkenbach e423504919 Merge branch 'main' into update/docker-image-versions-20260529-0fa0da1 2026-06-01 11:35:28 +02:00
kevinveenbirkenbach 4a2beaa3e7 Release version 9.1.0 v9.1.0 2026-06-01 11:29:42 +02:00
kevinveenbirkenbach 794d28500e Merge pull request #269 from kevinveenbirkenbach/feature/web-app-zammad
feat(web-app-zammad): Zammad helpdesk role with OIDC SSO
2026-06-01 11:16:10 +02:00
dependabot[bot] c1215d3106 chore(deps-dev): bump eslint from 10.4.0 to 10.4.1
Bumps [eslint](https://github.com/eslint/eslint) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.4.0...v10.4.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-01 02:41:17 +00:00
kevinveenbirkenbachandClaude Opus 4.7 fc39718599 chore: sync .dockerignore with .gitignore after .claude/hooks addition
`make setup` regenerates `.dockerignore` from `.gitignore` on every run.
The earlier commit that added `.claude/hooks` to `.gitignore` did not
re-emit the matching `.dockerignore`, so each CI invocation rewrote the
file — and the `pre-commit` framework reported `make test` as failed
("files were modified by this hook"), even though every test target
passed. Land the synced output here so the diff stays empty on a clean
deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 00:15:22 +02:00
kevinveenbirkenbachandClaude Opus 4.7 6482e8eddf chore: sync .dockerignore with .gitignore after .claude/hooks addition
`make setup` regenerates `.dockerignore` from `.gitignore` on every run.
The earlier commit that added `.claude/hooks` to `.gitignore` did not
re-emit the matching `.dockerignore`, so each CI invocation rewrote the
file — and the `pre-commit` framework reported `make test` as failed
("files were modified by this hook"), even though every test target
passed. Land the synced output here so the diff stays empty on a clean
deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 00:15:12 +02:00
kevinveenbirkenbachandClaude Opus 4.7 d5da1c116e fix(sys-svc-mail-msmtp,sys-ctl-hlth-msmtp): make health-check resilient on minimal images
CI run 26721196005 failed at:

  TASK [sys-service : sys-service | Fail after shared service diagnostics]
  msg: Unable to start service hlth-msmtp.9.0.2.infinito.nexus.service.

Two breakages in the start sequence:

1. `sys-ctl-hlth-msmtp/files/script.sh` called `hostname` in `$(...)`.
   The CI deploy containers ship without that binary, so `set -eu`
   aborted before msmtp ever saw stdin. Fall back to `${HOSTNAME:-...}`
   then `uname -n` then a literal "unknown".

2. `sys-svc-mail-msmtp/templates/msmtprc.conf.j2` hard-coded the trust
   file path per RedHat family — the file was missing on the deploy
   image and msmtp aborted with `Error while reading file. exit=66`.
   Probe a candidate list at deploy time (`SYS_SVC_MAIL_MSMTP_CA_BUNDLE_CANDIDATES`),
   pick the first existing path, surface it as
   `sys_svc_mail_msmtp_ca_bundle`, and install `ca-certificates`
   ahead of the probe.

`make test` 5/5 green (186 OK).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 22:35:12 +02:00
kevinveenbirkenbachandClaude Opus 4.7 3a3fd67180 fix(sys-svc-mail-msmtp,sys-ctl-hlth-msmtp): make health-check resilient on minimal images
CI run 26721196005 failed at:

  TASK [sys-service : sys-service | Fail after shared service diagnostics]
  msg: Unable to start service hlth-msmtp.9.0.2.infinito.nexus.service.

Two breakages in the start sequence:

1. `sys-ctl-hlth-msmtp/files/script.sh` called `hostname` in `$(...)`.
   The CI deploy containers ship without that binary, so `set -eu`
   aborted before msmtp ever saw stdin. Fall back to `${HOSTNAME:-...}`
   then `uname -n` then a literal "unknown".

2. `sys-svc-mail-msmtp/templates/msmtprc.conf.j2` hard-coded the trust
   file path per RedHat family — the file was missing on the deploy
   image and msmtp aborted with `Error while reading file. exit=66`.
   Probe a candidate list at deploy time (`SYS_SVC_MAIL_MSMTP_CA_BUNDLE_CANDIDATES`),
   pick the first existing path, surface it as
   `sys_svc_mail_msmtp_ca_bundle`, and install `ca-certificates`
   ahead of the probe.

`make test` 5/5 green (186 OK).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 22:30:53 +02:00
kevinveenbirkenbachandClaude Opus 4.7 033495d42f fix(dev-nix): guard nixbld set_fact against getent fail_key: false None values
Cherry-pick of bdc5945bc from feature/web-app-zammad, retargeted at
roles/dev-nix/tasks/02a_nix_install_only.yml (the include_tasks
companion file that 201670975 introduced on this branch).

Same root cause + fix as on the zammad branch:

  TASK [dev-nix : Set build group override for Nix installer when nixbld exists]
  Error while resolving value for 'dev_nix_installer_build_group_id':
  object of type 'NoneType' has no attribute 1

`getent` with `fail_key: false` inserts the key with a `None` value
when the entry is missing, so the membership test `'nixbld' in
ansible_facts.getent_group` evaluates True but `getent_group.nixbld[1]`
crashes on None. The guard now explicitly checks the value with
`is not none` for both `nixbld` (group) and `nixbld1` (passwd).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:51:13 +02:00
kevinveenbirkenbachandClaude Opus 4.7 f27e6337ee fix(dev-nix): guard nixbld set_fact against getent fail_key: false None values
CI run 26643336674 (feature/web-app-zammad) failed at:

  TASK [dev-nix : Set build group override for Nix installer when nixbld exists]
  Error while resolving value for 'dev_nix_installer_build_group_id':
  object of type 'NoneType' has no attribute 1

Root cause: `getent` with `fail_key: false` does NOT drop the key when
the entry is missing — it inserts the key with a `None` value. The
existing `when:` guard `'nixbld' in ansible_facts.getent_group`
therefore evaluates True (the membership test only checks the key, not
the value), and `getent_group.nixbld[1]` then crashes when the value
is None.

Fix: replace the membership check with an explicit `is not none`
assertion for both `nixbld` (group entry) and `nixbld1` (passwd entry).
A short comment above each `when:` block names the trap so the next
reader does not re-introduce the membership-only check.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:43:25 +02:00
kevinveenbirkenbachandClaude Opus 4.7 d9a6006da1 style(web-app-zammad): collapse column-aligned whitespace to autoformat
Pure whitespace reflow applied by `make autoformat` — column-aligned
mapping values were collapsed to single-space alignment so the files
match the project-wide YAML formatter output. No behavior change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:43:24 +02:00
kevinveenbirkenbachandClaude Opus 4.7 03ced5c4e1 refactor(web-app-jitsi): split monolithic playwright.spec.js into _shared + test-*.js modules
Matches the zammad layout: `_shared.js` centralises env decode, the
`reachJitsiPrejoin` / `openJitsiSettingsPanel` helpers, the persona
runners, and the `beforeEach` viewport / cookie reset.
`playwright.spec.js` shrinks to a bootstrap that loads `_shared` and
require()s each scenario module's `register(shared)` hook. Each
`test-*.js` owns one persona scenario:

- test-landing.js          — canonical landing + CSP header baseline
- test-guest-persona.js    — guest auth chain (never authenticated)
- test-login-biber.js      — biber OIDC → join room → logout
- test-login-administrator.js — administrator OIDC → settings → logout
- test-login-via-ldap.js   — biber + administrator LDAP-bound scenarios

No spec-level behaviour change: lint-playwright lists the same six
tests and `make test` stays 5/5 green (186 OK).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:07:45 +02:00
kevinveenbirkenbachandClaude Opus 4.7 655e6df0ae fix(web-app-jitsi): satisfy make-test lints (PORT_BANDS, env quote, variants coverage)
Follow-up to the initial web-app-jitsi commit. `make test` flagged 11
contract violations on the newly-added role; each is addressed here.

- group_vars/all/08_networks.yml: declare PORT_BANDS.public.media
  (10000–10099) so the JVB media plane port (UDP/10000) falls in band.
- roles/web-app-jitsi/templates/env.j2: pipe every Jicofo/JVB/Jigasi/Jibri
  XMPP password through `| dotenv_quote`.
- roles/web-app-jitsi/meta/services.yml: make `email` flag dynamic
  (`'web-app-mailu' in group_names`) and add `# nocheck: dynamic-flag`
  + `# nocheck: playwright-service-flag` above `javascript:` (gated on
  sso.enabled, not on group_names; runtime DOM patch, no probe-able
  surface flag).
- roles/web-app-jitsi/meta/variants.yml: re-add explicit
  email.enabled / email.shared pins per variant (variant-coverage rule
  requires every dynamic flag to have both true- and false-pinning
  variants).
- roles/web-app-jitsi/meta/schema.yml: drop unused jwt_app_secret
  credential.
- roles/web-app-jitsi/vars/main.yml: drop unreferenced JITSI_HOSTNAME,
  JITSI_WEB_PROTOCOL, JITSI_JWT_APP_SECRET.
- roles/web-app-jitsi/templates/playwright.env.j2: drop unused
  ADMIN_EMAIL / JITSI_BASE_URL / OIDC_ISSUER_URL keys and collapse the
  PERSONA_*_BLOCKED comment block to one line per key (env-file schema
  rule allows at most one comment line above an entry).
- roles/web-app-jitsi/README.md: replace the dead
  jitsi-contrib/prosody-plugins/tree/main/token_lobby URL with the
  repository root.

Final result: `make test` 5/5 targets ✅ (186 tests OK),
`make autoformat` clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:57:06 +02:00
kevinveenbirkenbachandClaude Opus 4.7 201670975d refactor(dev-nix): factor Nix install steps into include_tasks to satisfy when-block lints
Two pre-existing lint failures on main (introduced in 45eea2892) blocked
`make test` from going green:

- test_excessive_repeated_when_in_tasks_files flagged the four
  `when: dev_nix_binary_path_before | length == 0` repeats across
  Purge / getent group / getent passwd / Run-installer tasks.
- test_blocks_with_when_and_sections_have_max_three_tasks rejects any
  `block:` carrying a block-level `when:` and more than 3 tasks per
  section, because the block-level `when:` does NOT skip parse-time
  resolution of inner tasks.

Final shape: the six install tasks live in
`02a_nix_install_only.yml` and are pulled in via a single
`include_tasks` guarded by the original `when:`. When the binary is
already present, Ansible never opens the included file at all.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:54:45 +02:00
kevinveenbirkenbachandClaude Opus 4.7 7ddb4453b5 style(web-app-zammad): collapse column-aligned whitespace to autoformat
Pure whitespace reflow applied by `make autoformat` — column-aligned
mapping values were collapsed to single-space alignment so the files
match the project-wide YAML formatter output. No behavior change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:54:30 +02:00
kevinveenbirkenbachandClaude Opus 4.7 4dcb1e866e feat(web-app-jitsi): add Jitsi Meet role with oauth2-proxy + LDAP variants
Adds the four-container Jitsi Meet stack (web, prosody, jicofo, jvb) with a
3-variant matrix: V1 oauth2-proxy gate + Keycloak LDAP federation, V2
no-auth anonymous, V3 direct prosody mod_auth_ldap2 against svc-db-openldap.

Auth model is oauth2-proxy at the reverse proxy because Jitsi has no
native OIDC adapter — JWT-via-Keycloak would require a custom token
server outside this repo. The role injects a fixed-position
`[data-injected-logout]` button via templates/javascript.js.j2 so the
no-built-in-logout React SPA satisfies the persona contract's
no-direct-URL logout rule. V2/V3 declare PERSONA_BIBER_BLOCKED /
PERSONA_ADMINISTRATOR_BLOCKED because the shared persona helpers only
model the OIDC redirect chain.

Final FULL-matrix `mode=reinstall full_cycle=true` run green across all
three variants (V1: 6/6 pass, V2/V3: 2 pass + 4 blocked skips).

Also lands utils/parse_trace.py — a small zipfile helper used during
the iteration to extract URL traces from playwright .trace bundles.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 12:20:11 +02:00
infinito-nexus-updater[bot] 0184e2cab2 update(images): update Docker image versions 2026-05-29 16:48:13 +00:00
kevinveenbirkenbach 2868cb9a5b Merge pull request #285 from kevinveenbirkenbach/fix/web-app-bookwyrm
Fix/web app bookwyrm
2026-05-29 18:21:06 +02:00
kevinveenbirkenbachandClaude Opus 4.7 a52d2e626f refactor(dev-nix): extract official-installer branch to 03_install_official.yml
Adding the purge task pushed dev-nix/tasks/02_non_arch_installer.yml
to 4 tasks gated by `when: dev_nix_binary_path_before | length == 0`,
tripping tests.integration.roles.when.test_duplication.

A `block:` would satisfy that lint but exceeds the project convention
of max 3 entries per block. Move the six install-branch tasks (purge,
nixbld group+uid probes, override set_facts, installer run) into a
dedicated tasks/03_install_official.yml and call it once via
include_tasks with the original guard `when:` on the include.

Behavior unchanged; inner tasks no longer re-evaluate the binary-path
condition each call.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:32:15 +02:00
kevinveenbirkenbachandClaude Opus 4.7 45eea2892f fix(dev-nix): purge stale nixbld users blocking Nix installer
The Nix 2.32.4 installer allocates build users ascending from
NIX_FIRST_BUILD_UID. The pkgmgr-centos:stable base image ships
nixbld1..nixbld32 with descending UIDs (RHEL `useradd -r` default:
nixbld1=997, nixbld2=996, ...) and no nix binary, so the role
detects no install, runs the installer, which then aborts on
"nixbld2 already exists, but with the UID '996'".

Add purge_stale_nixbld.sh, called via ansible.builtin.script
before the installer. Three guards must all hold to purge:
  1. No nix binary in candidate paths.
  2. nixbld2 UID < nixbld1 UID (broken descending layout).
  3. /nix/store does not exist (no live store to orphan).

Idempotent. Distro-agnostic at the script level: Debian/Ubuntu stay
[UNCHANGED] because guard 2 fails (nixbld users absent); Arch never
hits this code path. Production hosts with /nix/store present but
nixbld users get [FAIL] (rc=1) instead of silent destruction.

Fixes the 31/32 test-deploy-server / test-deploy-universal failures
observed in run 26634712613.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:09:59 +02:00
kevinveenbirkenbach 84ca98e107 Merge branch 'main' into feature/web-app-zammad 2026-05-29 13:29:24 +02:00