Commit Graph
14682 Commits
Author SHA1 Message Date
kevinveenbirkenbach e5f8067db2 fix(deploy-test): apply lifecycle gating to workstation and server deploy tests
Apply TESTED_LIFECYCLES filtering directly in the deploy test runner so roles
with unsupported lifecycles (e.g. pre-alpha) are excluded consistently for
both workstation and server workflows.

This prevents roles like desk-copyq (lifecycle: pre-alpha) from being deployed
in CI unless explicitly enabled via TESTED_LIFECYCLES.

https://chatgpt.com/share/6963e316-0a50-800f-a895-8828269a0ca3
2026-01-11 18:51:09 +01:00
kevinveenbirkenbach 9e993c338e feat(pip): add global_install flag and fix python-ldap installation for Ansible interpreter
- Add global_install flag to sys-pip-install role (default: false)
- Allow optional system-wide installs via pip3 with --break-system-packages
- Install python-ldap via pip in Ansible interpreter for OpenLDAP role
- Refactor svc-db-openldap tasks into 01_core.yml with run-once gating
- Fix environment handling for conditional global pip installs
- Enable global pip installs for CLI tools (gitcon, ldapsm, backup tools, cleanup tools)

https://chatgpt.com/share/6963dd5d-cae0-800f-b8d7-82a3808be634
2026-01-11 18:26:49 +01:00
kevinveenbirkenbach 2e6fd243f3 Added missing password to pass tests 2026-01-11 17:53:43 +01:00
kevinveenbirkenbach 8ea01ef766 Implemented autoloading of OpenLDAP 2026-01-11 16:24:03 +01:00
kevinveenbirkenbach b192a65cbf fix(web-app-chess): separate container hostname from public domain
Use a short, stable container hostname derived from the entity name and move the
public FQDN to a dedicated domain variable. This prevents DNS suffix expansion
(e.g. postgres.<domain>) inside the container and avoids accidental resolution
to localhost.

- Introduce entity_name and domain variables
- Set container hostname to entity name instead of FQDN
- Use CHESS_DOMAIN for APP_DOMAIN instead of container hostname

https://chatgpt.com/share/6963c02c-8754-800f-8b7b-b7be99319009
2026-01-11 16:22:16 +01:00
kevinveenbirkenbach eba363d7d2 sys-service-runner: add retry logic with delay before final failure
Retry systemd service start/restart up to 10 times with a 60s delay before
entering the rescue diagnostics block. This improves robustness for services
with delayed dependencies (e.g. compose-managed containers with health checks).
2026-01-11 16:20:18 +01:00
kevinveenbirkenbach 1250e94b93 fix(web-svc-html): handle missing index.html and normalize yaml formatting
- Add default status codes (403, 200) for web-svc-html to reflect missing index.html on init
- Normalize YAML formatting and ensure trailing newlines
- Fix integration test formatting for config generation
- Align vars indentation with project style

https://chatgpt.com/share/6963a552-9580-800f-b6f2-2547959d9dc8
2026-01-11 14:27:21 +01:00
kevinveenbirkenbach 66d50e2dde feat(inventory): resolve shared providers transitively and support schema-less roles
- Allow credentials generator to run for roles without schema/main.yml so
  transitive config-based generation still works.
- Make InventoryManager resilient to missing YAML by defaulting to {} and
  only loading schema when schema/main.yml exists.
- Add recursive shared-provider include resolution based on docker.services
  config and apply provider schemas/special rules transitively.
- Require database_password injection only when database.enabled=true and shared=true.
- Update unit/integration tests to create required files for .exists() checks and
  validate transitive provider role credential generation.

https://chatgpt.com/share/69639d93-4c10-800f-bc6c-8e5b9fb75088
2026-01-11 13:54:37 +01:00
kevinveenbirkenbach 107b9345d6 test(sys-ctl-hlth-csp): suppress ruff E402 for intentional path bootstrap import
The test suite intentionally modifies PYTHONPATH to import the role-local script
module. Suppress ruff E402 for this specific import to keep linting strict
everywhere else while documenting the exception.

https://chatgpt.com/share/69637f6e-5370-800f-806f-d5d0820c005f
2026-01-11 11:45:55 +01:00
kevinveenbirkenbach 0e9506eba6 test(sys-ctl-hlth-csp): fix main() exit handling by asserting SystemExit instead of mocking sys.exit
Update unit tests to:
- Add role files directory to PYTHONPATH for importing script.py
- Assert SystemExit and exit codes instead of mocking sys.exit
- Ensure run_checker is not called when no domains or config dir is missing
- Keep existing behavior and expectations intact

