Commit Graph
14682 Commits
Author SHA1 Message Date
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 cb88b0200f Optimized Name 2026-01-21 01:51:54 +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 b6bd9d51e9 Removed unnecessary dependencies 2026-01-21 00:33:28 +01:00
kevinveenbirkenbach a565344ed5 Solved shellcheck 2026-01-21 00:25:35 +01:00
kevinveenbirkenbach ea78ff376f test(container): adapt CLI tests for required INVENTORY_DIR and forwarding
- add --inventory-dir to container CLI test invocations
- assert inventory_dir is forwarded to run_in_container()
- add tests for required INVENTORY_DIR when env is missing
- add test for INVENTORY_DIR env fallback

https://chatgpt.com/share/69700d69-b270-800f-ad50-d9ff486378b9
2026-01-21 00:23:54 +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 736fb5a2ec fix(build): pass required env vars to install scripts
Ensure install scripts run deterministically under set -u by explicitly
passing required environment variables from the Makefile:

- pass VENV, VENV_BASE and PYTHON to scripts/install/venv.sh
- pass ANSIBLE_COLLECTIONS_DIR and PYTHON to scripts/install/ansible.sh

This prevents hard failures in Docker and CI builds where variables are
not inherited from interactive shells.

https://chatgpt.com/share/6970018e-1244-800f-9345-ca1596061729
2026-01-20 23:33:46 +01:00
kevinveenbirkenbach dda0f6b2ac fix(build): export VENV for deterministic venv installation in Docker/CI
Ensure the VENV path is available to install scripts when running under
set -u (e.g. during Docker image builds and CI). Without this, venv.sh
fails with "VENV not set" during INFINITO_COMPILE builds.

This makes the build deterministic and independent from interactive
shell environments.

https://chatgpt.com/share/6970018e-1244-800f-9345-ca1596061729
2026-01-20 23:28:20 +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 0721b166be VENV Cleanupo 2026-01-20 23:00:01 +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 0dd37d8833 Docker up before test 2026-01-20 22:24:07 +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 96487fad55 Revert "decoupeled test from image buzild"
This reverts commit e182883a48.
2026-01-20 22:08:10 +01:00
kevinveenbirkenbach 0a4040d14d Lint 2026-01-20 22:00:49 +01:00
kevinveenbirkenbach 015d798c3b Removed wrong docker-up call 2026-01-20 21:59:04 +01:00
kevinveenbirkenbach 3fdd68932c Replaced docker by installatioon logic 2026-01-20 21:33:12 +01:00
kevinveenbirkenbach 3f72581c9d Optimized dir for github actions 2026-01-20 21:28:47 +01:00
kevinveenbirkenbach d22dc4748b **refactor(cli): switch development dispatcher to argparse subcommands**
* Replace runpy-based nested CLI dispatch with argparse subcommand hub
* Auto-register development commands via `add_parser()` and execute `_handler`
* Fix `python -m cli.deploy.development <cmd>` resolution (e.g. `up`, `down`, `run`)

https://chatgpt.com/share/696fdea6-b208-800f-8b55-c4205c567aa2
2026-01-20 20:59:24 +01:00
kevinveenbirkenbach 50816243ed Solved linting hints 2026-01-20 20:50:50 +01:00
kevinveenbirkenbach e182883a48 decoupeled test from image buzild 2026-01-20 20:48:26 +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 1b07554914 Removed build missing flag for tests 2026-01-20 18:30:25 +01:00
kevinveenbirkenbach 41829df6e0 ci: build CI images first and use per-commit image tags in tests
- Run build-ci-images before all code test jobs
- Propagate ci-${GITHUB_SHA} image tag into test workflows
- Remove forced INFINITO_PULL_POLICY=never from Makefile tests
- Ensure tests use the freshly built CI images instead of :latest

https://chatgpt.com/share/696fb8cc-6b24-800f-8c96-d840f68d8eaa
2026-01-20 18:17:50 +01:00
kevinveenbirkenbach e23ffdc2aa feat(nix): make flake config non-interactive via nix.conf and simplify NIX_CONFIG handling
Enable accept-flake-config globally in the image to avoid interactive prompts.
Remove automatic NIX_CONFIG injection from Makefile and only export it when explicitly set.

https://chatgpt.com/share/696fb4fc-8cf0-800f-af72-f5d6428be14c
2026-01-20 18:01:23 +01:00
kevinveenbirkenbach b18509d18a Removed up dependency 2026-01-20 17:28:49 +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 fda49ca30e fix(ci,nix): make flake config non-interactive and add safe pkgmgr debug
- Stop baking NIX_CONFIG into Docker image layers
- Build effective NIX_CONFIG via Makefile using real multiline config
- Always allow flake-provided nixConfig non-interactively
- Add sanitized rescue/debug block for pkgmgr update (no credential leaks)
- Improve CI diagnostics for GitHub token / nix access issues

https://chatgpt.com/share/696f8687-4444-800f-ab86-021bcb35a7a6
2026-01-20 14:43:09 +01:00
kevinveenbirkenbach aaf9667154 Removed legacy code 2026-01-20 13:02:02 +01:00
kevinveenbirkenbach 811501d85f refactor(ci): move compose down logic into dedicated down module with safe /mnt/docker cleanup
https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 12:54:54 +01:00
kevinveenbirkenbach 3093213a84 ci: mount Docker data-root via env-configured volume on GitHub runner
- Add INFINITO_DOCKER_VOLUME and INFINITO_DOCKER_MOUNT env wiring in Makefile
- Switch infinito service to mount Docker root via env (with local fallback volume)
- Disable docker-on-mnt helper in favor of compose-based mount
- Keep named volume as fallback for local deployments

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 12:24:11 +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 b6c2dd01c8 fix(postgres): replace pg_isready with real TCP auth wait and add log dump on failure
- Replace pg_isready with psql TCP password authentication check
- Eliminate Postgres init race condition in CI
- Add rescue handler dumping last 200 container log lines on failure

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 11:38:15 +01:00
kevinveenbirkenbach 6c50831456 fix(postgres): avoid jinja/go-template collision in debug rescue block
Replace inline lookup('pipe', 'docker info -f {{.DockerRootDir}}') with a raw shell task
to prevent Jinja parsing errors ("unexpected '.'") during rescue debugging.

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 11:22:23 +01:00
kevinveenbirkenbach 659b45f7a2 build(docker): enforce and run base image slim.sh cleanup during build
- ensure slim.sh exists in pkgmgr base image
- execute safe verbose cleanup before entrypoint
- reduce final Docker image size without touching runtime files

https://chatgpt.com/share/696f4ab6-fae8-800f-9a46-e73eb8317791
2026-01-20 10:54:55 +01:00
kevinveenbirkenbach 7272c3d56c fix(postgres): escape docker inspect go-templates in rescue debug
- Replace jinja-colliding docker inspect formats with raw-escaped go-templates
- Keep POSTGRES_CONTAINER rendered by Ansible while preserving Docker templates
- Improve reliability and readability of rescue debug output

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 10:40:01 +01:00
kevinveenbirkenbach b92e592336 Removed migrate marker 2026-01-20 09:59:04 +01:00
kevinveenbirkenbach e10a000291 fix(ci,postgres): stabilize GitHub runner env, move docker to /mnt, add deep debug for role login
- Introduce deterministic RUNNING_ON_GITHUB / RUNNING_ON_ACT detection
- Move Docker data-root to /mnt on real GitHub runners only
- Switch POSTGRES_PASSWORD schema from bcrypt to alphanumeric (avoid $ interpolation)
- Add robust rescue/debug block for ALTER ROLE login step
  (docker inspect, logs, pg_isready, psql auth, hba, activity, roles)
- Make docker-on-mnt deterministic (no migration, root-dir assertion)

Fixes flaky CI runs and intermittent PostgreSQL authentication failures.

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 09:57:32 +01:00
kevinveenbirkenbach 2baa03176a fix(ci): remove unused loop variable in move-docker-to-mnt.sh 2026-01-20 03:46:31 +01:00
kevinveenbirkenbach cb7b878c85 feat(ci): move Docker data-root to /mnt on GitHub runners and raise CI storage threshold
https://chatgpt.com/share/696eeb85-9d78-800f-9844-bfdebe07a0fa
2026-01-20 03:41:55 +01:00