Skip to content

Commit

Permalink
update andor2 debug.yaml - now working
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 18, 2024
1 parent 906ef54 commit 47056c9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 23 deletions.
2 changes: 1 addition & 1 deletion 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.1.2+b1
version: 4.1.2
repository: "oci://ghcr.io/epics-containers"
21 changes: 13 additions & 8 deletions services/bl99p-ea-ioc-01/debug.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: debug-andor2
name: debug-andor3
labels:
is_ioc: "true"
spec:
serviceAccountName: default-full-access-mounted
containers:
- name: debug-andor2
image: gcr.io/diamond-privreg/controls/prod/iocs/ioc-adandor-linux-developer:2024.10.2
- name: debug-andor3
image: ghcr.io/epics-containers/ioc-adandor3-developer:2024.10.2b4
command:
- bash
args:
Expand All @@ -20,24 +20,29 @@ spec:
limits:
memory: "2Gi"
cpu: "1"
diamond.ac.uk/andor2usb: 1
diamond.ac.uk/andor3pci: 1
requests:
memory: "1Gi"
cpu: "500m"
diamond.ac.uk/andor2usb: 1
diamond.ac.uk/andor3pci: 1

# securityContext:
# privileged: true
# allowPrivilegeEscalation: true
securityContext:
privileged: true
allowPrivilegeEscalation: true

volumeMounts:
- mountPath: /dev/bus/usb/
name: devices
- mountPath: /data
name: sdklibs

volumes:
- name: devices
persistentVolumeClaim:
claimName: dev-usb
- name: sdklibs
persistentVolumeClaim:
claimName: p99-ea-ioc-01-libraries

affinity:
nodeAffinity:
Expand Down
49 changes: 44 additions & 5 deletions services/bl99p-ea-ioc-05/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ metadata:
labels:
is_ioc: "true"
spec:
# NOTE: for best debug experience, set hostNetwork to false
# OR: to be able to see the PVs outside the cluster set to true
hostNetwork: true
runtimeClassName: usb-compat
serviceAccountName: default-full-access-mounted
containers:
- name: debug-andor2
image: gcr.io/diamond-privreg/controls/prod/iocs/ioc-adandor-linux-developer:2024.10.2
command:
- bash
args:
# use this value to automatically start the IOC
# - "/epics/ioc/start.sh"
# use this value to keep the container running indefinetely for debugging
- "-c"
- |
echo "keep running indefinetely"
Expand All @@ -31,13 +38,19 @@ spec:
# allowPrivilegeEscalation: true

volumeMounts:
- mountPath: /dev/bus/usb/
name: devices
# - mountPath: /dev/bus/usb/
# name: devices
- mountPath: /epics/ioc/config
name: config-volume

volumes:
- name: devices
persistentVolumeClaim:
claimName: dev-usb
# - name: devices
# persistentVolumeClaim:
# claimName: dev-usb
- configMap:
defaultMode: 420
name: bl99p-ea-ioc-05-config
name: config-volume

affinity:
nodeAffinity:
Expand All @@ -48,3 +61,29 @@ spec:
operator: In
values:
- bl99p-ea-serv-01.diamond.ac.uk
# Embed the ioc.yaml as a config map -------------------------------------------
# NOTE: update this text by running the following command and extracting the
# ConfigMap section:
# helm template bl99p-ea-ioc-05 services/bl99p-ea-ioc-05/ --values=services/values.yaml [7:45:31]
---
# Source: ec-service/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: bl99p-ea-ioc-05-config
labels:
app: bl99p-ea-ioc-05
data:
# contents of the ioc instance config folder
ioc.yaml: "# yaml-language-server: $schema=/epics/ibek-defs/adandor.ibek.support.yaml\n\n#
TODO replace above with the generic IOC schema this IOC is based on\nioc_name: \"{{
_global.get_env('IOC_NAME') }}\"\n\ndescription: REPLACE WITH DESCRIPTION\n\nentities:\n
\ - type: epics.EpicsEnvSet\n name: EPICS_TZ\n value: GMT0BST\n\n - type:
devIocStats.iocAdminSoft\n IOC: \"{{ ioc_name | upper }}\"\n\n\n - type: epics.EpicsEnvSet\n
\ name: EPICS_TS_MIN_WEST\n value: '0'\n \n - type: epics.EpicsCaMaxArrayBytes\n
\ max_bytes: 9000000\n\n - type: ADAndor.andorCCD\n ADDR: 0\n BUFFERS:
2000\n INSTALLPATH: |-\n /epics/support/andorCCDSDK/andorCCDSDKApp/src/sdk/andor/etc/\n
\ P: BL99P-EA-DET-03\n PORT: DET3.cam\n R: ':CAM:'\n TIMEOUT: 1\n\n -
type: ADCore.NDPosPlugin\n ADDR: 0\n BLOCK: 0\n ENABLED: 1\n NDARRAY_PORT:
DET3.cam\n P: BL99P-EA-DET-03\n PORT: DET3.pos\n QUEUE: 1000\n R: ':POS:'\n
\ TIMEOUT: 1"
10 changes: 1 addition & 9 deletions services/bl99p-ea-ioc-05/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,12 @@ ioc-instance:
limits:
cpu: 2
memory: 512Mi
diamond.ac.uk/andor2usb: 1
requests:
cpu: 500m
memory: 128Mi
diamond.ac.uk/andor2usb: 1

volumes:
- name: usb-devices
persistentVolumeClaim:
claimName: dev-usb

volumeMounts:
- mountPath: /dev/bus/usb/
name: usb-devices

# 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
Expand Down

0 comments on commit 47056c9

Please sign in to comment.