Skip to content

Repository files navigation

t01 IOC Instances and Services

This repository holds the a definition of t01 IOC Instances and services. Each sub folder of the services directory contains a helm chart for a specific service or IOC. The corresponding deployments repo can be found at [https://gitlab.diamond.ac.uk/controls/containers/beamline/t01-deployment].

Using pre-commit hooks

Pre commit hooks will validate the synoptic and additional soft support if present. To install pre-commit hooks run:

uvx pre-commit install

To force execution of the pre-commit hooks on all files run:

uvx pre-commit run --all-files

Vendoring runtime support

Runtime support (stream protocol files, EPICS DB templates and the ibek entity models that describe them) is vendored directly into each IOC instance's config/ folder from a central pattern library (e.g. ibek-runtime-streamdevice or ibek-runtime-support).

config/ is the Kubernetes ConfigMap that is mounted into the running container, so it holds runtime inputs only and must stay under 1 MiB.

Manage vendored patterns from the repo root with ibek pattern:

# vendor a pattern (writes config/ files + ../runtime-lock.yaml + ../ioc.schema.json)
ibek pattern add <library>:<pattern>@<tag> services/<instance>

# re-vendor after a version bump (e.g. raised by Renovate on runtime-lock.yaml)
ibek pattern update services/<instance>

# verify on-disk vendored files still match their recorded sha256 hashes
ibek pattern check services/<instance>

# restore a vendored file that was accidentally edited
ibek pattern restore services/<instance>

How it fits together:

  • services/<instance>/runtime-lock.yaml — records the library source, the pinned version (git tag) and the sha256 of every vendored file. Renovate watches this file and raises a PR when a new library release is available; after a bump CI / the maintainer must re-run ibek pattern update.
  • services/<instance>/ioc.schema.json — a per-instance JSON schema (referenced from the first line of config/ioc.yaml) generated by ibek pattern schema. It is regenerated by a pre-commit hook and combines the base IOC schema, every vendored pattern's entity models and any local *.ibek.support.yaml you drop into config/.
  • Local beamline support — for one-off, beamline-specific support just add a plain editable *.ibek.support.yaml (plus any DB/proto it needs) directly in config/. It is not recorded in the lock file and is merged into the schema automatically, so you can edit it freely.
  • Vendored files carry a DO NOT EDIT header and are content-addressed; never hand-edit them (CI verifies their hashes via ibek pattern check). A new formatter / EOL pre-commit hook must exclude the files listed in runtime-lock.yaml.

Note: the old top-level ibek-runtime-support/ directory, the global runtime.schema.json and the per-repo schema pre-commit hook have been retired in favour of this per-instance vendoring model.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages