Commit Graph
14682 Commits
Author SHA1 Message Date
kevinveenbirkenbach 045aae8914 ci(make,deploy): centralize CI image/pull config and remove workflow duplication
- Move INFINITO_IMAGE and INFINITO_PULL_POLICY handling into Makefile
- Auto-configure CI vs act via IS_ACT switch
- Remove duplicated env exports from test-deploy workflows
- Ensure compose uses pulled CI images in GitHub Actions
- Keep local act builds using locally built images

This makes CI behavior deterministic while keeping local test runs fast and simple.

https://chatgpt.com/share/69665ae7-37f4-800f-b287-e095714e80a4
2026-01-13 16:10:14 +01:00
kevinveenbirkenbach c4f47a3017 ci(make): derive INFINITO_PULL_POLICY automatically and drop workflow duplication
Let the Makefile auto-detect act vs GitHub Actions and set INFINITO_PULL_POLICY
accordingly (never for act, always for CI).

This removes redundant INFINITO_PULL_POLICY exports from test-deploy workflows
and centralizes the logic in the Makefile.

Result:
- GitHub Actions always pulls CI images
- act/local runs use locally built images
- no workflow duplication

https://chatgpt.com/share/69665ae7-37f4-800f-b287-e095714e80a4
2026-01-13 15:46:52 +01:00
kevinveenbirkenbach ba015fad19 Solved openladap itnegration tests 2026-01-13 15:16:26 +01:00
kevinveenbirkenbach 1086e573c3 refactor(ci): move release helper scripts into scripts/release and drop legacy publish helpers
- Update release workflow to use new script paths
- Remove deprecated build publish/retag-stable scripts
- Fix minor comment typo

https://chatgpt.com/share/69662b40-6938-800f-8ab5-c85424e13db4
2026-01-13 13:36:17 +01:00
kevinveenbirkenbach a3e9201ff6 fix(ci): allow package writes for push, schedule and release workflows
https://chatgpt.com/share/69662b40-6938-800f-8ab5-c85424e13db4
2026-01-13 13:27:27 +01:00
kevinveenbirkenbach 83fd1d83f3 fix(ci): allow packages:write for reusable image build workflow
https://chatgpt.com/share/69662b40-6938-800f-8ab5-c85424e13db4
2026-01-13 12:25:15 +01:00
kevinveenbirkenbach 50212a2777 fix(ci): build matrix via prepare job and reuse computed image tag
https://chatgpt.com/share/69662b40-6938-800f-8ab5-c85424e13db4
2026-01-13 12:23:30 +01:00
kevinveenbirkenbach 392d15107b ci(release): build CI images, retag on release, gate stable on tests
- Add reusable build-ci-images workflow to build and push ci-<sha> images for all distros
- Make all deploy test workflows use prebuilt CI images (no local rebuilds)
- Replace ci-version workflow with release workflow
- Retag ci images to <version> and latest on tag push (no rebuild)
- Move stable git tag only if all analyses/tests succeed and version is highest
- Make compose image/pull policy configurable via env

https://chatgpt.com/share/69662869-ee1c-800f-9e6c-bbbf47284fad
2026-01-13 12:11:33 +01:00
kevinveenbirkenbach 56d211e60d ci(logs): centralize failure log tailing into reusable script
Replace inline tail logic in deploy workflows with a shared
scripts/ci/log-tail.sh helper that prints the last N lines of all
log files on failure.

This improves debuggability, avoids code duplication, and ensures
consistent log output across server, universal and workstation
pipelines.

https://chatgpt.com/share/69661d0e-81a8-800f-8b98-6c964672d027
2026-01-13 11:23:02 +01:00
kevinveenbirkenbach 9206b7c9d4 Set fail-fast to false 2026-01-13 06:12:54 +01:00
kevinveenbirkenbach c03d6d056c Removed unnecessary variable 2026-01-13 05:49:46 +01:00
kevinveenbirkenbach ea6cccfae7 Solved shellchecker warning 2026-01-13 05:46:54 +01:00
kevinveenbirkenbach 142948a02f Added missing universal workflow 2026-01-13 05:43:53 +01:00
kevinveenbirkenbach 1e4fb08d87 ci(deploy): run one GitHub runner per app via matrix jobs
Refactor server, universal-rest, and workstation deploy workflows to:
- add a dedicated discover job that outputs the app list
- run one matrix job per app (one runner per app)
- remove bash loop over apps
- upload logs per app artifact

