-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from epics-containers/dev
Latest ibek changes. New IOC instance example.
- Loading branch information
Showing
7 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,29 @@ | ||
ADSimDetector Generic IOC for epics-containers | ||
============================================== | ||
# ADSimDetector Generic IOC for epics-containers | ||
|
||
Creates a generic IOC for ADSimDetector using GitHub Actions and | ||
IOC Builder for EPICS and Kubernetes (ibek). | ||
|
||
The Generic IOC built by CI is published to | ||
[Github Packages](https://github.com/orgs/epics-containers/packages?repo_name=ioc-adsimdetector). | ||
|
||
The registry provides a runtime | ||
image for deploying to production and a dev image for testing, | ||
debugging and developing new features. epics-containers implements | ||
tools to launch IOCs in a Kubernetes cluster. But any container | ||
runtime can be used to launch an IOC instance by mounting configuration | ||
files into the container. | ||
## How to test this container | ||
|
||
## Launching an IOC instance | ||
1. `git clone [email protected]:epics-containers/ioc-adsimdetector.git` | ||
2. `git submodule update --init --recursive` | ||
3. open the folder in vscode | ||
4. reopen in container | ||
5. optional - view log to see the build progress | ||
6. open a terminal and perform the following inside the container | ||
|
||
The Generic IOC can be launched as an IOC instance. To do this a | ||
container runtime should load the above runtime image and mount | ||
instance configuration files into the folder `/epics/ioc/config`. | ||
- (TODO it would be nice to have a single ibek wrapper command for these | ||
or maybe add them in as part of the 'ioc build' wrapper) | ||
- `ibek ioc build` | ||
- `ibek dev instance /epics/ioc-adsimdetector/ioc_examples/bl01t-ea-ioc-02` | ||
- `cd /epics/ioc` | ||
- `./start` | ||
- `python -m http.server 8000 --directory /epics/opi` | ||
|
||
Options for the configuration files are:- | ||
|
||
- ioc.yaml: | ||
- If the config folder contains an ioc.yaml file we invoke the ibek tool to | ||
generate the startup script and database. Then launch with the generated | ||
startup script. | ||
|
||
- st.cmd + ioc.subst: | ||
- If the config folder contains a st.cmd script and a ioc.subst file then | ||
optionally generate ioc.db from the ioc.subst file and use the st.cmd script | ||
as the IOC startup script. Note that the expanded database file will | ||
be generated in /tmp/ioc.db | ||
|
||
- start.sh: | ||
- If the config folder contains a start.sh script it will be executed. | ||
This allows the instance implementer to provide a completely custom | ||
startup script. | ||
|
||
- no mount: | ||
- If the config folder is empty then this Generic IOC will launch the | ||
example IOC instance | ||
7. `phoebus.sh -resource 'http://localhost:8000/index.bob'` | ||
|
||
## Related projects | ||
|
||
|
@@ -55,4 +38,3 @@ container image upon which all Generic IOCs are built. | |
- [epics-containers-cli](https://github.com/epics-containers-cli) a command | ||
line tool to assist with building and deploying epics-containers into | ||
Kubernetes. | ||
|
Submodule ibek-support
updated
32 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.11.2/ibek.ioc.schema.json | ||
|
||
ioc_name: bl01t-ea-ioc-02 | ||
description: Example simulated camera for BL01T | ||
|
||
entities: | ||
- type: ADSimDetector.simDetector | ||
PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
R: ":CAM:" | ||
|
||
- type: ADCore.NDPvaPlugin | ||
PORT: det.pva | ||
PVNAME: BL01T-EA-TST-02:PVA:OUTPUT | ||
P: BL01T-EA-TST-02 | ||
R: ":PVA:" | ||
NDARRAY_PORT: det.cam | ||
|
||
- type: ADCore.NDROI | ||
NDARRAY_PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
PORT: det.roi | ||
R: ":ROI:" | ||
|
||
- type: ADCore.NDStdArrays | ||
FTVL: UCHAR | ||
NDARRAY_PORT: det.roi | ||
NELEMENTS: 1200000 | ||
P: BL01T-EA-TST-02 | ||
PORT: det.arr | ||
R: ":ARR:" | ||
TYPE: Int8 | ||
|
||
- type: ADCore.NDStats | ||
HIST_SIZE: 256 | ||
NDARRAY_PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
PORT: det.stat | ||
R: ":STAT:" | ||
XSIZE: 1292 | ||
YSIZE: 964 | ||
|
||
- type: ADCore.NDProcess | ||
NDARRAY_PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
PORT: det.proc | ||
R: ":PROC:" | ||
|
||
- type: ADCore.NDFileTIFF | ||
NDARRAY_PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
PORT: det.tiff | ||
R: ":TIFF:" | ||
|
||
- type: ADCore.NDFileHDF5 | ||
NDARRAY_PORT: det.cam | ||
P: BL01T-EA-TST-02 | ||
PORT: det.hdf | ||
R: ":HDF5:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
image: ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2023.10.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ibek==1.5.0 | ||
ibek==1.5.2 | ||
# to install direct from github during development in the dev branch: | ||
#git+https://github.com/epics-containers/ibek.git@dev |