Skip to content

Commit abbf938

Browse files
author
Michal Tichák
committed
[operator] fixed examples with arguments and configMap
1 parent 3c6c239 commit abbf938

File tree

3 files changed

+235
-4
lines changed

3 files changed

+235
-4
lines changed

control-operator/ecs-manifests/kubernetes-manifests/readout-test.yaml

Lines changed: 106 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ kind: Task
33
metadata:
44
name: readout
55
spec:
6+
arguments:
7+
chans.readout.0.address: ipc://@o2ipc-d7ef3du8ndmd7n8j7l2g
8+
chans.readout.0.autoBind: "0"
9+
chans.readout.0.method: bind
10+
chans.readout.0.rateLogging: "0"
11+
chans.readout.0.rcvBufSize: "1000"
12+
chans.readout.0.rcvKernelSize: "0"
13+
chans.readout.0.sndBufSize: "1000"
14+
chans.readout.0.sndKernelSize: "0"
15+
chans.readout.0.transport: shmem
16+
chans.readout.0.type: push
17+
chans.readout.numSockets: "1"
18+
environment_id: 323ikoYJ88i
19+
orbit-reset-time: ""
620
pod:
721
hostNetwork: true
822
hostIPC: true
@@ -13,8 +27,7 @@ spec:
1327
- name: readout
1428
image: gitlab-registry.cern.ch/aliceo2group/dockerfiles/alma9-flp-node:2
1529
command: ["/opt/o2/bin/o2-readout-exe"]
16-
# setup proper uri for your test case change this part
17-
args: ["consul-ini://localhost:8500/o2/components/readout/ANY/any/readout-stfb-mtichak-ost"]
30+
args: ["/etc/readout/readout-cfg.ini"]
1831
securityContext:
1932
privileged: true
2033
runAsUser: 1100
@@ -23,7 +36,7 @@ spec:
2336
- name: O2_DETECTOR
2437
value: "TST"
2538
- name: O2_PARTITION
26-
value: "xxxxxxxx"
39+
value: "323ikoYJ88i"
2740
- name: OCC_CONTROL_PORT
2841
value: "31000"
2942
- name: O2_SYSTEM
@@ -42,6 +55,9 @@ spec:
4255
mountPath: /tmp
4356
- name: modules
4457
mountPath: /lib/modules
58+
- name: readout-config
59+
mountPath: /etc/readout
60+
readOnly: true
4561
imagePullPolicy: IfNotPresent
4662
volumes:
4763
- name: group
@@ -56,6 +72,9 @@ spec:
5672
- name: modules
5773
hostPath:
5874
path: /lib/modules
75+
- name: readout-config
76+
configMap:
77+
name: readout-config
5978
imagePullSecrets:
6079
- name: gitlab-registry-secret
6180
control:
@@ -74,3 +93,87 @@ spec:
7493
var1: value1
7594
var2: value2
7695
state: standby
96+
97+
---
98+
apiVersion: v1
99+
kind: ConfigMap
100+
metadata:
101+
name: readout-config
102+
data:
103+
readout-cfg.ini: |
104+
# Example configuration file for o2-readout-exe
105+
# Standalone operation, with emulated input, and output to Data Distribution
106+
# to run readout-stbf out of the box with data emulator
107+
108+
[readout]
109+
aggregatorSliceTimeout=0.5
110+
aggregatorStfTimeout=1
111+
112+
# dummy data source
113+
[equipment-emulator-1]
114+
enabled=1
115+
equipmentType=cruEmulator
116+
memoryPoolNumberOfPages=1000
117+
memoryPoolPageSize=1M
118+
numberOfLinks=1
119+
PayloadSize=8000
120+
rdhUseFirstInPageEnabled=1
121+
#systemId=19
122+
#feeId=0
123+
#cruId=0
124+
#dpwId=0
125+
id=1
126+
127+
# define a (disabled) CRU equipment for CRU end point #0
128+
[equipment-rorc-1]
129+
enabled=0
130+
equipmentType=rorc
131+
cardId=#0
132+
dataSource=Ddg
133+
memoryPoolNumberOfPages=1800
134+
memoryPoolPageSize=1M
135+
rdhUseFirstInPageEnabled=1
136+
137+
138+
# monitor counters
139+
[consumer-stats]
140+
consumerType=stats
141+
monitoringEnabled=1
142+
monitoringUpdatePeriod=5
143+
processMonitoringInterval=15
144+
monitoringURI=influxdb-unix:///tmp/telegraf.sock
145+
146+
147+
# record data to file (disabled)
148+
[consumer-rec]
149+
enabled=0
150+
consumerType=fileRecorder
151+
fileName=/tmp/data.raw
152+
153+
154+
# allow data sampling to take data
155+
[consumer-data-sampling]
156+
enabled=0
157+
consumerType=DataSampling
158+
159+
160+
# send data to stfb
161+
[consumer-StfBuilder]
162+
enabled = 1
163+
consumerType = FairMQChannel
164+
sessionName = default
165+
fmq-transport = shmem
166+
fmq-name = readout
167+
fmq-type = push
168+
fmq-address = ipc:///tmp/flp-readout-pipe-0
169+
unmanagedMemorySize = 2G
170+
memoryPoolNumberOfPages = 200
171+
memoryPoolPageSize = 1M
172+
disableSending=0
173+
174+
175+
# matching config for the test receiver
176+
[receiver-fmq]
177+
decodingMode=stfHbf
178+
channelAddress=ipc:///tmp/flp-readout-pipe-0
179+
channelType=pull
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
apiVersion: aliecs.alice.cern/v1alpha1
2+
kind: Task
3+
metadata:
4+
name: stfbuilder-senderoutput
5+
spec:
6+
arguments:
7+
chans.buildertosender.0.address: ipc://@o2ipc-d7ef3du8ndmd7n8j7l30
8+
chans.buildertosender.0.autoBind: "0"
9+
chans.buildertosender.0.method: bind
10+
chans.buildertosender.0.rateLogging: "0"
11+
chans.buildertosender.0.rcvBufSize: "1000"
12+
chans.buildertosender.0.rcvKernelSize: "0"
13+
chans.buildertosender.0.sndBufSize: "4"
14+
chans.buildertosender.0.sndKernelSize: "0"
15+
chans.buildertosender.0.transport: shmem
16+
chans.buildertosender.0.type: push
17+
chans.buildertosender.numSockets: "1"
18+
chans.readout.0.address: ipc://@o2ipc-d7ef3du8ndmd7n8j7l2g
19+
chans.readout.0.method: connect
20+
chans.readout.0.rateLogging: "0"
21+
chans.readout.0.rcvBufSize: "1000"
22+
chans.readout.0.rcvKernelSize: "0"
23+
chans.readout.0.sndBufSize: "1000"
24+
chans.readout.0.sndKernelSize: "0"
25+
chans.readout.0.transport: shmem
26+
chans.readout.0.type: pull
27+
chans.readout.numSockets: "1"
28+
environment_id: 323ikoYJ88i
29+
orbit-reset-time: ""
30+
pod:
31+
hostNetwork: true
32+
hostIPC: true
33+
securityContext:
34+
fsGroup: 1100
35+
supplementalGroups: [10, 1105]
36+
containers:
37+
- name: stfbuilder-senderoutput
38+
image: gitlab-registry.cern.ch/aliceo2group/dockerfiles/alma9-flp-node/dd:1
39+
command: ["/bin/bash"]
40+
args:
41+
- "-lc"
42+
- "/opt/o2/bin/StfBuilder --session=default --transport=shmem --shm-segment-id=2 --shm-segment-size=33554432 --monitoring-backend='influxdb-unix:///tmp/telegraf.sock' --monitoring-process-interva ││ l='5' --discovery-partition=323ikoYJ88i --discovery-endpoint=no-op:// --detector-rdh=6 --detector-subspec=feeid --severity=info --severity-infologger=info --output-channel-name=buildertosender --shm-m ││ onitor=false --detector=TST --run-type=physics --id 323ikp9sptz -S $CONTROL_OCCPLUGIN_ROOT/lib/ -P OCClite --color false --control-port 31001"
43+
securityContext:
44+
privileged: true
45+
runAsUser: 1100
46+
runAsGroup: 1100
47+
capabilities:
48+
add: ["IPC_LOCK"]
49+
env:
50+
- name: O2_DETECTOR
51+
value: "TST"
52+
- name: O2_PARTITION
53+
value: "323ikoYJ88i"
54+
- name: OCC_CONTROL_PORT
55+
value: "31001"
56+
- name: O2_SYSTEM
57+
value: "FLP"
58+
- name: O2_ROLE
59+
value: "mtichak-ost"
60+
- name: O2_INFOLOGGER_MODE
61+
value: "infoLoggerD"
62+
- name: DATADIST_FEE_MASK
63+
value: "0xffff"
64+
- name: CONTROL_OCCPLUGIN_ROOT
65+
value: "/opt/o2"
66+
volumeMounts:
67+
- name: host-shm
68+
mountPath: /dev/shm
69+
- name: group
70+
mountPath: /etc/group
71+
readOnly: true
72+
- name: passwd
73+
mountPath: /etc/passwd
74+
readOnly: true
75+
- name: tmp
76+
mountPath: /tmp
77+
- name: modules
78+
mountPath: /lib/modules
79+
imagePullPolicy: IfNotPresent
80+
volumes:
81+
- name: host-shm
82+
hostPath:
83+
path: /dev/shm
84+
type: Directory
85+
- name: group
86+
hostPath:
87+
path: /etc/group
88+
- name: passwd
89+
hostPath:
90+
path: /etc/passwd
91+
- name: tmp
92+
hostPath:
93+
path: /tmp
94+
- name: modules
95+
hostPath:
96+
path: /lib/modules
97+
imagePullSecrets:
98+
- name: gitlab-registry-secret
99+
control:
100+
mode: "fairmq"
101+
port: 31001
102+
bind:
103+
- name: readout
104+
type: push
105+
rateLogging: "0"
106+
addressing: ipc
107+
transport: shmem
108+
global: ""
109+
target: ""
110+
connect:
111+
properties:
112+
var1: value1
113+
var2: value2
114+
state: standby

