Skip to content

Commit

Permalink
Merge pull request #1 from epics-containers/separate-sdk
Browse files Browse the repository at this point in the history
Separate sdk
  • Loading branch information
gilesknap authored Oct 11, 2024
2 parents aefa132 + 488539c commit 1e35b63
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 14 deletions.
4 changes: 2 additions & 2 deletions environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export EC_CLI_BACKEND="K8S"
# the namespace to use for kubernetes deployments
export EC_TARGET=p99-beamline
# the git repo for this project
export EC_SERVICES_REPO=https://github.com/MaxHerbs/p99-services
export EC_SERVICES_REPO=https://github.com/epics-containers/p99-services
# declare your centralised log server Web UI
export EC_LOG_URL="https://graylog2.diamond.ac.uk/search?rangetype=relative&fields=message%2Csource&width=1489&highlightMessage=&relative=172800&q=pod_name%3A{service_name}*"

Expand All @@ -41,7 +41,7 @@ source <(ec --show-completion ${SHELL})
module unload k8s-p99 > /dev/null
module load k8s-p99 > /dev/null
# set the default namespace for kubectl and helm (for convenience only)
kubectl config set-context --current --namespace=k8s-p99
kubectl config set-context --current --namespace=p99-beamline
# make sure the user has provided credentials
kubectl version

Expand Down
4 changes: 2 additions & 2 deletions services/bl99p-ea-ioc-01/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ type: application

dependencies:
- name: ioc-instance
version: 4.0.0
repository: "oci://ghcr.io/epics-containers"
version: 4.1.2+b1
repository: "oci://ghcr.io/epics-containers"
14 changes: 6 additions & 8 deletions services/bl99p-ea-ioc-01/config/ioc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ ioc_name: "{{ _global.get_env('IOC_NAME') }}"
description: REPLACE WITH DESCRIPTION

entities:

- type: epics.EpicsEnvSet
name: EPICS_TS_MIN_WEST
value: '0'
value: "0"

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

- type: epics.EpicsCaMaxArrayBytes
max_bytes: 9000000
Expand All @@ -22,15 +21,14 @@ entities:
BUFFERS: 50000
P: BL99P-EA-DET-01
PORT: ZYLA.CAM
R: ':CAM:'
R: ":CAM:"
SCANRATE: .1 second
SET_SDK_ENV: 'True'
SET_SDK_ENV: "True"
TIMEOUT: 1
ANDOR_SDK3: -|
SDK PATH HERE
ANDOR_SDK3: /data

- type: ADCore.NDPosPlugin
NDARRAY_PORT: ZYLA.CAM
P: BL99P-EA-DET-01
PORT: POS
R: ':POS:'
R: ":POS:"
44 changes: 44 additions & 0 deletions services/bl99p-ea-ioc-01/library_pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# this PVC is used to hold the proprietary libraries from the Andor3SDK
# that are loaded at runtime by the IOC

# for the moment we manually deploy this with kubectl but will make it
# part of the ioc deployment workflow in the future (with an init container
# or maybe host script to load the libraries from a specified location)

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: p99-ea-ioc-01-libraries
labels:
app: bl99p-ea-ioc-01
ioc_group: p99
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
kind: Pod
apiVersion: v1
metadata:
name: p99-ea-ioc-01-libraries-loader
labels:
app: bl99p-ea-ioc-01
ioc_group: p99
spec:
containers:
- name: myapp
image: busybox
resources:
limits:
memory: "128Mi"
cpu: "500m"
volumeMounts:
- name: mypvc
mountPath: /data
command: ["sleep", "infinity"]
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: p99-ea-ioc-01-libraries
25 changes: 23 additions & 2 deletions services/bl99p-ea-ioc-01/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# 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: REPLACE_WITH_IMAGE_URI
image: ghcr.io/epics-containers/ioc-adandor3-runtime:2024.10.1

# mount a pvc with the andor3 sdk libraries
pvClaims:
- name: sdklibs
claimName: p99-ea-ioc-01-libraries
mountPath: /data
subPath: .

dataVolume:
pvc: false
hostPath: /dls/p99/data

resources:
limits:
cpu: 2
memory: 512Mi
diamond.ac.uk/andor3pci: 1
requests:
cpu: 500m
memory: 128Mi
diamond.ac.uk/andor3pci: 1

# NOTE: the following are suggestions to help with debugging IOCs
# 1. replace the runtime container with the developer version
Expand All @@ -18,4 +39,4 @@ ioc-instance:
# is fixed.
#
# startCommand: sleep
# startArgs: infinity
# startArgs: infinity

0 comments on commit 1e35b63

Please sign in to comment.