Commit Graph
1189 Commits
Author SHA1 Message Date
kevinveenbirkenbach 3215bc7d53 dev(apparmor): add teardown/restore hooks for local docker workflows
Introduce explicit AppArmor teardown before docker-up and restore after docker-down.
Replace complain-mode helper with full profile unload/reload scripts to ensure
deterministic local dev behavior while keeping CI unaffected.

https://chatgpt.com/share/697f4782-8304-800f-8b07-cb6484a4148f
2026-02-01 13:30:49 +01:00
kevinveenbirkenbach 4f10f82372 Made executable 2026-01-31 23:15:49 +01:00
kevinveenbirkenbach 0910029e3d admin: add trust-ca make target and host CA trust script
- add make target `trust-ca` as thin wrapper
- introduce scripts/administration/trust_ca.sh
- extract Infinito root CA from running container
- install CA into host trust store via with-ca-trust.sh
- keep Makefile free of logic, delegate to script

https://chatgpt.com/share/697e31e7-e548-800f-9edd-9b030ee12c5b
2026-01-31 17:46:24 +01:00
kevinveenbirkenbach 340e3696b6 dev: disarm AppArmor via host script and Makefile wrapper
Move AppArmor handling out of docker-compose files and into a
dedicated dev-only administration script. The new `disarmapp`
Make target acts as a thin wrapper to set relevant AppArmor
profiles (php-fpm, dovecot) to complain mode on the development host,
keeping compose templates clean and prod-like.

https://chatgpt.com/share/697cfbdf-e2a8-800f-bf06-b75e8c9d926e
2026-01-30 21:48:43 +01:00
kevinveenbirkenbach 2678090934 feat(ca-trust): unify trust injection + strict templating
Move `with-ca-trust.sh` to `sys-ca-selfsigned` as the single source of truth, add `CA_TRUST_NAME`/`trust_name`, and pass it through `compose_ca_inject.py` + `compose_ca_inject_cmd`. Introduce `module_utils/templating.py` for strict multi-pass rendering with fallback env lookup, update TLS self-signed regen logic, purge script, and extend unit tests accordingly.

https://chatgpt.com/share/697c876d-7140-800f-9981-762dfeeafdfe
2026-01-30 11:26:46 +01:00
kevinveenbirkenbach b2fb72d112 feat(tls): split TLS settings to 02_tls and add self-signed root CA role
Move TLS/ACME/CA vars out of 00_general into group_vars/all/02_tls.yml and renumber subsequent group_vars files. Add sys-ca-selfsigned to generate /etc/<software>/ca/root-ca.crt and make docker-compose-ca depend on it. Update setup script, templates, and tests to use the new applications/users file numbering.

https://chatgpt.com/share/697b8150-22ac-800f-98b1-e063a659b684
2026-01-29 16:48:03 +01:00
kevinveenbirkenbach b9bb4a95fd Included other helper command 2026-01-29 14:41:17 +01:00
kevinveenbirkenbach ecb0d6071c On Local deploy reduce repeat times for failed systemctl runenrs to debug faster 2026-01-29 11:26:59 +01:00
kevinveenbirkenbach 5c163900c1 test(matrix): exclude web-opt-rdr-www from universal tests
https://chatgpt.com/share/697a7c6e-a674-800f-9ace-27cc49399d87
2026-01-28 22:15:19 +01:00
kevinveenbirkenbach 52ba09d165 fix(local-deploy): use TEST_DEPLOY_TYPE inventory file and fix shell expansion
https://chatgpt.com/share/697a73ea-1b34-800f-8318-be15afab2d08
2026-01-28 21:38:47 +01:00
kevinveenbirkenbach adf17fd146 feat(admin): purge DB even if stack directory is missing
- Always attempt DB purge by stack name
- Try both PostgreSQL and MariaDB backends
- Support DROP or TRUNCATE via --wipe-data-only
- Keep compose/volume cleanup best-effort and safe
- Improve robustness for orphaned databases

https://chatgpt.com/share/6977a100-0e00-800f-8bb0-320b00e94c7e
2026-01-26 18:14:30 +01:00
kevinveenbirkenbach 3d3d5480d7 fix(admin): make purge_entity.sh TTY-safe and support multi-entity cleanup
- Isolate each stack purge in a subshell to prevent early termination
- Detach all docker/docker-compose calls from STDIN to avoid TTY issues inside containers
- Harden MariaDB drop/truncate logic against nested docker exec behavior
- Allow cleanup.sh to accept multiple APP values (whitespace or comma-separated)
- Deduplicate derived entities before purging and iterate deterministically