This makes the tests robust and prevents false positives caused by mocked sys.exit continuing execution.

https://chatgpt.com/share/69637cc6-c1d0-800f-a196-df86ccbaee14
2026-01-11 11:34:34 +01:00
kevinveenbirkenbach f686af4d3f ci(deploy-test): free docker disk space between distro runs
Add disk usage diagnostics and aggressive Docker cleanup between
sequential distro deploy runs to prevent runner disk exhaustion.

- Log disk and Docker usage before and after each deploy
- Preserve stack on failure for debugging
- Prune images, volumes and build cache only on success

https://chatgpt.com/share/69637278-7aa0-800f-a492-7be95f5e8605
2026-01-11 10:50:36 +01:00
kevinveenbirkenbach f601d3d911 feat(sys-ctl-hlth-csp): run CSP checker container in host network by default
Run the CSP checker container with --network host by default so localhost and
internal vhosts are reachable when executed inside Docker-in-Docker setups.

Adds:
- Optional --no-host-network flag to disable host networking
- Extended docker command builder with host network support
- Unit tests for domain extraction, docker command generation, and CLI behavior

This ensures CSP health checks work reliably for services bound to the
parent container's network namespace.

https://chatgpt.com/share/69630726-4514-800f-b350-61ae7a4010b1
2026-01-11 03:12:45 +01:00
kevinveenbirkenbach 023d44fcac fix(svc-db-postgres): install psycopg2 via pip for Ansible interpreter
Replace distro-specific python-psycopg2 package with psycopg2-binary installed
via ansible.builtin.pip to ensure the PostgreSQL modules work with the active
Ansible Python interpreter (e.g. Infinito venv) across all distros.

https://chatgpt.com/share/6962ff13-afa0-800f-93a1-9b0d306d98e2
2026-01-11 02:38:18 +01:00
kevinveenbirkenbach 6f80616c4b Added run after matomo to desktop 2026-01-11 02:15:19 +01:00
kevinveenbirkenbach e00de986db Raised Limits for CICD Pipeline 2026-01-11 01:52:52 +01:00
kevinveenbirkenbach 892ee0a4c3 Removed MariaDB defaults - Shgoiuld be autogenerated 2026-01-11 01:24:50 +01:00
kevinveenbirkenbach b694f9335f fix(sys-ctl-cln-bkps): prevent infinite cleanup loop and add regression tests
Stop cleanup script from busy-looping when disk usage is above threshold but no
backup versions exist by breaking early when average_version_directories == 0.

Add unit tests to verify:
- script exits immediately when disk usage is below threshold
- script breaks safely when disk usage is high but no backups are present

This prevents CI hangs and excessive CPU usage caused by infinite iterations.

https://chatgpt.com/share/6962de45-3750-800f-bc8d-5ba205beeaaf
2026-01-11 01:22:29 +01:00
kevinveenbirkenbach e4baa6d7ab Ruff 2026-01-11 01:01:44 +01:00
kevinveenbirkenbach 64cab86be3 refactor(inventory): extract secret generation into ValueGenerator and add integration test
- Move generate_value/generate_secure_alphanumeric out of InventoryManager into new ValueGenerator
- Wire InventoryManager to use self.value_generator for all secret generation
- Tighten schema include logic for shared databases: require enabled=true and shared=true
- Update unit tests to patch ValueGenerator.generate_value instead of InventoryManager.generate_value
- Add end-to-end integration test for InventoryManager using real files and a fake VaultHandler
- Remove redundant legacy unit test file and add dedicated ValueGenerator unit tests

https://chatgpt.com/share/6962d2e6-7fdc-800f-ba83-9e150b19a5f0
2026-01-11 00:56:18 +01:00
kevinveenbirkenbach 5521b8996e fix(sys-ctl-cln-bkps): add systemd start/runtime timeouts for DiD CI debugging
Add TimeoutStartSec and RuntimeMaxSec to the sys-ctl-cln-bkps systemd unit when
running in Docker-in-Docker debug mode to avoid hanging GitHub Actions runners
and get deterministic failure behavior.

Also make the ExecStartPre timeout configurable via SYS_TIMEOUT_BACKUP_SERVICES.