This enables parallel per-app deployments and clearer failure isolation.

https://chatgpt.com/share/6965ccdc-ed44-800f-b1e8-f0071db6dd07
2026-01-13 05:40:52 +01:00
kevinveenbirkenbach 01d625aad3 **feat(openldap): replace Bitnami OpenLDAP with custom Debian image + ldapi EXTERNAL config**
Migrate `svc-db-openldap` from `bitnamilegacy/openldap` to a locally built `infinito/openldap:local` image (Debian bookworm-slim) with a bootstrap `entrypoint.sh` that initializes `slapd.d` and an MDB backend from `LDAP_SUFFIX/LDAP_ROOT_DN/LDAP_ROOT_PW`.

* Add Dockerfile + entrypoint + healthcheck scripts
* Persist config + data in separate volumes (`/etc/ldap/slapd.d`, `/var/lib/ldap`)
* Switch cn=config operations to `ldapi:///` with SASL EXTERNAL (`-Q -Y EXTERNAL`)
* Simplify env template to only `LDAP_SUFFIX`, `LDAP_ROOT_DN`, `LDAP_ROOT_PW`
* Refactor docker init into `02_docker.yml` and update compose template (build context)
* Update LDAP tasks/handlers to use `OPENLDAP_BIND_DN/OPENLDAP_BIND_PW`
* Remove outdated Bitnami-specific docs and credential reset logic

https://chatgpt.com/share/6965c921-3304-800f-9e8f-d2f10d273f1b
2026-01-13 05:24:25 +01:00
kevinveenbirkenbach bdaac5cc90 ci(deploy): split per-app deploy into server/workstation/rest workflows (env-only defaults)
- Remove _deploy-per-app.yml (inputs-based indirection)
- Add dedicated workflows:
  - test-deploy-server.yml
  - test-deploy-workstation.yml
  - test-deploy-universal.yml (rest)
- Configure via env defaults only (KISS / SRP / SPOT)
- Update Makefile to target the new workflows and pass overrides via env
- Ensure deploy-one-app.sh is executable
- Keep failure debug (last 200 chars) and upload logs only outside act
2026-01-13 05:23:47 +01:00
kevinveenbirkenbach 8a85f7e6b1 test(filters): exclude .github directory from filter usage scan
Exclude the .github directory from template/YAML scanning to avoid
false positives from GitHub Actions expressions. Directory exclusion
is now centralized via EXCLUDE_DIRS and respects EXCLUDE_TESTS.

https://chatgpt.com/share/6965b7a8-8084-800f-a8b5-446f265d5bf2
2026-01-13 04:10:25 +01:00
kevinveenbirkenbach dac111ccb7 ci(deploy): simplify per-app deploy workflow and Makefile act targets
- Rename _deploy-matrix.yml -> _deploy-per-app.yml and drop unused inputs
  (tested_lifecycles, only_distro, final_exclude_re).
- Keep one runner per app (matrix.app) and run all distros inside that job.
- Makefile: run deploy tests through act workflow_dispatch (no serial script).
- Add scripts/ci/discover.sh and scripts/ci/deploy-one-app.sh as small SRP helpers.
- Update reusable workflow callers to use the renamed file.

https://chatgpt.com/share/69659ff3-1414-800f-8652-5298fcf55398
2026-01-13 03:41:25 +01:00
kevinveenbirkenbach 3329fbdfd5 ci(act): unify deploy matrix + force serial execution with max-parallel
- Add reusable _deploy-matrix workflow with discovery + per-app deploy across distros
- Enforce serial execution via strategy.max-parallel=1 and act --concurrent-jobs 1
- Support filters: mode (server|workstation|rest), only_app, only_distro, include/exclude regex
- Refactor test runner: remove discovery, require --app, deploy single app with deps only
- Generalize discover script to discover-apps.sh with INCLUDE_RE/EXCLUDE_RE + lifecycle gating
- Update Makefile targets to drive workflow_dispatch inputs for local act runs

https://chatgpt.com/share/69659ff3-1414-800f-8652-5298fcf55398
2026-01-13 03:06:56 +01:00
kevinveenbirkenbach 482a9eb65c test(mailu): disable webmail healthcheck in MODE_TEST for local act runs
Disable the Mailu webmail healthcheck when MODE_TEST is enabled to avoid
local AppArmor and startup timing issues on Manjaro during act-based CI
runs. This keeps production and GitHub CI behavior unchanged while
allowing reliable local testing.

