Commit Graph
202 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 4.7 cf1ff2c26a refactor(sys-svc-container): auto-mirror DiD DNS test images via images dict
Switch SYS_SVC_DOCKER_DNS_TEST_BUSYBOX_IMAGE / _NODE_IMAGE to the
role-local `images:` pattern. Consumers now resolve through
`lookup('image', <service>, 'ref')`, which picks up mirrored GHCR
paths from `images_overrides` automatically. Drops the hardcoded
rate-limit workaround from inventories/dev.yml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 00:49:52 +02:00
kevinveenbirkenbachandClaude Opus 4.7 316ae898c7 fix(sys-svc-container): clamp TCP MSS to PMTU in DinD deployer
Round-6 reuse-kept deploy validated. Without this, the Discourse
launcher rebuild spawned by the deployer's nested docker daemon
dies on 'Recv failure: Connection reset by peer' from github.com:
the rebuild container's bridge is 1500 MTU but the deployer's eth0
is automtu-picked (1400), and outer Docker swallows ICMP Frag
Needed, yielding a PMTU blackhole.

Idempotent iptables command (mangle FORWARD, SYN), since
ansible.builtin.iptables does not expose --clamp-mss-to-pmtu.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 09:20:08 +02:00
kevinveenbirkenbach 34ddc4d2d2 Merge branch 'main' into fix/users-applications.yml
# Conflicts:
#	group_vars/all/00_general.yml
#	roles/web-app-dashboard/templates/playwright.env.j2
#	roles/web-app-nextcloud/config/main.yml
#	roles/web-app-nextcloud/templates/playwright.env.j2
2026-04-16 11:54:20 +02:00
kevinveenbirkenbach 262e1b43fc Merge branch 'main' into fix/users-applications.yml
# Conflicts:
#	docs/contributing/design/services.md
#	plugins/lookup/applications_current_play.py
#	plugins/lookup/service.py
#	roles/sys-stk-backend/lookup_plugins/service_should_load.py
#	roles/sys-stk-backend/tasks/_load_service.yml
#	roles/sys-stk-backend/vars/main.yml
#	roles/sys-svc-compose/templates/base.yml.j2
#	roles/sys-svc-mail/tasks/01_core.yml
#	roles/sys-utils-service-loader/tasks/load_frontend_service.yml
#	tests/unit/plugins/lookup/test_applications_current_play.py
#	tests/unit/plugins/lookup/test_service.py
#	tests/unit/roles/sys-stk-backend/lookup_plugins/test_service_should_load.py
2026-04-15 23:59:54 +02:00
kevinveenbirkenbachandClaude Opus 4.6 b70a783423 refactor(lookups): migrate to runtime applications/users lookups
Replaces inline `applications`/`users` merging with dedicated lookup
plugins and runtime hydration. Introduces `add_csp_hash` filter,
integrates sort into `find_dock_val_by_bkp_entr`, splits the Keycloak
one-shot realm import into `05a_realm_import_run.yml`, and fixes the
Mastodon administrator task YAML. Removes obsolete `csp_hashes` filter,
`sys-token-store` Jinja filter, and empty CLI setup modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 23:44:19 +02:00
kevinveenbirkenbach e9f95318e7 Merge branch 'infinito-nexus:main' into fix/nextcloud-talk 2026-04-15 01:46:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f1ea036bd2 fix(ci): resolve test-development, nextcloud, and container CA failures
- plugins/lookup/config.py: honor default by setting skip_missing_app=not strict
  so lookup('config', app, path, default) returns the default when the app is
  missing from the applications dict, instead of raising during early constructor
  phases. Fixes 5 test-development jobs.

- roles/web-app-nextcloud/files/playwright.spec.js: replace unsupported
  .toSatisfy() with a boolean check inside expect.poll() + .toBe(true).
  Fixes Deploy web-app-nextcloud.

- roles/sys-svc-container/files/container.py: when the target image has no
  ENTRYPOINT, inject the internal CA as a volume plus NODE_EXTRA_CA_CERTS,
  SSL_CERT_FILE, REQUESTS_CA_BUNDLE and CURL_CA_BUNDLE instead of falling
  back to a plain 'docker run' without CA trust. Fixes npm
  UNABLE_TO_VERIFY_LEAF_SIGNATURE inside Microsoft Playwright images for
  moodle, prometheus and onlyoffice deploys.

- tests/unit/roles/sys-svc-container/files/test_container.py: cover the new
  no-ENTRYPOINT CA-injection path.

Note: web-app-mini-qr 'lookup ghcr.io: no such host' is not addressed here
and likely needs a separate investigation of CoreDNS forwarding on the CI
runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 23:07:23 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 1bcb7cfbb0 Merge branch 'main' into feature/service-refactoring
Resolve conflicts:
- docs/agents/action/iteration.md: keep both new bullets (SERVICES_DISABLED
  proposal + make test requirement)
- docs/contributing/design/services.md: deleted (renamed to
  docs/contributing/code/services.md in this branch)
- group_vars/all/20_services.yml: keep deletion from this branch (req-001)
- tests/lint/ansible/roles/test_service_core_first_task_run_once.py:
  use build_service_registry_from_roles_dir (req-001) with repo_root()
  from main for robust path resolution

Fix broken relative links caused by rename and deletion of files:
- docs/contributing/design/architecture.md: services.md → ../code/services.md
- docs/contributing/design/exceptions.md: load_frontend_service.yml →
  load_service.yml
- docs/requirements/001-service-registry-refactoring.md: fix paths for
  unit.md, integration.md, principles.md, documentation.md, AGENTS.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:58:51 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 be6a310d59 refactor(services): implement role-local service registry (req-001)
- Delete group_vars/all/20_services.yml; all service metadata now lives
  in each role's config/main.yml under compose.services.<name>
- Rename generic 'database' service key to explicit 'mariadb'/'postgres'
  across all app roles; remove legacy type: field
- Add utils/service_registry.py and plugins/lookup/service_registry.py
  as the single source of truth for service discovery
- Add utils/database_service.py to centralize DB service resolution
- Delete service_load_enabled filter and service_should_load lookup;
  replaced by service lookup plugin
- Update sys-utils-service-loader to run in constructor stage and use
  generic load_service.yml; remove load_frontend_service.yml
- Add _service_loader_preloading guard to sys-svc-compose,
  sys-svc-webserver-core and sys-ctl-alm-compose to prevent
  health-checks/alarms from firing during preload phase
- Replace manual load_app.yml calls for shared DB/Mailu with assert-
  based preload validation in sys-svc-rdbms and sys-svc-mail
- Update networks.yml.j2 templates to resolve LDAP/AI networks via
  service_registry instead of hardcoded role names
- Migrate all tests to new service discovery API; delete obsolete tests
- Update docs/contributing/code/services.md to reflect role-local model

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:33:20 +02:00
Environment TestandClaude Sonnet 4.6 7b2ff3b698 refactor(service): centralize systemd diagnostics into shared debug script
- Extract repeated systemctl/journalctl diagnostic blocks from
  sys-service, sys-service-terminator, sys-svc-container, and
  sys-svc-sshd handlers into a reusable files/debug.sh SPOT
- Add tasks/utils/debug.yml as the canonical Ansible wrapper
- Wrap sys-svc-sshd restart handler in block/rescue to emit
  diagnostics and sshd -t config validation on failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 07:30:42 +02:00
Environment TestandClaude Sonnet 4.6 750c110f45 fix(docs): apply documentation rules, fix URLs, and remove orphaned references
- Apply documentation.md rules across staged files (emojis after headlines, RFC 2119 keywords, correct link text, Credits format)
- Remove expired ChatGPT share URLs from 39+ role READMEs and templates
- Remove orphaned text after link deletion: bare # @see, {# @see  #}, Discussion: #}, empty Chat Conversation sections, dangling "Conversation is here available.", "Refer to the conversation with ChatGPT ()", "See ChatGPT Conversation", "ChatGPT Session Transcript" references
- Remove empty ## Further Resources and ## Credits sections where no links remain
- Fix URL reachability test: treat 401/403/405 as ok, 429/500/503 as warn, Timeout as warn; add # nocheck: url suppression (inline and line-above)
- Add lint test for broken relative and repo-root-absolute markdown links
- Add # nocheck: url to AUR git clone URLs, CSP allowlist entries, and other non-browser URLs
- Restore docs.infinito.nexus/setup in documentation.md MUST NOT example
- Fix Mobilizon geospatial endpoints (Addok, Photon) reverted to original values with # nocheck: url
- Add integration test rule: MUST NOT write unit tests for integration test logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:38:42 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 113cfd3d53 fix(sys-svc-container): set nftables as Docker firewall backend on Arch Linux
Arch Linux uses nftables by default. Docker's default iptables backend
conflicts with nftables rules, causing broken container networking and
port forwarding. Explicitly configuring nftables ensures both coexist correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 01:38:41 +02:00
kevinveenbirkenbach 003a3a0b84 Merge branch 'main' into feature/lint
Resolve merge conflicts, keep the cleanup script move to scripts/image, and fix the resulting lint regressions.
2026-03-21 01:36:58 +01:00
kevinveenbirkenbach 7c9c2fe5a8 fix(sys-svc-container): use docker-compose-plugin on Ubuntu 2026-03-20 23:40:08 +01:00
kevinveenbirkenbach 39be32fdf9 Fix ShellCheck warning in install-cli script 2026-03-20 02:17:19 +01:00
kevinveenbirkenbach 9df9a0ba8c Fix dev distro coverage and repo bootstrap 2026-03-20 02:01:09 +01:00
kevinveenbirkenbach 44ea2df452 Fix dev workflow image build and docker repo bootstrap 2026-03-19 19:11:51 +01:00
kevinveenbirkenbach 138467d979 Use distro compose package on Ubuntu 2026-03-19 10:09:14 +01:00
kevinveenbirkenbach de555f6bc3 add get_url_retry plugin and migrate get_url usages 2026-03-19 01:58:11 +01:00
kevinveenbirkenbach d44eee1048 Fix Ansible fact deprecations and loop variable collisions 2026-02-26 17:54:14 +01:00
kevinveenbirkenbach df2d725355 Add retries for Docker-in-Docker DNS handler 2026-02-26 15:45:15 +01:00
kevinveenbirkenbach 753818267a use sys-pip-install instead of distro python-* packages 2026-02-23 17:36:32 +01:00
kevinveenbirkenbach c4c6e24f4b fix(sys-svc-container): support dnf5 repo add in docker cli installer 2026-02-23 01:41:43 +01:00
kevinveenbirkenbach c48ebd81ad chore(sys-svc-container): drop Fedora docker package removal step 2026-02-23 01:00:45 +01:00
kevinveenbirkenbach 13c41ec86d fix(sys-svc-container): switch Fedora docker CLI install to Docker CE 2026-02-23 00:59:26 +01:00
kevinveenbirkenbach fd8c255ce2 refactor docker apt repo setup into shared helper 2026-02-22 18:41:55 +01:00
kevinveenbirkenbach 556782cc84 Unify Python interpreter usage for pip and LDAP tasks 2026-02-22 17:18:03 +01:00
kevinveenbirkenbach 70ecef3c1f Unify Python interpreter and pip install handling across distros 2026-02-22 15:50:37 +01:00
kevinveenbirkenbach 1dc350e9f9 Use command_path lookup for pip-installed CLI binaries 2026-02-22 02:27:40 +01:00
kevinveenbirkenbach ff74bfc222 Fix docker readiness and make SSH restart handler distro-safe 2026-02-22 00:25:35 +01:00
kevinveenbirkenbach fb53e8b039 Fix automtu prerequisites by ensuring ping package is installed 2026-02-21 19:02:13 +01:00
kevinveenbirkenbach 8d3e995f28 fix(sys-svc-container): check PID 1 via /proc instead of ps 2026-02-21 17:59:12 +01:00
kevinveenbirkenbach 9cb38c0daa fix(sys-svc-container): install iproute package before automtu 2026-02-21 17:20:53 +01:00
kevinveenbirkenbach fdbc0f8d07 Implemented correct package loading 2026-02-21 11:36:57 +01:00
kevinveenbirkenbach 656fced43c fix(ci): resolve docker apt key conflict and enforce per-distro stack 2026-02-20 19:12:52 +01:00
kevinveenbirkenbach 0757144b60 refactor(sys-svc-container): split distro-specific docker setup tasks 2026-02-20 16:31:21 +01:00
kevinveenbirkenbach 58eebec80f fix(sys-svc-container): avoid buildx package file conflict on debian 2026-02-20 14:01:45 +01:00
kevinveenbirkenbach a55c99ef62 refactor(compose): replace docker lookup with container and unify compose paths
- Rename lookup plugin from `docker` to `container`
- Switch all lookups from `lookup('docker', ...)` to `lookup('container', ...)`
- Normalize compose file keys:
  - docker_compose → compose
  - docker_compose_override → compose_override
  - docker_compose_ca_override → compose_ca_override
- Centralize compose path resolution via docker_paths_utils
- Update compose_file_args to always derive paths from DIR_COMPOSITIONS
- Align all roles, templates, and vars with container/compose naming
- Update and rename unit tests accordingly

This prepares the codebase for engine-agnostic container backends
(e.g. Docker ↔ Podman) and removes legacy docker-specific assumptions.

https://chatgpt.com/share/6987a7cc-d374-800f-99ad-bb4c8f92c59e
2026-02-07 21:59:39 +01:00
kevinveenbirkenbach 64b0506947 refactor: replace raw docker usage with container wrapper across roles
Replace direct `docker` command usage, references, and documentation with
the `container` wrapper to ensure engine abstraction and future portability
(e.g. Docker → Podman).

This includes:
- Shell scripts, Ansible tasks, handlers, and Python helpers
- Documentation, comments, help texts, and meta descriptions
- Network, volume, system, and image operations
- Test expectations and comments

