Commit Graph
13 Commits
Author SHA1 Message Date
Benjamin LabrecqueandClaude Opus 5 4a73e52a35 refactor: one definition per naming rule, drop ansible (step 5)
Consolidates the last duplicated derivations, and removes the ansible
tree along with the CLI surface that existed only to drive it.

Naming rules:

  * agebd/names.py holds ServiceName -- the single definition of how a
    service name is spelled in each context: dir_name, module_name,
    ioc_name, systemd_unit_name and the case forms. The environment
    suffix is deliberately not part of it; that stays a deploy-time
    token applied to these base names.
  * cli's Service model delegates every name_* property to it, so the
    CLI and the CI scripts derive names the same way.
  * scripts/ci/service_names.py emits the derived forms as shell
    assignments, and deploy-and-restart-service.sh evals them instead of
    carrying its own tr calls and its own copy of the systemd naming
    convention. Values are shell-quoted, and an invalid name exits
    non-zero emitting nothing, so an eval cannot leave empty variables
    behind.

Registry lookups:

  * agebd.subs.find_service_entry is now the only place that answers
    "which registry entry is this service", used by read_ioc_port,
    get_ioc_port.py and cli's ServiceRegistry. get_ioc_port.py no longer
    parses the registry itself.
  * That also settles a semantic split: ServiceRegistry matched names
    case-sensitively while read_ioc_port did not. Both now match
    case-insensitively via ServiceName, so 'tune', 'Tune' and 'TUNE'
    resolve to the same service everywhere.

Ansible removal:

  * ansible/ is deleted, along with cli/src/ioc.py, cli/src/core/
    ansible.py, the IOC_ENV enum, the ansible and ansible-runner
    dependencies, and docs/developer/ansible.md.
  * This removes the 'agebd ioc install|start|restart' commands. They
    were pure playbook wrappers, so they could not outlive the
    playbooks; IOC install, start and restart now have no automation
    path in this repo.

bin/start_service.sh keeps deriving its two name forms in bash, with a
comment saying why: it runs on the deploy host before the service venv
exists, so it cannot import agebd. It is the one deliberate exception.

Verified: get_ioc_port.py, cli's ServiceRegistry and agebd's renderer all
return 50007 for 'tune', 'Tune' and 'TUNE'; the shell-emitted names match
the committed on-disk layout for real services including the dashed
OpticsFF-X02S; the CLI runs with only the 'service' command left.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 10:35:41 +02:00
Benjamin Labrecque 3de7536b27 feat: add script to check that UI files contain the env suffix macro for dev/prod
Deploy / deploy (push) Successful in 1m33s
2026-07-27 10:00:35 +02:00
Benjamin Labrecque c341972362 chore: use sls2om package from gitea sls org
Deploy / deploy (push) Failing after 1m22s
2026-07-24 14:09:34 +02:00
Benjamin Labrecque e310453487 cli: add tests for agebd service new 2026-07-23 15:41:22 +02:00
Benjamin Labrecque 7e690a907e refactor: add paths, services ctx, and extract models to own files 2026-07-22 12:04:55 +02:00
Benjamin Labrecque e324e3abed feat: use settings for paths in cli and add tests 2026-07-22 09:30:40 +02:00
Benjamin Labrecque c4d6f2afb4 cli: use env through ansible for ioc commands
Deploy / deploy (push) Canceled after 0s
2026-07-20 15:13:18 +02:00
Benjamin Labrecque 9bafe6ca87 chore: fix python to 3.10 so local and dev/prod match 2026-07-15 15:54:23 +02:00
Benjamin Labrecque 2e8b5b6f51 cli: add ioc commands
Deploy and restart modified services / deploy (push) Successful in 18s
2026-07-15 08:25:03 +02:00
Benjamin Labrecque 5399f374c9 chore: use ansible from inside venv to have full control of version, etc 2026-07-10 10:17:16 +02:00
Benjamin Labrecque c7604359a9 feature: add new service template files rendering
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 14:06:25 +02:00
Benjamin Labrecque dfc19768fa chore: add cli tool -- init skeleton 2026-07-03 13:12:41 +02:00
Benjamin Labrecque c65a6e1728 chore: add cli skeleton and create config dir
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 08:25:56 +02:00