Skip to content

Commit

Permalink
adopt template 3.2.0b1
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 4, 2024
1 parent bd9ca92 commit ebe5899
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 22 deletions.
8 changes: 8 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 3.2.0b1
_src_path: gh:epics-containers/ioc-template
description: Generic IOC for the Delta Tau turbo pmac and power pmac motion controllers
git_platform: github.com
github_org: epics-containers
name: ioc-pmac
repo_uri: [email protected]:epics-containers/ioc-pmac.git
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${REGISTRY}/epics-base-${TARGET_ARCHITECTURE}-developer:${BASE} AS develop
# The devcontainer mounts the project root to /epics/generic-source
# Using the same location here makes devcontainer/runtime differences transparent.
ENV SOURCE_FOLDER=/epics/generic-source
# connect ioc source folder its know location
# connect ioc source folder to its know location
RUN ln -s ${SOURCE_FOLDER}/ioc ${IOC}

# Get latest ibek while in development. Will come from epics-base when stable
Expand All @@ -21,7 +21,6 @@ WORKDIR ${SOURCE_FOLDER}/ibek-support
# copy the global ibek files
COPY ibek-support/_global/ _global

# TODO needs patching for rtems
COPY ibek-support/iocStats/ iocStats
RUN iocStats/install.sh 3.2.0

Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
An epics-containers generic IOC source file for Delta Tau pmac motion controllers.
# Generic IOC Template Repository ioc-pmac

Generates a Generic IOC for running in a container and
creating IOC instances to control pmac motion controllers.
## Description
Generic IOC for the Delta Tau turbo pmac and power pmac motion controllers

See the https://epics-containers.github.io
## Template Info
This repository was generated by
[ioc-template](https://github.com/epics-containers/ioc-template)

To update to the latest version of the template:

```bash
# activate a python virtual environment

pip install copier
cd ioc-pmac
copier update -A --trust .
```
9 changes: 4 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ set -xe

cd $(dirname ${0})

# use docker if available else use podman, also use buildx if available
# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi
if $docker buildx version &>/dev/null; then builx=buildx; load=--load; fi

# make sure new repos get their submodule ibek-support
# allow failure so that we can rebuild with dirty submodules
# allow failure to support working with modified submodule
git submodule update --init || true

$docker $buildx build -t ${TAG} $load \
--build-arg TARGET_ARCHITECTURE=$T_A \
--target $TARGET .
# build and developer images
$docker build -t ${TAG} --build-arg TARGET_ARCHITECTURE=$T_A $load --target $TARGET .

22 changes: 16 additions & 6 deletions ioc/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,23 @@ description='
2. ioc.yaml *************************************************************
If the config folder contains a yaml file we invoke the ibek tool to
generate the startup script and database. Then launch with the generated
startup script. The file name should be the name of the ioc with a 'yaml'
extension e.g. bl38p-ea-panda-02.yaml. Using a unique name allows for:
startup script. The file name should always be 'ioc.yaml'. The ioc instance
can determine its own name with the following as the first line in 'ioc.yaml'
ioc_name: "{{ ioc_yaml_file_name }}"
ioc_name: ""{{ __utils__.get_env('IOC_NAME') }}""
at the top of the file and in turn "{{ ioc_name }}"" can be used in any
of the fields within the file.
of the fields within the file. For example: by default Kubernetes will be
looking at the iocStats PV IOC_NAME:Uptime to validate health of the IOC,
therefore most IOC instances should include:
entities:
- type: epics.EpicsEnvSet
name: EPICS_TZ
value: "GMT0BST"
- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"
3. st.cmd + ioc.subst *********************************************************
If the config folder contains a st.cmd script and a ioc.subst file then
Expand Down Expand Up @@ -121,15 +131,15 @@ elif [ -f ${ibek_src} ]; then

# get the ibek support yaml files this ioc's support modules
defs=/epics/ibek-defs/*.ibek.support.yaml
ibek runtime generate ${ibek_src} ${defs} --out ${final_ioc_startup} --db-out ${db_src}
ibek runtime generate ${ibek_src} ${defs}

# build expanded database using msi
if [ -f ${db_src} ]; then
includes=$(for i in ${SUPPORT}/*/db; do echo -n "-I $i "; done)
bash -c "msi -o${epics_db} ${includes} -I${RUNTIME_DIR} -S${db_src}"
fi

# 2. st.cmd + ioc.subst ************************************************
# 3. st.cmd + ioc.subst ************************************************
elif [ -f ${ioc_startup} ] ; then

if [ -f ${CONFIG_DIR}/ioc.subst ]; then
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ibek==1.6.3
ibek==1.7.0
# to install direct from github during development in a branch
# git+https://github.com/epics-containers/ibek.git@fix-extract-assets

0 comments on commit ebe5899

Please sign in to comment.