From f9de788baf10a71bce39479efdcf4538faea48e5 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Fri, 3 Jul 2026 16:26:46 +0200 Subject: [PATCH] chore: change deploy paths to move prod/dev at top level -- /sls/bd/hla/dev/... --- bin/start_service.sh | 4 ++-- services/000-master/app/pyproject.toml | 2 +- services/000-master/systemd/AGEBD-SERVICE-MASTER.service | 5 ++--- .../app/pyproject.toml.jinja | 2 +- .../AGEBD-SERVICE-[[service_name_upper]].service.jinja | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/start_service.sh b/bin/start_service.sh index 24e6725..448d72b 100755 --- a/bin/start_service.sh +++ b/bin/start_service.sh @@ -7,9 +7,9 @@ set -- # TODO: # PSI_FACILITY=SLS -SERVICES_DIR=/sls/bd/hla/services +SERVICES_DIR=/sls/bd/hla/${AGEBD_ENV}/services SVC_NAME_LOWER=${SVC_NAME,,} -SVC_DIR=${SERVICES_DIR}/${AGEBD_ENV}/${SVC_ID}-${SVC_NAME_LOWER} +SVC_DIR=${SERVICES_DIR}/${SVC_ID}-${SVC_NAME_LOWER} # gfa_12_epics.sh died on the 16.04.2026 due to required AFS write access #. /etc/profile.d/gfa_12_epics.sh diff --git a/services/000-master/app/pyproject.toml b/services/000-master/app/pyproject.toml index e000446..53fc030 100644 --- a/services/000-master/app/pyproject.toml +++ b/services/000-master/app/pyproject.toml @@ -18,7 +18,7 @@ dev = [ [tool.uv.sources] # Path is relative to where agebd package is deployed on hla # machines (see CI/CD in .gitea/workflows) -agebd = { path = "../../../../../packages/dev/agebd", editable = true } +agebd = { path = "../../../../packages/agebd", editable = true } [tool.ruff] include = [ diff --git a/services/000-master/systemd/AGEBD-SERVICE-MASTER.service b/services/000-master/systemd/AGEBD-SERVICE-MASTER.service index a382a3c..2e54899 100644 --- a/services/000-master/systemd/AGEBD-SERVICE-MASTER.service +++ b/services/000-master/systemd/AGEBD-SERVICE-MASTER.service @@ -3,9 +3,8 @@ Description=AGEBD-SERVICE-MASTER After=network.target [Service] -# TODO: env -Environment=AGEBD_ENV=dev -ExecStart=/sls/bd/hla/bin/start_service.sh 000 MASTER +Environment=AGEBD_ENV={{ agebd_env }} +ExecStart=/sls/bd/hla/{{ agebd_env }}/bin/start_service.sh 000 MASTER Restart=no [Install] diff --git a/templates/service/[[service_id]]-[[service_name_lower]]/app/pyproject.toml.jinja b/templates/service/[[service_id]]-[[service_name_lower]]/app/pyproject.toml.jinja index ac0b81e..40314c9 100644 --- a/templates/service/[[service_id]]-[[service_name_lower]]/app/pyproject.toml.jinja +++ b/templates/service/[[service_id]]-[[service_name_lower]]/app/pyproject.toml.jinja @@ -17,7 +17,7 @@ dev = [ [tool.uv.sources] # Path is relative to where agebd package is deployed on hla # machines (see CI/CD in .gitea/workflows) -agebd = { path = "../../../../../packages/{{ '{{ agebd_env }}' }}/agebd", editable = true } +agebd = { path = "../../../../packages/agebd", editable = true } [tool.ruff] include = [ diff --git a/templates/service/[[service_id]]-[[service_name_lower]]/systemd/AGEBD-SERVICE-[[service_name_upper]].service.jinja b/templates/service/[[service_id]]-[[service_name_lower]]/systemd/AGEBD-SERVICE-[[service_name_upper]].service.jinja index d7f73fa..6e1174d 100644 --- a/templates/service/[[service_id]]-[[service_name_lower]]/systemd/AGEBD-SERVICE-[[service_name_upper]].service.jinja +++ b/templates/service/[[service_id]]-[[service_name_lower]]/systemd/AGEBD-SERVICE-[[service_name_upper]].service.jinja @@ -4,7 +4,7 @@ After=network.target [Service] Environment=AGEBD_ENV={{ '{{ agebd_env }}' }} -ExecStart=/sls/bd/hla/bin/start_service.sh {{ service_id }} {{ service_name_upper }} +ExecStart=/sls/bd/hla/{{'{{ agebd_env }}'}}/bin/start_service.sh {{ service_id }} {{ service_name_upper }} estart=no [Install]