-
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.
- Loading branch information
0 parents
commit 25c036d
Showing
15 changed files
with
729 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and publish a beamline's ioc helm charts | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
HELM_VERSION_TO_INSTALL: 3.13.2 | ||
|
||
jobs: | ||
build-and-push-helm-charts: | ||
name: publish helm charts to ghcr.io | ||
runs-on: ubuntu-latest | ||
environment: prod | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: install helm | ||
uses: Azure/setup-helm@v3 | ||
with: | ||
version: ${{ env.HELM_VERSION_TO_INSTALL }} | ||
|
||
- name: push the helm chart | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${{ github.repository_owner }} --username ${{ github.repository_owner }} --password-stdin | ||
REGISTRY=oci://ghcr.io/epics-containers | ||
set -x | ||
# helm tags must be SemVar. Use 0.0.0-b0 for testing the latest non-tagged build | ||
if [ "${GITHUB_REF_TYPE}" == "tag" ] ; then | ||
TAG=${GITHUB_REF_NAME} | ||
else | ||
TAG="0.0.0-b0" | ||
fi | ||
for chart in Charts/*; do | ||
( | ||
cd $(realpath $chart) | ||
NAME=$(sed -n '/^name: */s///p' Chart.yaml) | ||
helm package -u --app-version ${TAG} --version ${TAG} . | ||
PACKAGE=${NAME}-${TAG}.tgz | ||
helm push "$PACKAGE" $REGISTRY | ||
) | ||
done |
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,20 @@ | ||
name: Publish schemas | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
release: | ||
# Release on tag push - publish schema | ||
if: ${{ github.ref_type == 'tag' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Github Release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | ||
with: | ||
files: | | ||
Schemas/*.schema.json | ||
generate_release_notes: true |
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,13 @@ | ||
# A Helm Chart for an IOC instance | ||
apiVersion: v2 | ||
name: ec-service | ||
|
||
version: 1.0.0 | ||
|
||
type: application | ||
|
||
dependencies: | ||
- name: ioc-instance | ||
version: 3.5.1+b5 | ||
repository: "oci://ghcr.io/epics-containers" | ||
#repository: "file:///home/giles/work/ec-helm-charts/Charts/ioc-instance" |
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,121 @@ | ||
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adaravis/releases/download/2024.1.2/ibek.ioc.schema.json | ||
|
||
ioc_name: " [[ _global.get_env('IOC_NAME') ]]" | ||
|
||
description: auto-generated by https://github.com/epics-containers/builder2ibek | ||
|
||
entities: | ||
- type: epics.EpicsCaMaxArrayBytes | ||
max_bytes: 6000000 | ||
|
||
- type: epics.StartupCommand | ||
command: callbackSetQueueSize(10000) | ||
# name: ASYN_CALLBACK_SIZE | ||
|
||
- type: devIocStats.iocAdminSoft | ||
IOC: "[[ ioc_name | upper ]]" | ||
- type: ADAravis.aravisCamera | ||
CLASS: {{ .Values.CLASS}} | ||
ID: {{ .Values.ID }} | ||
P: {{ .Values.P }} | ||
PORT: DET.DET | ||
R: ":DET:" | ||
|
||
- type: ADCore.NDROI | ||
ADDR: 0 | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.roi | ||
QUEUE: 250 | ||
R: ":ROI:" | ||
TIMEOUT: 1 | ||
|
||
- type: ADCore.NDStats | ||
ADDR: 0 | ||
HIST_SIZE: 256 | ||
NCHANS: 20000 | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.stat | ||
QUEUE: 250 | ||
R: ":STAT:" | ||
TIMEOUT: 1 | ||
XSIZE: 1936 | ||
YSIZE: 1216 | ||
|
||
- type: ADCore.NDStdArrays | ||
ADDR: 0 | ||
FTVL: UCHAR | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.roi | ||
NELEMENTS: 2354176 | ||
P: {{ .Values.P }} | ||
PORT: DET.arr | ||
QUEUE: 2 | ||
R: ":ARR:" | ||
TIMEOUT: 1 | ||
TYPE: Int8 | ||
|
||
- type: ADCore.NDProcess | ||
ADDR: 0 | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.proc | ||
QUEUE: 250 | ||
R: ":PROC:" | ||
TIMEOUT: 1 | ||
|
||
# - type: ADCore.NDOverlay | ||
# ADDR: 0 | ||
# NDARRAY_ADDR: 0 | ||
# NDARRAY_PORT: DET.proc | ||
# P: {{ .Values.P }} | ||
# PORT: DET.over | ||
# QUEUE: 250 | ||
# R: ":OVER:" | ||
# TIMEOUT: 1 | ||
|
||
- type: ADCore.NDFileTIFF | ||
ADDR: 0 | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.tiff | ||
QUEUE: 250 | ||
R: ":TIFF:" | ||
TIMEOUT: 1 | ||
|
||
- type: ADCore.NDFileHDF5 | ||
ADDR: 0 | ||
NDARRAY_ADDR: 0 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.hdf | ||
QUEUE: 250 | ||
R: ":HDF5:" | ||
TIMEOUT: 1 | ||
|
||
# - type: ADCore.NDCircularBuff | ||
# NDARRAY_PORT: DET.DET | ||
# P: {{ .Values.P }} | ||
# PORT: DET.BUFF | ||
# R: ":BUFF:" | ||
|
||
- type: ADCore.NDPosPlugin | ||
ENABLED: 1 | ||
NDARRAY_PORT: DET.DET | ||
P: {{ .Values.P }} | ||
PORT: DET.POS | ||
QUEUE: 1000 | ||
R: ":POS:" | ||
|
||
- type: ADCore.NDPvaPlugin | ||
ENABLED: 1 | ||
NDARRAY_PORT: DET.DET | ||
PVNAME: {{ .Values.P }}:TX:PVA | ||
PORT: DIFF.PVA | ||
P: {{ .Values.P }} | ||
R: ":PVA:" |
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,10 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-config | ||
labels: | ||
app: {{ .Release.Name }} | ||
# configure an Aravis Camera with the Standard set of Plugins | ||
data: | ||
ioc.yaml: > | ||
{{ tpl (.Files.Get "config/ioc.yaml") . | nindent 4 | replace "[[" "{{" | replace "]]" "}}" }} |
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,22 @@ | ||
# yaml-language-server: $schema=https://github.com/marcelldls/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service | ||
|
||
# This parent chart creates a Diagnostics GigE camera with AD plugins | ||
# The following values may be supplied, the first two are mandatory | ||
|
||
# TODO - this chart could easily also allow for configuring the count of | ||
# each type of plugin you would like. Currently there is a fixed set of plugins. | ||
|
||
# PV Prefix | ||
P: "" | ||
|
||
# Camera ID - identifier, ip address or DNS name | ||
ID: "" | ||
|
||
# The type of camera - leave this value as AutoADGenICam for automatic discovery | ||
CLASS: AutoADGenICam | ||
|
||
# Child chart ioc-instance configures K8S manifisets for this IOC | ||
# NOTE: the values for ioc-instance will be combined with beamline_values.yaml | ||
# when this is being deployed from a beamline repo by ArgoCD | ||
ioc-instance: | ||
image: ghcr.io/epics-containers/ioc-adaravis-runtime:2024.7.1b3 |
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,16 @@ | ||
# A Helm Chart for an IOC instance | ||
apiVersion: v2 | ||
name: ec-service | ||
|
||
version: 1.0.0 | ||
|
||
# TODO - what does argo do with appVersion? | ||
appVersion: 0.0.1b1 | ||
|
||
type: application | ||
|
||
dependencies: | ||
- name: ioc-instance | ||
version: 3.5.1+b1 | ||
repository: "oci://ghcr.io/epics-containers" | ||
# repository: "file:///home/giles/work/ec-helm-charts/Charts/ioc-instance" |
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,3 @@ | ||
# TODO add a liveness check for the IOC | ||
# this will be a python snippet that checks a PV | ||
exit 0 |
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,3 @@ | ||
#!/bin/bash | ||
|
||
pandablocks-ioc softioc {{ .Values.IP }} {{ .Values.prefix }} --clear-bobfiles --screens-dir /epics/opi |
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,2 @@ | ||
# a stop script for K8S to call when closing the container | ||
exit 0 |
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,14 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-config | ||
labels: | ||
app: {{ .Release.Name }} | ||
# configure an Aravis Camera with the Standard set of Plugins | ||
data: | ||
start.sh: > | ||
{{ tpl (.Files.Get "config/start.sh") . | nindent 4 | replace "[[" "{{" | replace "]]" "}}" }} | ||
stop.sh: > | ||
{{ .Files.Get "config/stop.sh"}} | ||
liveness.sh: > | ||
{{ .Files.Get "config/liveness.sh"}} |
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,10 @@ | ||
# yaml-language-server: $schema=https://github.com/marcelldls/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service | ||
|
||
# latest container image for GigE cameras from the GitHub Container Registry | ||
ioc-instance: | ||
image: ghcr.io/pandablocks/pandablocks-ioc:0.7.1 | ||
|
||
# this causes our config folder's start.sh to be mounted over the default | ||
# /epics/ioc/start.sh - thus making the pandaBlocks container image have | ||
# the same entrypoint as ioc-template based images | ||
iocConfig: /epics/ioc |
Oops, something went wrong.