Skip to content

Commit

Permalink
Add p45-ea-test-01
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelldls committed Oct 10, 2024
1 parent 522e29a commit 014446b
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
11 changes: 11 additions & 0 deletions services/p45-ea-test-01/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# A Helm Chart for an IOC instance
apiVersion: v2
name: ec-service
version: 1.0.0

type: application

dependencies:
- name: ioc-instance
version: 4.0.0
repository: "oci://ghcr.io/epics-containers"
26 changes: 26 additions & 0 deletions services/p45-ea-test-01/config/ioc.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
record(calc, "P45:IBEK:SUM") {
field(DESC, "Sum A and B")
field(CALC, "A+B")
field(INPA, "P45:IBEK:A")
field(INPB, "P45:IBEK:B")
}

record(ao, "P45:IBEK:A") {
field(DESC, "A voltage")
field(PREC, "3")
field(EGU, "Volts")
field(DRVL, "-10")
field(DRVH, "+10")
field(VAL, "0.000")
field(FLNK, "P45:IBEK:SUM")
}

record(ao, "P45:IBEK:B") {
field(DESC, "B voltage")
field(PREC, "3")
field(EGU, "Volts")
field(DRVL, "-10")
field(DRVH, "+10")
field(VAL, "0.000")
field(FLNK, "P45:IBEK:SUM")
}
22 changes: 22 additions & 0 deletions services/p45-ea-test-01/config/ioc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2024.6.1/ibek.ioc.schema.json

ioc_name: "{{ _global.get_env('IOC_NAME') }}"

description: Generic instance for testing generic IOCs

entities:
- type: epics.EpicsEnvSet
name: EPICS_TZ
value: "GMT0BST"

- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"

- type: epics.StartupCommand
command: dbLoadRecords("/epics/ioc/config/ioc.db")

- type: epics.PostStartupCommand
command: |
dbpf P45:IBEK:A "2.54"
dbpf P45:IBEK:B "2.61"
dbgf P45:IBEK:SUM
10 changes: 10 additions & 0 deletions services/p45-ea-test-01/templates/configmap.yaml
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 }}
data:

# contents of the ioc instance config folder
{{ (.Files.Glob "config/*").AsConfig | indent 2 }}
21 changes: 21 additions & 0 deletions services/p45-ea-test-01/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service
ioc-instance:
image: ghcr.io/epics-containers/ioc-template-example-runtime:3.5.1

# NOTE: the following are suggestions to help with debugging IOCs
# 1. replace the runtime container with the developer version
# this adds tools and compilers to the container so you
# can experiment in the cluster to fix the issue
#
# image: ghcr.io/epics-containers/ioc-template-example-developer:3.5.1

# 2. override the entry point to be a sleep infinity
# this means you can now use 'ec exec' to get a shell
# in the container and run /epics/ioc/start.sh.
# If it fails you can see the error and the pod
# will not terminate. In combination with 1. above you
# can experiment with changes until the issue
# is fixed.
#
# startCommand: sleep
# startArgs: infinity

0 comments on commit 014446b

Please sign in to comment.