Also introduce MODE_TEST flag in inventory and modes configuration.

https://chatgpt.com/share/6965806a-daa0-800f-ad9a-28ddf1c8eabc
2026-01-13 00:14:38 +01:00
kevinveenbirkenbach a0eec88632 fix(systemd): make daemon reload synchronous and add ExecStartPost hook
Remove async execution from systemd daemon reload/reexec handlers to avoid race
conditions when starting freshly deployed units.

Also add support for ExecStartPost in sys-ctl-alm-compose service templates to
allow post-start success hooks.

This prevents timing issues where template services were started before systemd
had fully reloaded unit definitions.

https://chatgpt.com/share/6965754a-ac94-800f-b25c-7a07c8d33d1a
2026-01-12 23:27:15 +01:00
kevinveenbirkenbach a96cad9f96 fix(svc-db-openldap): use config admin bind for cn=config modifications
Bitnami OpenLDAP images do not allow write access to cn=config via
SASL/EXTERNAL (peercred), even when executed as root. This caused
"Insufficient access (50)" errors during module, overlay and password
configuration.

Switch all cn=config modifications (modules, overlays, olcRootPW) to
simple bind authentication using the configuration admin DN and password.

This makes LDAP provisioning reliable across all distros and CI runners.

https://chatgpt.com/share/696574b0-ebac-800f-aee6-dfd9b27d74cd
2026-01-12 23:24:40 +01:00
kevinveenbirkenbach 069b8267d5 fix(sys-stk-back-stateful): correctly gate shared LDAP loading via enabled+shared flags
Split LDAP configuration into separate enabled and shared flags and compute a
dedicated load condition (enabled && shared) at runtime.

This ensures the OpenLDAP provider stack is only loaded when explicitly enabled
for the application and marked as shared, preventing unintended global LDAP
initialization.

Also fixes incorrect use of docker.services.ldap.shared for the enabled flag.

https://chatgpt.com/share/69657460-7768-800f-9768-f886acfb3eb5
2026-01-12 23:23:24 +01:00
kevinveenbirkenbach 423603b3bc debug(constructor): print group_names when MODE_DEBUG is enabled
Add conditional debug output in constructor stage to display all Ansible
group memberships of the current host when MODE_DEBUG is set. This helps
with inventory, persona, and stack debugging.

https://chatgpt.com/share/696567d5-9808-800f-b3fc-75080cb7d422
2026-01-12 22:29:47 +01:00
kevinveenbirkenbach 51470fd54f web-app-keycloak: ensure jq is installed for RBAC and LDAP tasks
Install jq on localhost before running RBAC and LDAP update routines to
avoid runtime failures when parsing kcadm JSON output via shell pipes.

https://chatgpt.com/share/69653d6e-3678-800f-9ecc-53ea5cd21280
2026-01-12 19:34:06 +01:00
kevinveenbirkenbach 48b0bbb85e test(run_once): allow per-condition opt-out via inline pass marker
Add support for ignoring individual run_once_* when-conditions if the same
line contains the marker comment:

  # pass test_run_once_suffix_matches_role

This allows intentional cross-role run_once usage (e.g. shared provider
roles) without weakening the global schema enforcement.

Also document the exception behavior directly in the test.

https://chatgpt.com/share/69653e36-c058-800f-921d-b4af9014df04

fix(openldap): make memberof/refint provisioning idempotent and robust

Refactor OpenLDAP cn=config provisioning:
- load memberof and refint modules via ldapmodify
- add overlays via ldapadd with proper error handling
- make handlers idempotent (ignore duplicate/value-exists errors)
- dynamically resolve module DN and data backend DN (mdb/hdb)
- clean up legacy LDIF definitions

This fixes rc=80 handler failures and allows safe re-runs.

https://chatgpt.com/share/69653e42-e020-800f-a6c3-9c37ec5e8028
2026-01-12 19:32:14 +01:00
kevinveenbirkenbach bbe25b74cb refactor(sys-stk-back-stateful): wrap OpenLDAP include in block to isolate when condition
Move the OpenLDAP include_role into a block so the when-condition is evaluated
before application_id is overridden for the svc-db-openldap role.

This prevents the stack-level LDAP enable flag from being affected by the
role-local application_id override.