https://chatgpt.com/share/6962de45-3750-800f-bc8d-5ba205beeaaf
2026-01-11 00:18:06 +01:00
kevinveenbirkenbach 39f7f8fbc7 feat(create-credentials): generate shared provider app credentials from role schemas
Extend credentials generator to include schemas for shared provider roles
(OpenLDAP, Keycloak, Matomo, and svc-db-<type>) based on docker.services.*.shared
flags in role config. Credentials are now emitted/added for all involved
applications while preserving existing inventory formatting, and CLI overrides
can target specific apps via applications.<app>.credentials.<key>.
2026-01-11 00:00:29 +01:00
kevinveenbirkenbach ac48b01d06 Added sahred for ldap und oidc:
If oidc shared then keyclaok is used
if ldap shared tehn openldap is used

https://chatgpt.com/share/6962d2e6-7fdc-800f-ba83-9e150b19a5f0
2026-01-10 23:29:10 +01:00
kevinveenbirkenbach 12ef1c798e Optimized unit format 2026-01-10 23:21:33 +01:00
kevinveenbirkenbach d1fe5c7a58 Set timeout for debugging to 5min 2026-01-10 22:36:37 +01:00
kevinveenbirkenbach 98dd9ae1e5 Removed fail fast to allow upload of logs
https://chatgpt.com/share/6962c49e-1e60-800f-b62d-d8269964ff09
2026-01-10 22:28:36 +01:00
kevinveenbirkenbach 97fbc2b558 Optimized for github actions 2026-01-10 20:15:49 +01:00
kevinveenbirkenbach 2d7a904f2b ruff optimation 2026-01-10 20:06:53 +01:00
kevinveenbirkenbach c0b03bb95a refactor(up): route make up through python orchestrator and entry.sh init
- Replace direct docker compose up with python-based orchestrator (Compose.up)
- Centralize stack startup, systemd readiness wait, and init logic in Compose.up
- Run container init via scripts/docker/entry.sh instead of make target
- Remove duplicate systemd wait in deploy test runner
- Add cli.deploy.test.up entrypoint for make up integration

https://chatgpt.com/share/6962a2c8-0f50-800f-8bfb-2efd16adaf40
2026-01-10 20:04:33 +01:00
kevinveenbirkenbach ff2fefc5eb feat: upgrade backup-docker-to-local to v1.3.0 (fixes empty databases.csv crash)
https://chatgpt.com/share/69628f0b-8744-800f-b08d-2633e05167da
2026-01-10 20:00:45 +01:00
kevinveenbirkenbach ccba04cdea Removed make down to speed up local testing by preventing recreation. On github actions ints anyhow everytime reinitialized. 2026-01-10 19:09:44 +01:00
kevinveenbirkenbach 3ce6eb348a refactor(inventory): switch feature flags to docker service config paths
Replace legacy feature flags (features.central_database, features.oauth2) with
docker service based configuration:

- docker.services.database.shared
- docker.services.oauth2.enabled

Update InventoryManager logic accordingly and adapt all unit tests to mock
the new config structure.

This ensures inventory generation now follows the canonical docker service
configuration model.

https://chatgpt.com/share/69628906-5efc-800f-999b-2ae3ece1907f
2026-01-10 18:14:29 +01:00
kevinveenbirkenbach a09e6d7592 fix(sys-pip-install): install packages via system pip3 instead of Ansible venv
Use system-wide pip3 for package installation to avoid installing CLI tools
into the Ansible virtualenv. This ensures binaries (e.g. dockreap) are placed
in a global PATH and are usable by systemd services.

https://chatgpt.com/share/69628897-4d98-800f-b4cf-b9a8f5fdaa6b
2026-01-10 18:12:46 +01:00
kevinveenbirkenbach 9d95eea3b0 fix(inventory): pin ansible_python_interpreter for localhost to avoid auto-discovery issues
Ensure that localhost inventories always define ansible_python_interpreter when using
ansible_connection=local. This prevents Ansible from falling back to interpreter
auto-discovery (interpreter_python=auto_silent), which could select unexpected Python
binaries inside containers (e.g. /usr/sbin/python3.13) and break module execution.

The interpreter is now pinned to $PYTHON if set, otherwise to sys.executable.

