Skip to content

Commit 7b7ff3d

Browse files
authored
Updates to odin-jungfrau helm chart (#26)
* Replace data with data<n>, rename compressed_size to size * Updating odin-jungfrau helm charts with defined ports, sensor sizes, etc * Include affinity, tolerations, nodeSelector in StatefulSet spec * Use the tcp URI scheme prefix with fp.json endpoint * Parameterise the config file path
1 parent 10fc8bb commit 7b7ff3d

File tree

8 files changed

+59
-23
lines changed

8 files changed

+59
-23
lines changed

Charts/odin-jungfrau/config/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
sleep 5
55

66
# Start the IOC
7-
fastcs-odin ioc {{ .Values.pvPrefix }} --ip {{ .Values.detectorName }}-odin-server --port 8888
7+
fastcs-jungfrau ioc {{ .Values.pvPrefix }} --config {{ .Values.configFilePath }} --odin-ip {{ .Values.detectorName }}-odin-server --odin-port 8888

Charts/odin-jungfrau/deployment/fp.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@
126126
"hdf": {
127127
"dataset": {
128128
"data": {
129-
"dims": [{{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}],
130-
"chunks": [1, {{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}]
129+
"dims": [512, 1024],
130+
"chunks": [1, 512, 1024]
131131
}
132132
}
133133
}
134134
},
135135
{
136136
"jungfrau": {
137-
"endpoint": "{{ .Values.endpoint }}:{{ add 8000 .idx }}"
137+
"endpoint": "tcp://{{ .Values.endpoint }}:{{ add 31001 .idx }}"
138138
}
139139
}
140140
]
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#!/bin/bash
22

3-
{{- $endpointFormat := (printf "tcp://%s-odin-data-%%d:%d" .Values.detectorName 10008) }}
3+
{{- $endpoints := list }}
4+
{{- range $i := until (int .Values.odinDataCount) }}
5+
{{- $endpoints = append $endpoints (printf "tcp://%s-odin-data-%d:10008" $.Values.detectorName $i) }}
6+
{{- end }}
47

58
/venv/bin/jungfrau_meta_writer \
69
--writer jungfrau_detector.JungfrauMetaWriter \
7-
--sensor-shape {{ .Values.sensorSizeX }} {{ .Values.sensorSizeY }} \
8-
--data-endpoints {{ include "odin-helm-charts.rangeJoin" (dict "separator" "," "format" $endpointFormat "count" .Values.odinDataCount ) }}
10+
--sensor-shape 512 1024 \
11+
--data-endpoints {{ join "," $endpoints }}

Charts/odin-jungfrau/deployment/odin-server.cfg

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ adapters = fp, mw
77
[tornado]
88
logging = error
99

10+
{{- $endpoints := list }}
11+
{{- range $i := until (int .Values.odinDataCount) }}
12+
{{- $endpoints = append $endpoints (printf "%s-odin-data-%d:10004" $.Values.detectorName $i) }}
13+
{{- end }}
14+
1015
[adapter.fp]
1116
module = odin_data.control.frame_processor_adapter.FrameProcessorAdapter
12-
{{- $endpointFormat := (printf "%s-odin-data-%%d:%d" .Values.detectorName 10004) }}
13-
endpoints = {{ include "odin-helm-charts.rangeJoin" (dict "separator" ", " "format" $endpointFormat "count" .Values.odinDataCount ) }}
17+
endpoints = {{ join ", " $endpoints }}
1418
update_interval = 0.2
1519

1620
[adapter.mw]

Charts/odin-jungfrau/templates/meta-writer.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ spec:
1515
labels:
1616
app: {{ .Values.detectorName }}-meta-writer
1717
spec:
18+
{{- with $.Values.affinity }}
19+
affinity:
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
{{- with $.Values.tolerations }}
23+
tolerations:
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
26+
{{- with $.Values.nodeSelector }}
27+
nodeSelector:
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
1830
volumes:
1931
- name: {{ $.Values.detectorName }}-odin-config-volume
2032
configMap:

Charts/odin-jungfrau/templates/odin-data.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ spec:
1616
labels:
1717
app: {{ $.Values.detectorName }}-odin-data-{{ $idx }}
1818
spec:
19+
{{- with $.Values.affinity }}
20+
affinity:
21+
{{- toYaml . | nindent 8 }}
22+
{{- end }}
23+
{{- with $.Values.tolerations }}
24+
tolerations:
25+
{{- toYaml . | nindent 8 }}
26+
{{- end }}
27+
{{- with $.Values.nodeSelector }}
28+
nodeSelector:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
1931
volumes:
2032
- name: {{ $.Values.detectorName }}-odin-config-volume
2133
configMap:

Charts/odin-jungfrau/templates/odin-server.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ spec:
1515
labels:
1616
app: {{ .Values.detectorName }}-odin-server
1717
spec:
18+
{{- with $.Values.affinity }}
19+
affinity:
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
{{- with $.Values.tolerations }}
23+
tolerations:
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
26+
{{- with $.Values.nodeSelector }}
27+
nodeSelector:
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
1830
volumes:
1931
- name: {{ $.Values.detectorName }}-odin-config-volume
2032
configMap:

Charts/odin-jungfrau/values.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ detectorName: "jungfrau"
2929
# @schema
3030
odinDataCount: 1
3131

32+
# @schema
33+
# title: Config File Path
34+
# description: File path of the Jungfrau config file
35+
# type: string
36+
# @schema
37+
configFilePath: ""
38+
3239
# @schema
3340
# title: Detector IP Address
3441
# description: IP address of the detector
@@ -50,20 +57,6 @@ endpoint: ""
5057
# @schema
5158
sensorSize: ""
5259

53-
# @schema
54-
# title: Sensor Size X
55-
# description: The width of the detector in pixels
56-
# type: integer
57-
# @schema
58-
sensorSizeX:
59-
60-
# @schema
61-
# title: Sensor Size Y
62-
# description: The height of the detector in pixels
63-
# type: integer
64-
# @schema
65-
sensorSizeY:
66-
6760
# @schema
6861
# title: Shared Memory Size
6962
# description: The size of the shared memory (per odin-data node) in bytes

0 commit comments

Comments
 (0)