https://chatgpt.com/share/69774b3d-611c-800f-8cf0-422d11d50c1c
2026-01-26 12:08:36 +01:00
kevinveenbirkenbach 4bbdbeb54b feat(admin): add --wipe-data-only to purge_entity.sh
- Add --wipe-data-only flag to truncate DB tables instead of dropping databases
- Implement best-effort Postgres TRUNCATE for all public tables (CASCADE)
- Implement best-effort MariaDB TRUNCATE with FOREIGN_KEY_CHECKS handling
- Keep compose down -v and stack/volumes cleanup behavior unchanged
- Improve env parsing/readability and harden DB backend detection

https://chatgpt.com/share/6976642a-d6f8-800f-976d-7e27a5b45276
2026-01-25 19:42:32 +01:00
kevinveenbirkenbach a9f8eb2d8f Added adminstration helper 2026-01-25 14:32:04 +01:00
kevinveenbirkenbach 49da7376a9 ci(ansible): add galaxy-to-git fallback for collection installation
Split collection requirements into Galaxy and Git sources and
introduce retry logic with Git fallback to harden CI against
transient Ansible Galaxy API failures.
2026-01-25 11:03:19 +01:00
kevinveenbirkenbach ea39b5b215 ci(ansible): add retry logic for galaxy collection install
Retry ansible-galaxy collection installation up to 10 times with
randomized backoff to mitigate transient Galaxy API outages.

https://chatgpt.com/share/6975e68c-1ae4-800f-810c-91521230f55b
2026-01-25 10:46:45 +01:00
kevinveenbirkenbach f1b4436d57 Removed " to allow the test deploy of multiple apps in one step 2026-01-24 20:30:31 +01:00
kevinveenbirkenbach b2eea91fa4 Activated debug 2026-01-24 16:28:20 +01:00
kevinveenbirkenbach 51e01d0bec Introduced correct order 2026-01-24 14:10:43 +01:00
kevinveenbirkenbach 8bdf43ee87 Minor improvements 2026-01-23 11:17:53 +01:00
kevinveenbirkenbach 49246fb3d8 test(local): reset inventory before init
Rename test-local-init to test-local-reset and wipe inventory directory
before recreating it to ensure clean local test runs.

https://chatgpt.com/share/69729492-8afc-800f-99f1-823512d8604e
2026-01-22 22:20:13 +01:00
kevinveenbirkenbach 0eb7071a49 fix(local-tests): force python3 for local inventory init and stabilize runtime vars
- Force PYTHON=python3 for test-local-init to avoid missing venv python
- Rename test-local-inventory-init-all target to test-local-init
- Fix JSON quoting for --vars in local deploy scripts
- Add RUNTIME default to group_vars
- Improve debug output for initial host vars
- Update user hint in local run script

https://chatgpt.com/share/697222e1-5edc-800f-b9ab-511d8afc3142
2026-01-22 14:14:50 +01:00
kevinveenbirkenbach d2694566e5 feat(runtime): add development runtime marker and unified runtime detection
- introduce env.development marker for local dev runtime
- add cli.meta.runtime module with library API and CLI entrypoint
- detect runtime via ACT/GitHub/marker with explicit RUNTIME override
- use env.development as docker-compose env override
- pass RUNTIME=dev into development inventory generation
- add make setup-development helper

https://chatgpt.com/share/69720fd6-a1c8-800f-b1e2-6909aa63643a
2026-01-22 12:53:42 +01:00
kevinveenbirkenbach c9e05dcb6b test(local): print full app list in single line instead of sample
https://chatgpt.com/share/69710189-7df4-800f-a291-2979678ea198
2026-01-21 17:39:49 +01:00
kevinveenbirkenbach a89f74fac0 Included extra modul parameter 2026-01-21 16:02:18 +01:00
kevinveenbirkenbach 249103bb56 feat(ci): unify local act workflow with CI discovery logic and strict input resolver
- Use docker-up + ci-discover-output for local discover job (same as CI)
- Add strict input resolver (scripts/meta/resolve/input.sh) with enforced env contract
- Ensure ONLY_APP is always defined (may be empty, but never unset)
- Expose resolved inputs as workflow outputs for linear matrix deploy
- Enforce linear matrix execution via max-parallel: 1
- Align act helper scripts with linear matrix semantics

https://chatgpt.com/share/6970ba64-8c2c-800f-bb90-7edbe9168582
2026-01-21 12:37:03 +01:00
kevinveenbirkenbach 4cf54418ca Removed --missing 2026-01-21 03:34:06 +01:00
kevinveenbirkenbach 7bf8070ef7 fix(ci): remove unsupported --no-cache/--missing flags from distros.sh
The CI distros runner now only passes arguments supported by
cli.deploy.development run. This avoids argparse errors caused by
forwarding build-only flags that the orchestrator does not accept.