All runtime behavior remains unchanged while enforcing the repository-wide
rule to avoid raw Docker invocations.

https://chatgpt.com/share/698721c3-e270-800f-be7a-e4435fb54506
2026-02-07 12:57:26 +01:00
kevinveenbirkenbach 2c2a3f993c container: allow passthrough for any docker subcommand
Make the container wrapper future-proof by forwarding all non-`run`
subcommands directly to Docker. This removes the need to whitelist
individual Docker commands and enables seamless replacement of raw
`docker <cmd>` calls with `container <cmd>` across the repo.

https://chatgpt.com/share/698721c3-e270-800f-be7a-e4435fb54506
2026-02-07 12:27:56 +01:00
kevinveenbirkenbach b78ab29218 Renamed config entry from docker to compose
https://chatgpt.com/share/69870f54-d708-800f-9870-e9ae5a4bff44
2026-02-07 11:09:36 +01:00
kevinveenbirkenbach 53e817fa22 refactor(compose): migrate from docker-compose.yml to compose.yml everywhere
- Rename all docker-compose.yml templates to compose.yml
- Update override and CA override filenames accordingly
- Adjust compose wrapper, lookup plugins, filters and path helpers
- Update roles, tasks, handlers and scripts to use compose CLI
- Rewrite documentation and admin guides to reference compose
- Update unit and integration tests to expect compose.yml
- Keep internal variable keys for backward compatibility where needed

https://chatgpt.com/share/69870272-b168-800f-84c3-6417398e441f
2026-02-07 10:14:21 +01:00
kevinveenbirkenbach e3a16cbe8a refactor: switch docker CLI usage to container wrapper
- Replace direct docker calls with container wrapper across scripts, roles, and templates
- Add support for cp, start, stop, and restart passthrough commands
- Align handlers and notifications to container manager restart semantics
- Fix systemd ExecStartPost to use container wrapper without hardcoded paths
- Silence ShellCheck SC2016 false positive for container exec password injection
- Update tests and documentation strings to reflect container-based workflow

https://chatgpt.com/share/69866958-c88c-800f-9b4f-3a972615bf42
2026-02-06 23:21:02 +01:00
kevinveenbirkenbach 10043ebacf sys-svc-container: make CA injection soft-fail and extend unit tests
- Switch CA handling to soft-fail with warnings instead of hard exits
- Fallback to plain `docker run` when CA env vars or files are missing
- Avoid failing on images without ENTRYPOINT (warn + fallback)
- Simplify entrypoint inspect recovery logic (direct pull + retry)
- Refactor container wrapper structure and comments
- Extend unit tests to cover CA soft-fail and docker run fallback paths

https://chatgpt.com/share/69864bf2-7830-800f-ae8a-dad17c4f6e13
2026-02-06 21:15:42 +01:00
kevinveenbirkenbach 6b53faedce refactor(config): complete remaining get_app_conf replacements
Replace remaining get_app_conf filter usages with the config lookup in
network templates, proxy vhost, desktop validation, and Nextcloud plugin
configs. Preserve previous default behavior.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:33:42 +01:00
kevinveenbirkenbach 497986e309 fix(mariadb): correct config lookup arguments for image setting
Fix invalid lookup('config') call for MARIADB_IMAGE that passed an extra
argument. Other replacements from get_app_conf to config lookup are
correct and unchanged.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:26:25 +01:00
kevinveenbirkenbach 5100c2c1ce refactor(config): replace get_app_conf filter with config lookup
Replace usages of the get_app_conf filter with the config lookup plugin
across roles and templates. Adjust quoting where required to keep YAML
and Jinja syntax valid. No functional changes intended.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:19:14 +01:00
kevinveenbirkenbach 2d344fb129 refactor(domains): switch to domain() lookup across config and templates
Replace `domains | get_domain(...)` usage with `lookup('domain', ...)` throughout
group_vars, roles, and templates. Fix load_app domain resolution to use the
current application_id.

https://chatgpt.com/share/6985ef1e-11b8-800f-b231-52523055060b
2026-02-06 14:46:29 +01:00
kevinveenbirkenbach 5e33e70892 refactor(database lookup usage): switch conditionals to enabled flag
Replace indirect type!='' checks with explicit database.enabled lookups
to improve semantics, readability, and alignment with strict lookup API.

https://chatgpt.com/share/6985d642-b40c-800f-9cdf-ed54fc484a92
2026-02-06 13:25:37 +01:00
kevinveenbirkenbach e1e1f3eb11 chore(vars): rename PATH_* to DIR_/BIN_/FILE_ conventions
https://chatgpt.com/share/6985cf49-3c74-800f-af97-f68b1969ab01
2026-02-06 12:23:46 +01:00