docs: add notes about environments to readme
This commit is contained in:
@@ -1,5 +1,60 @@
|
||||
# SLS HLA Framework
|
||||
|
||||
## Environments
|
||||
|
||||
The services are deployed to 2 environments:
|
||||
|
||||
- `prod`
|
||||
- network: `machine`
|
||||
- host: `sls-vserv-bd-hla01`
|
||||
- path: `/sls/bd/hla/prod/`
|
||||
- `dev`
|
||||
- network: `office`
|
||||
- host: `sls-vserv-bd-hla01-dev`
|
||||
- path: `/sls/bd/hla/dev/`
|
||||
|
||||
### Process Variables (PVs)
|
||||
|
||||
We distinguish between
|
||||
|
||||
- `prod` and `dev` PVs
|
||||
- **services specific** PVs from a dedicated IOC, and **external** PVs from other IOCs
|
||||
|
||||
#### PVs - Service Specific
|
||||
|
||||
You create them, see (# TODO: docs...)
|
||||
|
||||
`prod` and `dev` PVs automatically get created.
|
||||
|
||||
In your code, you only use the `prod` name of a PV. The framework will automatically use the
|
||||
`dev` name/PV when a service runs in the `dev` environment.
|
||||
|
||||
#### PVs - External
|
||||
|
||||
You can only access them. The framework will use the same PV in `prod` and `dev`,
|
||||
i.e. there is no `dev` PV.
|
||||
|
||||
#### PVs - Examples
|
||||
|
||||
| Environment | Service Specific | External |
|
||||
|---|---|---|
|
||||
|`prod` | `PV("AGEBD-MYSERVICE:MYPVNAME")` | `PV("AGEOP-SOME-SERVICE:SOME-PVNAME")` |
|
||||
| `dev` | `PV("AGEBD-MYSERVICE-DEV:MYPVNAME")` | - |
|
||||
|
||||
### Python
|
||||
|
||||
For python services there are 3 environments. The python environment is set through the env variable `AGEBD_ENV`.
|
||||
|
||||
- `prod`: used when deployed to `prod`
|
||||
- PVs: uses `prod` PVs
|
||||
- `AGEBD_ENV=prod`
|
||||
- `dev`: used when deployed to `dev`
|
||||
- PVs: uses `dev` 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
|
||||
|
||||
Check which network a host lives in, e.g. for `sls-lca`:
|
||||
@@ -7,13 +62,13 @@ Check which network a host lives in, e.g. for `sls-lca`:
|
||||
ping sls-lca.psi.ch
|
||||
```
|
||||
|
||||
### Machine Net (PROD)
|
||||
### Machine Net (`prod`)
|
||||
|
||||
- sls-lca
|
||||
- sls-vserv-bd-01
|
||||
- sls-vserv-bd-hla01
|
||||
|
||||
### Office Net (DEV)
|
||||
### Office Net (`dev`)
|
||||
|
||||
- sls-lc8
|
||||
- sls-lc9
|
||||
|
||||
Reference in New Issue
Block a user