https://chatgpt.com/share/697030c4-f60c-800f-94b6-9128f87da57e
2026-01-21 02:49:48 +01:00
kevinveenbirkenbach 370938c71b fix(venv): use bootstrap python to create virtualenv
Avoid using the venv interpreter before it exists.
Create the venv with system python3 and only rely on venv/bin/python afterwards.

https://chatgpt.com/share/69702711-790c-800f-bbe0-812afdf9d975
2026-01-21 02:08:23 +01:00
kevinveenbirkenbach 18acafa9dc ci(images): build & push full+slim CI images
- Build matrix now includes variants: full + slim
- Tag slim images with -slim suffix and use Dockerfile target selection
- Use dedicated gha cache scopes per distro+variant
- Update release checks/retag/promote scripts to handle slim images too

https://chatgpt.com/share/69701a4e-b000-800f-be7e-162dcb93b1d2
2026-01-21 01:46:52 +01:00
kevinveenbirkenbach 0928022731 More python calls from correct context 2026-01-21 01:09:01 +01:00
kevinveenbirkenbach 91003615ea fix(setup): enforce venv python3 via Makefile and fail if missing
scripts/setup.sh no longer falls back to system python3.
The setup now requires PYTHON to be provided by the Makefile (venv)
and verifies that the interpreter exists and is Python 3.

https://chatgpt.com/share/6970174d-0c18-800f-8267-33818611521c
2026-01-21 01:01:11 +01:00
kevinveenbirkenbach a565344ed5 Solved shellcheck 2026-01-21 00:25:35 +01:00
kevinveenbirkenbach f08993049c feat(inventory): add dynamic inventory resolver and propagate INVENTORY_DIR everywhere
- add scripts/inventory/resolve.sh to compute INVENTORY_DIR based on runtime context (act/github/local)
- resolve INVENTORY_DIR dynamically in Makefile via resolve.sh
- enforce INVENTORY_DIR usage across all local deploy/test scripts
- propagate INVENTORY_DIR into container and development CLI commands
- remove hardcoded /etc/inventories paths

https://chatgpt.com/share/69700d69-b270-800f-ad50-d9ff486378b9
2026-01-21 00:18:57 +01:00
kevinveenbirkenbach 6c84807778 feat(test-local): add all-app inventory init and run targets
Add two local test helpers to run full-stack deployments for all discovered apps:

- make test-local-inventory-init-all: bring up dev stack and create inventory
  (/etc/inventories/local-full-<type>/servers.yml) including all apps
- make test-local-run-all: run deploy using the pre-initialized inventory

Also mark various scripts as executable (chmod +x) to ensure consistent
behavior across environments.

https://chatgpt.com/share/6970018e-1244-800f-9345-ca1596061729
2026-01-20 23:43:10 +01:00
kevinveenbirkenbach d5801f35b0 refactor(ci): make deploy env vars strict and export pythonpath
- Make TEST_DEPLOY_TYPE strictly required in build-test-matrix
- Enforce required env vars in all act/ci/local deploy scripts
- Add deploy type validation everywhere
- Restore and export PYTHONPATH in Makefile
- Remove unused test directory variables

https://chatgpt.com/share/69700042-3fcc-800f-8bf9-b429d5bb7e82
2026-01-20 23:22:32 +01:00
kevinveenbirkenbach fa5779aab1 refactor(setup): embed setup configuration directly into setup.sh
- Remove setup-related variables from Makefile
- Hard-code paths and scripts inside setup.sh
- Add validation and structured logging
- Compute reserved usernames dynamically

https://chatgpt.com/share/696ffc6d-dd00-800f-8f40-2112155fbeac
2026-01-20 23:06:31 +01:00
kevinveenbirkenbach 2344a04958 refactor(make): move install and setup logic into scripts
- extract Ansible collection install into scripts/install/ansible.sh
- extract venv bootstrap into scripts/install/venv.sh
- extract python deps install into scripts/install/python.sh
- extract project setup logic into scripts/setup.sh
- simplify Makefile targets to delegate to scripts
- add bootstrap target for full environment setup

https://chatgpt.com/share/696ff8cd-32d4-800f-bdd5-a34159aac1c0
2026-01-20 22:50:02 +01:00
kevinveenbirkenbach 12704e9fa3 refactor(test-act): extract act deploy logic into dedicated scripts
- Move test-act target logic into scripts/tests/deploy/act/all.sh
- Move test-act-app target logic into scripts/tests/deploy/act/app.sh
- Keep Makefile targets as thin delegators
- Preserve existing flags and behavior

This keeps the Makefile minimal and makes act workflows reusable.