control-operator/ecs-manifests/kubernetes-manifests/stfsender-test.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ kind: Task
33
metadata:
44
name: stfsender
55
spec:
6+
arguments:
7+
chans.buildertosender.0.address: ipc://@o2ipc-d7ef3du8ndmd7n8j7l30
8+
chans.buildertosender.0.method: connect
9+
chans.buildertosender.0.rateLogging: "0"
10+
chans.buildertosender.0.rcvBufSize: "1000"
11+
chans.buildertosender.0.rcvKernelSize: "0"
12+
chans.buildertosender.0.sndBufSize: "1000"
13+
chans.buildertosender.0.sndKernelSize: "0"
14+
chans.buildertosender.0.transport: shmem
15+
chans.buildertosender.0.type: pull
16+
chans.buildertosender.numSockets: "1"
17+
environment_id: 323ikoYJ88i
18+
orbit-reset-time: ""
19+
620
pod:
721
hostNetwork: true
822
hostIPC: true
@@ -16,7 +30,7 @@ spec:
1630
args:
1731
- "-c"
1832
# you might need to change mtichak from args to your usecase change this part
19-
- "numactl --cpunodebind=0 --preferred=0 -- /opt/o2/bin/StfSender --session=default --shm-segment-id=2 --shm-segment-size=33554432 --dd-region-size=4096 --dd-region-id=3536 --transport=shmem --input-channel-name=buildertosender --severity=info --severity-infologger=info --monitoring-backend='influxdb-unix:///tmp/telegraf.sock' --monitoring-process-interval='5' --discovery-partition=31RUSxZ7k1x --discovery-id=stfs-mtichak-ost-31RUSxf3h9L --discovery-endpoint=no-op:// --discovery-net-if=ib0 --stand-alone --shm-monitor=false --id 31RUSy3JBLN -S $CONTROL_OCCPLUGIN_ROOT/lib/ -P OCClite --color false --control-port 31002"
33+
- "numactl --cpunodebind=0 --preferred=0 -- /opt/o2/bin/StfSender --session=default --shm-segment-id=2 --shm-segment-size=33554432 --dd-region-size=4096 --dd-region-id=3536 --transport=shmem --input-channel-name=buildertosender --severity=info --severity-infologger=info --monitoring-backend='influxdb-unix:///tmp/telegraf.sock' --monitoring-process-interval='5' --discovery-partition=323ikoYJ88i --discovery-id=stfs-mtichak-ost-323ikoig378 --discovery-endpoint=no-op:// --discovery-net-if=ib0 --stand-alone --shm-monitor=false --id 323ikp9tANv -S $CONTROL_OCCPLUGIN_ROOT/lib/ -P OCClite --color false --control-port 31002"
2034
securityContext:
2135
privileged: true
2236
runAsUser: 1100

0 commit comments

Comments
 (0)