https://chatgpt.com/share/69628603-3e18-800f-a6f9-2b367728a9ff
2026-01-10 18:01:20 +01:00
kevinveenbirkenbach 4f0e45159d Optimized database_type loading 2026-01-10 16:51:18 +01:00
kevinveenbirkenbach 04c9490745 Solved unit and integration tests 2026-01-10 13:07:12 +01:00
kevinveenbirkenbach 0208f9f29c Optimized OAuth2 2026-01-10 11:57:57 +01:00
kevinveenbirkenbach 38a2fdf84e Refactored also OAuth2
https://chatgpt.com/share/69622c5e-68c4-800f-88d2-ee28fe485370
2026-01-10 11:39:16 +01:00
kevinveenbirkenbach 84623d713e Refactored simpleicons and oidc 2026-01-10 11:16:45 +01:00
kevinveenbirkenbach e2bf636ba9 Changed features structure 2026-01-10 11:13:29 +01:00
kevinveenbirkenbach aa374c7017 Release version 0.11.0 v0.11.0 2026-01-10 10:24:58 +01:00
kevinveenbirkenbach 0a833fa66f Merge branch 'feature/individual-app-test' 2026-01-10 10:21:57 +01:00
kevinveenbirkenbach 1ca0fd05b0 fix(deploy-test): capture run_after resolver output for dependency resolution
Ensure stdout is captured when calling run_after_resolution inside the infinito
container so declared galaxy_info.run_after deps (e.g. matomo, mailu) are
correctly detected and added to deploy_ids.

https://chatgpt.com/share/69617fbb-5af4-800f-848d-edeb2c1125a8
2026-01-09 23:22:41 +01:00
kevinveenbirkenbach 616a629ed1 Removed falsy TLS gatekeeper 2026-01-09 22:42:36 +01:00
kevinveenbirkenbach 4146535404 Adapted path 2026-01-09 22:35:06 +01:00
kevinveenbirkenbach 2d25928333 test(deploy): simplify runner by removing lifecycle gating and using include-based inventory
- remove TESTED_LIFECYCLES handling from runner
- build CI inventory via --include instead of large exclude lists
- deploy app together with its run_after dependencies

https://chatgpt.com/share/69616d7d-4af0-800f-8c68-c4ed78f0fbf7
2026-01-09 22:04:50 +01:00
kevinveenbirkenbach 5968dff47c install: install ansible collections into user-global collections path
Install Ansible collections from requirements.yml into ~/.ansible/collections
so they are available for all Infinito.Nexus environments of the user and
independent of the active Python virtualenv.

https://chatgpt.com/share/69615ab0-2cfc-800f-9466-cf9a9a57b3da
2026-01-09 21:09:13 +01:00
kevinveenbirkenbach 97f5b2ade8 fix(ansible): switch stdout callback to builtin default with yaml result format
Replace removed community.general.yaml callback with ansible.builtin.default
and enable YAML output via callback_result_format to stay compatible with
ansible-core >= 2.13 and community.general >= 12.

https://chatgpt.com/share/69615ae5-bb70-800f-8227-a4ad389dfd32
2026-01-09 20:45:16 +01:00
kevinveenbirkenbach 5e38d6a65e install: switch ansible collections to user-global installation
Install Ansible collections via ansible-galaxy into the default user scope
(~/.ansible/collections) instead of a repo-local ./collections directory.

This avoids path/config issues with ANSIBLE_CONFIG and makes collections
available consistently for venv and non-venv executions.

https://chatgpt.com/share/69615ab0-2cfc-800f-9466-cf9a9a57b3da
2026-01-09 20:44:41 +01:00
kevinveenbirkenbach 8d16e4e0d7 refactor(make): deduplicate deploy test logic via test-deploy-app
Refactor Makefile deploy tests so that test-deploy orchestrates per-app runs
by delegating to the new test-deploy-app target.

- Add test-deploy-app target for running deploy tests for a single app
- Refactor test-deploy to discover apps and call test-deploy-app per app
- Avoid duplicated act invocation logic
- Keep serial, fail-fast execution semantics

Usage:
  make test-deploy
  make test-deploy-app APP=web-app-nextcloud

https://chatgpt.com/share/6961152f-5760-800f-86c8-3b98d3fedc34
2026-01-09 15:48:05 +01:00
kevinveenbirkenbach 38fcbbc451 fix(deploy-test): do not let lifecycle blacklist override explicit run_after deps
Ensure explicitly included applications (run_after dependencies) are not excluded
again by lifecycle blacklist filtering. Also log lifecycle hits for easier CI
debugging.

https://chatgpt.com/share/6960fe98-683c-800f-9419-0078dc67f195
2026-01-09 14:11:31 +01:00