https://chatgpt.com/share/696ff4de-3abc-800f-a206-2f3dd5dec170
2026-01-20 22:34:14 +01:00
kevinveenbirkenbach adfc5123fc refactor(test-local): extract cleanup and rapid deploy into dedicated scripts
- Move test-local-cleanup logic into scripts/tests/deploy/local/cleanup.sh
- Move test-local-rapid logic into scripts/tests/deploy/local/rapid.sh
- Simplify Makefile targets to delegate into scripts
- Keep behavior and flags fully backward compatible

This improves maintainability, reuse in CI, and keeps the Makefile thin.
2026-01-20 22:32:00 +01:00
kevinveenbirkenbach 5ce577bba2 refactor(tests): run unit tests directly via docker compose exec
- execute tests inside running infinito container (no CLI wrapper)
- require INFINITO_DISTRO explicitly and show it in banner
- keep Nix accept-flake-config behavior inside container
- pass TEST_PATTERN/TEST_TYPE as container env and set workdir
- fall back to python3 if PYTHON is unset

https://chatgpt.com/share/696ff1d0-aa84-800f-82cb-05f2b1618d05
2026-01-20 22:21:09 +01:00
kevinveenbirkenbach 50816243ed Solved linting hints 2026-01-20 20:50:50 +01:00
kevinveenbirkenbach d35e932e0c refactor(cli): switch development CLI to dynamic dispatcher and fix test paths
- Replace static argparse-based CLI in cli.deploy.development with dynamic
  module dispatcher compatible with nested command discovery.
- Ensure cli.deploy.development is executable via python -m and root dispatcher.
- Fix unit test path resolution to work locally and in CI.
- Make docker-* Makefile targets depend on install.
- Simplify test runner script and keep Nix flake config compatibility.

This aligns the CLI architecture with integration test discovery
(cli/**/__main__.py) and removes the need for manual subcommand registration.

https://chatgpt.com/share/696fdbbc-b6d8-800f-a8b5-067aa7e38706
2026-01-20 20:46:20 +01:00
kevinveenbirkenbach 4e0d09e773 refactor(dev-orchestrator): centralize image build and add up --when-down SPOT
- Introduce cli.deploy.development build subcommand as single build SPOT
- Remove legacy compose.build_infinito implementation
- Make up use build-missing logic via build handler
- Add --when-down flag to up (skip startup if stack already running)
- Simplify restart/run to reuse up handler
- Ensure tests use up --when-down to avoid stack interference
- Make test targets depend on build-missing

https://chatgpt.com/share/696fd3c9-99f0-800f-a0ab-33a91058419a
2026-01-20 20:13:02 +01:00
kevinveenbirkenbach bbea43f669 refactor(ci,tests): migrate discovery and local deploy to development compose stack
- Replace legacy ci scripts with meta build-test-matrix and resolve-invokable-roles
- Switch log tailing to scripts/meta/log-tail.sh
- Rename local DNS helpers to scripts/dns/*
- Run ci-deploy-discover via development docker-up
- Replace deploy-local-full with development compose orchestrator
- Ensure INFINITO_DISTRO is passed explicitly for local full deploy

https://chatgpt.com/share/696f9ccd-e4d8-800f-9c67-9c071188ecd0
https://chatgpt.com/share/696facf5-b2fc-800f-8a33-3352dd193c54
2026-01-20 17:27:09 +01:00
kevinveenbirkenbach a87c0375ef refactor(tests): run unit tests via development compose stack and exec wrapper
- Replace docker compose run with cli.deploy.development up/exec workflow
- Reuse existing stack (coredns + infinito) with healthcheck and entry init
- Preserve NIX flake non-interactive behavior inside container
- Ensure TEST_TYPE and TEST_PATTERN are validated and injected correctly

https://chatgpt.com/share/696f9ccd-e4d8-800f-9c67-9c071188ecd0
2026-01-20 16:39:12 +01:00
kevinveenbirkenbach f52a012829 feat(cli): replace test deploy runner with development CLI (up/down/stop/restart/run)
https://chatgpt.com/share/696f9ccd-e4d8-800f-9c67-9c071188ecd0
2026-01-20 16:18:31 +01:00
kevinveenbirkenbach aaf9667154 Removed legacy code 2026-01-20 13:02:02 +01:00
kevinveenbirkenbach a367fae1c1 ci(docker): ensure deterministic CI by wiping Docker data-root on /mnt
- Stop docker and clean /mnt/docker before restart
- Avoid volume/password drift and flaky Postgres init on GitHub runners
- Move purge_entity.sh into CI administration scope

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 11:52:22 +01:00
kevinveenbirkenbach b92e592336 Removed migrate marker 2026-01-20 09:59:04 +01:00