https://chatgpt.com/share/696534f6-b314-800f-8e41-75165712b0f9
2026-01-12 18:52:47 +01:00
kevinveenbirkenbach ed5ccc5b1c refactor(wireguard): move role logic into 01_core.yml and disable execution in Docker-in-Docker test environment
- Extract wireguard setup, firewall rules and service logic into 01_core.yml
- Introduce run-once guard via utils/once/flag.yml
- Disable execution when running inside Docker-in-Docker CI containers

https://chatgpt.com/share/69652efc-3a20-800f-a724-f4a712904ea6
2026-01-12 18:27:20 +01:00
kevinveenbirkenbach 8bf2b4c1e1 Ruff 2026-01-12 17:50:43 +01:00
kevinveenbirkenbach bf1ee2bb82 ci: disable apparmor for infinito runner on Manjaro
https://chatgpt.com/share/696525c4-81ac-800f-9bbd-4ce20e7f8a0c
2026-01-12 17:47:54 +01:00
kevinveenbirkenbach 8d1dd68499 Flush all health services except Journalctl on final to guaranty that setup is succesfull 2026-01-12 17:21:12 +01:00
kevinveenbirkenbach eed04764fe fix(keycloak): separate public domain from container hostname and fix env formatting
- Use KEYCLOAK_DOMAIN for KC_HOSTNAME (public FQDN)
- Introduce KEYCLOAK_CONTAINER_HOSTNAME for internal container hostname
- Fix .env formatting (remove alignment spaces)
- Build KEYCLOAK_REALM_URL from base URL + realm
- Replace deprecated desktop client auth with client auth
- Add RBAC root group and wire LDAP group path
- Disable Trusted Hosts component

https://chatgpt.com/share/69651e95-9548-800f-a9c9-811c0fe48f82
2026-01-12 17:16:47 +01:00
kevinveenbirkenbach c83a432e19 Optimized OpenLDAP loading and python installation procedures 2026-01-12 15:36:18 +01:00
kevinveenbirkenbach 198a2fe3cf fix(ansible): enforce system python interpreter and install python-ldap via OS packages
- Stop auto-injecting ansible_python_interpreter from PYTHON env for localhost
- Set ansible_python_interpreter globally to /usr/bin/python3
- Add interpreter to sample inventory
- Remove role-local interpreter overrides
- Switch python-ldap installation to distro package (python-ldap / python3-ldap)
- Drop pip-based python-ldap installation to avoid venv/libldap mismatches

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 14:48:53 +01:00
kevinveenbirkenbach 98d43d2581 Removed error ignoring because the silent bug makes debugging harder 2026-01-12 13:34:20 +01:00
kevinveenbirkenbach 6fc6f25d1a Deactivated drv-lid-switch when in docker container 2026-01-12 12:38:12 +01:00
kevinveenbirkenbach 5f54382496 fix(svc-db-openldap): add libldap to Arch deps so python-ldap can load libldap.so.2
Include the libldap runtime package for Arch (dind runner) and keep openldap for
CLI tools, ensuring python-ldap imports successfully in the Ansible interpreter.

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 12:29:33 +01:00
kevinveenbirkenbach a80ebf9f18 feat(svc-db-openldap): install OS build and runtime deps for python-ldap
Install distro-specific OpenLDAP, SASL, SSL, libffi and build toolchain packages
(Arch, Debian/Ubuntu, Fedora/CentOS) before installing python-ldap to ensure the
module can be built and imported in the Ansible runtime.

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 11:45:15 +01:00
kevinveenbirkenbach 04c11a746a refactor(drv-lid-switch): switch setup-hibernate installation to sys-pip-install
- replace pkgmgr-install with sys-pip-install
- install setup-hibernate system-wide via pip
- ensure CLI is available in global PATH

