Skip to content

Commit 10fc8bb

Browse files
JamesOHeaDLSshihab-dlsGDYendell
authored
Stream2 - remove frameReceiver references, add endpoint, change some dataset names (#23)
* odin-eiger: Add delay to odin-server start Allow odin processes time to start before querying * odin-eiger: Add lower terminationGracePeriodSeconds for quicker rollout * odin-eiger: Fix meta writer sensor size X Y order * Remove frameReceiver references * Add endpoints config to fp.json * Replace data with data<n>, rename compressed_size to size * fix: amend dataset name * Remove receiver resources * More updates Move dev-shm allocation to fan Fix eiger endpoints Nicer endpoint formatting Use fastcs-eiger with fastcs-odin * Fix fp fan endpoint * Fix fan service ports --------- Co-authored-by: Shihab Suliman <shihab.suliman@diamond.ac.uk> Co-authored-by: Gary Yendell <gary.yendell@diamond.ac.uk>
1 parent a2d690b commit 10fc8bb

File tree

10 files changed

+40
-95
lines changed

10 files changed

+40
-95
lines changed

Charts/odin-eiger/deployment/fp.json

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
[
22
{
3-
"fr_setup": {
4-
"fr_ready_cnxn": "tcp://127.0.0.1:10001",
5-
"fr_release_cnxn": "tcp://127.0.0.1:10002"
6-
},
73
"meta_endpoint": "tcp://*:10008"
84
},
95
{
@@ -42,14 +38,6 @@
4238
}
4339
}
4440
},
45-
{
46-
"plugin": {
47-
"connect": {
48-
"index": "eiger",
49-
"connection": "frame_receiver"
50-
}
51-
}
52-
},
5341
{
5442
"plugin": {
5543
"connect": {
@@ -77,7 +65,7 @@
7765
{
7866
"hdf": {
7967
"dataset": {
80-
"compressed_size": {
68+
"size": {
8169
"datatype": "uint32",
8270
"chunks": [1000]
8371
}
@@ -133,6 +121,12 @@
133121
"dataset": {
134122
"data": {
135123
"indexes": true
124+
},
125+
"data2": {
126+
"indexes": true
127+
},
128+
"data3": {
129+
"indexes": true
136130
}
137131
}
138132
}
@@ -143,8 +137,21 @@
143137
"data": {
144138
"dims": [{{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}],
145139
"chunks": [1, {{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}]
140+
},
141+
"data2": {
142+
"dims": [{{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}],
143+
"chunks": [1, {{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}]
144+
},
145+
"data3": {
146+
"dims": [{{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}],
147+
"chunks": [1, {{ .Values.sensorSizeY }}, {{ .Values.sensorSizeX }}]
146148
}
147149
}
148150
}
151+
},
152+
{
153+
"eiger": {
154+
"endpoint": "tcp://{{ .Values.detectorName }}-eiger-fan:{{ add 31600 .idx | add1 }}"
155+
}
149156
}
150157
]

Charts/odin-eiger/deployment/fr.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

Charts/odin-eiger/deployment/fr.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 5 additions & 2 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/eiger_meta_writer \
69
--writer eiger_detector.EigerMetaWriter \
710
--sensor-shape {{ .Values.sensorSizeY }} {{ .Values.sensorSizeX }} \
8-
--data-endpoints {{ include "odin-helm-charts.rangeJoin" (dict "separator" "," "format" $endpointFormat "count" .Values.odinDataCount ) }}
11+
--data-endpoints {{ join "," $endpoints }}

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
debug_mode = 0
33
http_port = 8888
44
http_addr = 0.0.0.0
5-
adapters = fp, fr, mw, ef
5+
adapters = fp, mw, ef
66

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 ) }}
14-
update_interval = 0.2
15-
16-
[adapter.fr]
17-
module = odin_data.control.frame_receiver_adapter.FrameReceiverAdapter
18-
{{- $endpointFormat := (printf "%s-odin-data-%%d:%d" .Values.detectorName 10000) }}
19-
endpoints = {{ include "odin-helm-charts.rangeJoin" (dict "separator" ", " "format" $endpointFormat "count" .Values.odinDataCount ) }}
17+
endpoints = {{ join ", " $endpoints }}
2018
update_interval = 0.2
2119

2220
[adapter.mw]

Charts/odin-eiger/ioc-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-
stdio-expose --ptty --stdin --ctrl-d 'fastcs-odin ioc {{ .Values.pvPrefix }} --ip {{ .Values.detectorName }}-odin-server --port 8888'
7+
stdio-expose --ptty --stdin --ctrl-d 'fastcs-eiger ioc {{ .Values.pvPrefix }} --ip {{ .Values.detectorIp }} --port 80 --odin-ip {{ .Values.detectorName }}-odin-server --odin-port 8888'

Charts/odin-eiger/templates/eiger-fan.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ spec:
3232
configMap:
3333
name: {{ $.Values.detectorName }}-odin-config
3434
defaultMode: 0755
35+
- name: dev-shm
36+
emptyDir:
37+
medium: Memory
38+
sizeLimit: {{ $.Values.devShmSize }}
3539
containers:
3640
- name: {{ .Values.detectorName }}-eiger-fan
3741
image: {{ .Values.image }}
@@ -42,6 +46,8 @@ spec:
4246
volumeMounts:
4347
- name: {{ $.Values.detectorName }}-odin-config-volume
4448
mountPath: /odin/deployment
49+
- name: dev-shm
50+
mountPath: /dev/shm
4551
{{- with $.Values.eigerFanResources }}
4652
resources:
4753
{{- toYaml . | nindent 12 }}
@@ -66,5 +72,5 @@ spec:
6672
{{- range $idx, $e := until (int $.Values.odinDataCount) }}
6773
- name: {{ $.Values.detectorName }}-eiger-fan-data-{{ $idx }}
6874
protocol: TCP
69-
port: 3160{{ $idx }}
75+
port: 3160{{ $idx | add1 }}
7076
{{- end }}

Charts/odin-eiger/templates/odin-configmap.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,4 @@ data:
2121
{{- tpl ($.Files.Get "deployment/fp.sh") $ctx | nindent 4 }}
2222
fp{{ $idx | add1 }}.json: |
2323
{{- tpl ($.Files.Get "deployment/fp.json") $ctx | nindent 4 }}
24-
fr{{ $idx | add1 }}.sh: |
25-
{{- tpl ($.Files.Get "deployment/fr.sh") $ctx | nindent 4 }}
26-
fr{{ $idx | add1 }}.json: |
27-
{{- tpl ($.Files.Get "deployment/fr.json") $ctx | nindent 4 }}
2824
{{- end }}

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,13 @@ spec:
3333
configMap:
3434
name: {{ $.Values.detectorName }}-odin-config
3535
defaultMode: 0755
36-
- name: dev-shm
37-
emptyDir:
38-
medium: Memory
39-
sizeLimit: {{ $.Values.devShmSize }}
4036
{{- with $.Values.dataVolume }}
4137
- name: {{ $.Values.detectorName }}-data
4238
hostPath:
4339
path: {{ .hostPath }}
4440
type: Directory
4541
{{- end }}
4642
containers:
47-
- name: frame-receiver
48-
image: {{ $.Values.image }}
49-
command:
50-
- /odin/deployment/fr{{ $idx | add1 }}.sh
51-
ports:
52-
- containerPort: 10000
53-
volumeMounts:
54-
- name: {{ $.Values.detectorName }}-odin-config-volume
55-
mountPath: /odin/deployment
56-
- name: dev-shm
57-
mountPath: /dev/shm
58-
{{- with $.Values.frameReceiverResources }}
59-
resources:
60-
{{- toYaml . | nindent 12 }}
61-
{{- end }}
62-
{{- with $.Values.securityContext }}
63-
securityContext:
64-
{{- toYaml . | nindent 12 }}
65-
{{- end }}
6643
- name: frame-processor
6744
image: {{ $.Values.image }}
6845
command:
@@ -73,8 +50,6 @@ spec:
7350
volumeMounts:
7451
- name: {{ $.Values.detectorName }}-odin-config-volume
7552
mountPath: /odin/deployment
76-
- name: dev-shm
77-
mountPath: /dev/shm
7853
{{- with $.Values.dataVolume }}
7954
- name: {{ $.Values.detectorName }}-data
8055
mountPath: {{ .hostPath }}
@@ -98,9 +73,6 @@ spec:
9873
selector:
9974
app: {{ $.Values.detectorName }}-odin-data-{{ $idx }}
10075
ports:
101-
- name: {{ $.Values.detectorName }}-fr-{{ $idx }}-ctrl
102-
protocol: TCP
103-
port: 10000
10476
- name: {{ $.Values.detectorName }}-fp-{{ $idx }}-ctrl
10577
protocol: TCP
10678
port: 10004

Charts/odin-eiger/values.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ odinServerResources:
7272
cpu: 1000m
7373
memory: 256Mi
7474

75-
frameReceiverResources:
76-
limits:
77-
cpu: 1000m
78-
memory: 10Gi
79-
requests:
80-
cpu: 1000m
81-
memory: 10Gi
82-
8375
frameProcessorResources:
8476
limits:
8577
cpu: 1000m

0 commit comments

Comments
 (0)