docs: update readme

This commit is contained in:
Benjamin Labrecque
2026-07-17 14:29:39 +02:00
parent fe6c86490b
commit 2a9e546ac7
3 changed files with 86 additions and 1076 deletions
+31 -17
View File
@@ -1,17 +1,35 @@
# SLS HLA Framework # SLS HLA Framework
## Getting started
Install [uv](https://docs.astral.sh/uv/)
## CLI
Using the CLI:
```
cd cli
uv sync
source .venv/bin/activate
agebd --help
```
### Adding a new service
```
agebd service add --help
```
## Environments ## Environments
The services are deployed to 2 environments: The services are deployed to 2 environments:
- `prod` | Environment | Network | Host | Deploy path on host |
- network: `machine` |---|---|---|---|
- host: `sls-vserv-bd-hla01` |`prod` | `machine`| `sls-vserv-bd-hla01` | `/sls/bd/hla/prod/` |
- path: `/sls/bd/hla/prod/` | `dev` | `office` | `sls-vserv-bd-hla01-dev` | `/sls/bd/hla/dev/` |
- `dev`
- network: `office`
- host: `sls-vserv-bd-hla01-dev`
- path: `/sls/bd/hla/dev/`
### Process Variables (PVs) ### Process Variables (PVs)
@@ -45,15 +63,11 @@ i.e. there is no `dev` PV.
For python services there are 3 environments. The python environment is set through the env variable `AGEBD_ENV`. For python services there are 3 environments. The python environment is set through the env variable `AGEBD_ENV`.
- `prod`: used when deployed to `prod` | Environment | PVs |
- PVs: uses `prod` PVs |---|---|
- `AGEBD_ENV=prod` | `AGEBD_ENV=prod` | uses `prod` PVs |
- `dev`: used when deployed to `dev` | `AGEBD_ENV=dev` | uses `dev` PVs |
- PVs: uses `dev` PVs | `AGEBD_ENV=local` | uses fake/mock python objects as PVs, no access to real PVs |
- `AGEBD_ENV=dev`
- `local`: used when running code locally
- PVs: uses fake/mock python objects as PVs, no access to real PVs
- `AGEBD_ENV=local`
## Hosts overview ## Hosts overview
+12 -5
View File
@@ -9,17 +9,24 @@ service = typer.Typer(no_args_is_help=True)
REPO_ROOT = get_git_root(__file__) REPO_ROOT = get_git_root(__file__)
@service.command(no_args_is_help=True) @service.command(
no_args_is_help=True,
help="Running this command will create a new branch 'feature/add-service-<name>', "
"add all the required files for a new service, and push. "
"See: https://gitea.psi.ch/sls/hla_framework_bd/branches",
)
def add( def add(
name: str = typer.Option(..., "--name", "-n"), name: str = typer.Option(
user: str = typer.Option(..., "--user", "-u"), ..., "--name", "-n", help="Must only contain lowercase characters and dashes"
),
user: str = typer.Option(..., "--user", "-u", help="PSI username of the owner of the service"),
ioc_description: str = typer.Option( ioc_description: str = typer.Option(
..., "--ioc-description", "-d", help="See <repo-root>/docs/ioc/ioc_overview.md for examples" ..., "--ioc-description", "-d", help="See <repo-root>/docs/ioc/ioc_overview.md for examples"
), ),
ui_name: str = typer.Option( ui_name: str = typer.Option(
..., ...,
"--ui-name", "--ui-name",
help="This is the name that will be used for the service in the UI." help="This is the name that will be used for the service in the UI. "
"See <repo-root>/qt/A_BD_ServiceManager.ui for examples", "See <repo-root>/qt/A_BD_ServiceManager.ui for examples",
), ),
ui_filename: str = typer.Option( ui_filename: str = typer.Option(
@@ -64,7 +71,7 @@ def migrate(
service_creator.migrate_service(name=name) service_creator.migrate_service(name=name)
@service.command(no_args_is_help=True) @service.command()
def list(): def list():
registry = ServiceRegistry.read_from_config() registry = ServiceRegistry.read_from_config()
services = registry.get_services() services = registry.get_services()
Generated
+43 -1054
View File
File diff suppressed because it is too large Load Diff