https://chatgpt.com/share/6964c8c0-8b94-800f-be8e-10c4fc8a2f30
2026-01-12 11:41:29 +01:00
kevinveenbirkenbach d8d6349c0b debug(svc-db-openldap): add verbose python-ldap import sanity check
Run python-ldap import test in the Ansible interpreter and print version, module
path, and full traceback when MODE_DEBUG is enabled to simplify debugging.

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 10:48:50 +01:00
kevinveenbirkenbach c27ab7c413 Set application_id: svc-db-openldap to solve reference bug 2026-01-12 01:10:32 +01:00
kevinveenbirkenbach 85a5a621df fix(sys-pip-install): install packages into ansible venv when not global_install
Use ansible_python_interpreter-derived virtualenv for pip installs by default and
only use system pip3 with --break-system-packages when global_install=true. This
ensures Ansible module dependencies (e.g. python-ldap) are available in the
runtime interpreter.

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 00:33:36 +01:00
kevinveenbirkenbach 93702bbfc0 Enable Systemtimers in Docker 2026-01-12 00:22:31 +01:00
kevinveenbirkenbach d17a44ff9e Refactor Keycloak role pipeline and simplify dependency handling
* Replace legacy task chain with unified 01_core pipeline guarded by run_once
* Remove load_dependencies flag and always provision full stateful stack
* Drop meta/dependency helper tasks in favor of sys-stk-full-stateful
* Rename login task for consistent ordering
* Introduce LDAP shared gating (enabled + shared)
* Simplify main task entrypoint to core loader

https://chatgpt.com/share/69642f37-15d4-800f-a227-819bd0f4963d
2026-01-12 00:12:26 +01:00
kevinveenbirkenbach 054810050d refactor(features): migrate feature flags to docker.services and update AI and LDAP network wiring
* Move top-level features flags to docker.services.<feature>.enabled
* Replace features.local_ai with docker.services.ollama.shared for central AI networking
* Switch central LDAP network gating from docker.services.ldap.enabled to docker.services.ldap.shared
* Add per-app service feature entries like css, javascript, hcaptcha, recaptcha under docker.services
* Update Gitea to use derived GITEA_LDAP_ENABLED and adjust IAM conditions

https://chatgpt.com/share/69641f2f-5d6c-800f-8927-fdb3580e7964
2026-01-11 23:07:25 +01:00
kevinveenbirkenbach c9a3c811c6 feat(config): migrate docker.service flags to docker.services
* Switch feature flag paths from docker.service.<name>.enabled to docker.services.<name>.enabled
* Update CSP builder and smart-default toggles and unit tests
* Update desktop cards iframe flag and desktop domain validation
* Update logout domain filter and tests
* Update recaptcha enable flags in Keycloak and EspoCRM
* Fix sys-ctl-cln-docker meta description formatting
* Follow-up: reorder imports in web_health_expectations so module_utils path injection runs before importing get_app_conf

https://chatgpt.com/share/6963f484-4cb4-800f-a9f4-8d70a66e4d32
2026-01-11 22:27:36 +01:00
kevinveenbirkenbach f584a61f1f refactor(csp, inj): switch to docker.service.*.enabled flags and align unit tests
- Update CSP smart-default toggles to use docker.service.<feature>.enabled
  (matomo, simpleicons, recaptcha, hcaptcha, logout, desktop)
- Refactor inj_enabled filter to resolve docker.service.<feature>.enabled only
- Migrate inj_enabled unit tests to the new flag layout
- Normalize and reformat CSP test fixtures for readability and consistency

https://chatgpt.com/share/6963f484-4cb4-800f-a9f4-8d70a66e4d32
2026-01-11 20:50:30 +01:00
kevinveenbirkenbach 47f777a8b2 test(csp): disable matomo in desktop/logout toggle tests to avoid unrelated domain dependency
- Set docker.service.matomo.enabled = false in TestCspTogglesDesktopLogout fixture
- Prevent accidental dependency on web-app-matomo domain mapping
- Keep desktop/logout toggle tests focused and isolated
2026-01-11 20:29:08 +01:00
kevinveenbirkenbach 208298ada1 Add UID/GID support for manual users in inventory sample
Introduce uid and gid fields for manually created users in inventory.sample.yml.
Document the recommended ID range (10000+) for manual users while reserving lower
ranges for auto-created Infinito.Nexus users. Also add placeholders for roles,
tokens, and authorized_keys.

https://chatgpt.com/share/6963f635-8644-800f-a6fc-e5713ddcd2a3
2026-01-11 20:12:41 +01:00
kevinveenbirkenbach 158c6569dc test(csp): migrate feature toggles to docker.service.*.enabled and split unit tests
- Switch CSP smart-default toggles to docker.service.<name>.enabled flags
  (matomo, simpleicons, recaptcha, hcaptcha, logout, desktop)
- Update CSP header logic docs/comments to match new flag layout
- Split large CSP filter unit test into focused test modules for clarity
- Add coverage for service toggle behavior, determinism, union rules, and hash guards

https://chatgpt.com/share/6963f484-4cb4-800f-a9f4-8d70a66e4d32
2026-01-11 20:05:33 +01:00