Skip to content

About

Beamline repo for Training Rig BL47P

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

503 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p47 IOC Instances and Services

This repository holds the a definition of p47 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/p47-deployment].

Smoke test

scripts/smoke-test.sh checks the live p47 beamline end to end, read-only: Argo CD apps and pods healthy, each IOC's representative PVs answering both directly on the beamline host and through the gateway, blueapi's healthz, and the OPIs served over HTTP. An optional, human-gated step logs in to the real DLS Keycloak with a device code (via blueapi's own login command) and submits a small test plan; the script never attempts that login itself.

scripts/smoke-test.sh \
  --argocd-kubeconfig <kubeconfig for argus, the Argo CD Applications> \
  --pod-cluster <kubeconfig for pollux, where the beamline Pods run>

See scripts/smoke-test.sh --help for every option, including --strict (don't excuse the known, parked bl47p-synoptic failure, services-template-helm#145) and --login (run the optional device-code login and plan).

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

Beamline repo for Training Rig BL47P

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages