Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tasks/fairmq-shmmonitor-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: fairmq-shmmonitor-k8s
defaults:
log_task_stdout: none
log_task_stderr: none
user: flp
log: none
session_id: default
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load FairMQ &&
fairmq-shmmonitor
_plain_cmdline: "source /etc/profile.d/o2.sh && fairmq-shmmonitor"
control:
mode: basic
wants:
cpu: 0.01
memory: 3
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
user: "{{ user }}"
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
arguments:
- "-c"
- "-s"
- "{{ session_id }}"
26 changes: 26 additions & 0 deletions tasks/o2-roc-cleanup-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: o2-roc-cleanup-k8s
defaults:
log_task_stdout: none
log_task_stderr: none
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load ReadoutCard &&
yes | o2-roc-cleanup
_plain_cmdline: yes | {{ o2_install_path }}/bin/o2-roc-cleanup
control:
mode: basic
wants:
cpu: 0.01
memory: 3
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
env:
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
user: root # o2-roc-cleanup must always run as root!
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
arguments:
- "--light"

# date > /etc/o2.d/last-roc-cleanup
29 changes: 29 additions & 0 deletions tasks/o2-roc-ctp-emulator-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: o2-roc-ctp-emulator-k8s
defaults:
user: flp
roc_id: "#0"
roc_trigger_mode: "continuous"
log_task_stdout: none
log_task_stderr: none
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load ReadoutCard` &&
o2-roc-ctp-emulator
_plain_cmdline: "{{ o2_install_path }}/bin/o2-roc-ctp-emulator"
control:
mode: basic
wants:
cpu: 0.01
memory: 3
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
env:
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
user: "{{ user }}"
arguments:
- "--id={{roc_id}}"
- "--trigger-mode"
- "{{roc_trigger_mode}}"
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
33 changes: 33 additions & 0 deletions tasks/readout-ctp-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: readout-ctp-k8s # read by workflow
defaults:
readout_cfg_uri: "consul-ini://{{ consul_endpoint }}/o2/components/readout/ANY/any/readout-standalone-{{ task_hostname }}"
user: flp
log_task_stdout: none
log_task_stderr: none
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load Readout Control-OCCPlugin &&
o2-readout-exe
_plain_cmdline: "{{ o2_install_path }}/bin/o2-readout-exe"
control:
mode: direct
wants:
cpu: 0.15
memory: 60000
bind:
- name: readout
type: push
rateLogging: "{{ fmq_rate_logging }}"
addressing: ipc
transport: shmem
properties: {}
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
env:
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
user: "{{ user }}"
arguments:
- "{{ readout_cfg_uri }}"
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
33 changes: 33 additions & 0 deletions tasks/readout-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: readout-k8s # read by workflow
defaults:
readout_cfg_uri: "consul-ini://{{ consul_endpoint }}/o2/components/readout/ANY/any/readout-standalone-{{ task_hostname }}"
user: flp
log_task_stdout: none
log_task_stderr: none
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load Readout Control-OCCPlugin &&
o2-readout-exe
_plain_cmdline: "{{ o2_install_path }}/bin/o2-readout-exe"
control:
mode: kubernetes_direct
wants:
cpu: 0.15
memory: 128
bind:
- name: readout
type: push
rateLogging: "{{ fmq_rate_logging }}"
addressing: ipc
transport: shmem
properties: {}
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
env:
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
user: "{{ user }}"
arguments:
- "{{ readout_cfg_uri }}"
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
100 changes: 100 additions & 0 deletions tasks/roc-config-args-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: roc-config-args-k8s
control:
mode: basic
wants:
cpu: 0.2
memory: 256
defaults:
rocConfigLinks: "0"
rocConfigAllowRejection: "false"
rocConfigClock: "LOCAL"
rocConfigCruId: "0x0"
rocConfigCrocId: "0x0"
rocConfigDatapathMode: "PACKET"
rocConfigDownstreamData: "CTP"
rocConfigGbtMode: "GBT"
rocConfigGbtMux: "TTC"
rocConfigLoopback: "false"
rocConfigPonUpstream: "false"
rocConfigDynOffset: "false"
rocConfigOnuAddress: "0"
rocConfigForceConfig: "false"
rocConfigBypassFwCheck: "false"
rocConfigTriggerWindowSize: "1000"
rocConfigNoGBT: "false"
rocConfigUserLogic: "false"
rocConfigRunStats: "false"
rocConfigUserAndCommonLogic: "false"
rocConfigNoTfDetection: "false"
rocConfigTfLength: "256"
rocConfigSystemId: "0x0"
rocConfigFEEId: "0x0"
log_task_stdout: none
log_task_stderr: none
detector: TST
_module_cmdline: >-
source /etc/profile.d/modules.sh &&
MODULEPATH={{ modulepath }} module load ReadoutCard &&
for endpoint in {{ card_endpoints }};do
args=(--links {{ rocConfigLinks }}
{{ rocConfigAllowRejection == 'true' ? '--allow-rejection' : '' }}
--clock {{ rocConfigClock }}
--cru-id {{ rocConfigCruId }}
--crorc-id {{ rocConfigCrocId }}
--datapathmode {{ rocConfigDatapathMode }}
--downstreamdata {{ rocConfigDownstreamData }}
--gbtmode {{ rocConfigGbtMode }}
--gbtmux {{ rocConfigGbtMux }}
{{ rocConfigLoopback == 'true' ? '--loopback' : ''}}
{{ rocConfigPonUpstream == 'true' ? '--pon-upstream' : ''}}
{{ rocConfigDynOffset == 'true' ? '--dyn-offset' : '' }}
--onu-address {{ rocConfigOnuAddress }}
{{ rocConfigForceConfig == 'true' ? '--force-config' : ''}}
{{ rocConfigBypassFwCheck == 'true' ? '--bypass-fw-check' : ''}}
--trigger-window-size {{ rocConfigTriggerWindowSize }}
{{ rocConfigNoGBT == 'true' ? '--no-gbt' : ''}}
{{ rocConfigUserLogic == 'true' ? '--user-logic' : ''}}
{{ rocConfigRunStats == 'true' ? '--run-stats' : ''}}
{{ rocConfigUserAndCommonLogic == 'true' ? '--user-and-common-logic' : ''}}
{{ rocConfigNoTfDetection == 'true' ? '--no-tf-detection' : ''}}
--tf-length {{ rocConfigTfLength }}
--system-id {{ rocConfigSystemId }}
--fee-id {{ rocConfigFEEId }})
o2-roc-config --id={{ card }}:$endpoint ${args[@]} || exit 1;done
_plain_cmdline: >-
source /etc/profile.d/o2.sh &&
for endpoint in {{ card_endpoints }};do
args=(--links {{ rocConfigLinks }}
{{ rocConfigAllowRejection == 'true' ? '--allow-rejection' : '' }}
--clock {{ rocConfigClock }}
--cru-id {{ rocConfigCruId }}
--crorc-id {{ rocConfigCrocId }}
--datapathmode {{ rocConfigDatapathMode }}
--downstreamdata {{ rocConfigDownstreamData }}
--gbtmode {{ rocConfigGbtMode }}
--gbtmux {{ rocConfigGbtMux }}
{{ rocConfigLoopback == 'true' ? '--loopback' : ''}}
{{ rocConfigPonUpstream == 'true' ? '--pon-upstream' : ''}}
{{ rocConfigDynOffset == 'true' ? '--dyn-offset' : '' }}
--onu-address {{ rocConfigOnuAddress }}
{{ rocConfigForceConfig == 'true' ? '--force-config' : ''}}
{{ rocConfigBypassFwCheck == 'true' ? '--bypass-fw-check' : ''}}
--trigger-window-size {{ rocConfigTriggerWindowSize }}
{{ rocConfigNoGBT == 'true' ? '--no-gbt' : ''}}
{{ rocConfigUserLogic == 'true' ? '--user-logic' : ''}}
{{ rocConfigRunStats == 'true' ? '--run-stats' : ''}}
{{ rocConfigUserAndCommonLogic == 'true' ? '--user-and-common-logic' : ''}}
{{ rocConfigNoTfDetection == 'true' ? '--no-tf-detection' : ''}}
--tf-length {{ rocConfigTfLength }}
--system-id {{ rocConfigSystemId }}
--fee-id {{ rocConfigFEEId }})
o2-roc-config --id={{ card }}:$endpoint ${args[@]} || exit 1;done
command:
env:
- O2_INFOLOGGER_MODE={{ infologger_mode }}
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
29 changes: 29 additions & 0 deletions tasks/roc-config-uri-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: roc-config-uri-k8s
control:
mode: basic
wants:
cpu: 0.2
memory: 256
defaults:
rocConfigBypassFwCheck: "false"
rocConfigForceConfig: "false"
rocConfigExtraParams: ""
log_task_stdout: none
log_task_stderr: none
detector: TST
vars:
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load ReadoutCard &&
for endpoint in {{ card_endpoints }}; do o2-roc-config --id={{ card }}:$endpoint --config-uri consul-json://{{ consul_endpoint }}/{{ consul_prefix }}/{{ host }}/cru/{{ card }}/$endpoint --status-report /tmp/roc_config_%i_%T --bypass {{ rocConfigForceConfig == 'true' ? '--force-config' : ''}} {{ rocConfigExtraParams }} || exit 1; done
_plain_cmdline: >-
source /etc/profile.d/o2.sh &&
for endpoint in {{ card_endpoints }}; do o2-roc-config --id={{ card }}:$endpoint --config-uri consul-json://{{ consul_endpoint }}/{{ consul_prefix }}/{{ host }}/cru/{{ card }}/$endpoint --status-report /tmp/roc_config_%i_%T --bypass {{ rocConfigForceConfig == 'true' ? '--force-config' : ''}} {{ rocConfigExtraParams }} || exit 1; done
command:
env:
- O2_INFOLOGGER_MODE={{ infologger_mode }}
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
20 changes: 20 additions & 0 deletions tasks/shell-command-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: shell-command-k8s
defaults:
user: flp
log_task_stdout: none
log_task_stderr: none
control:
mode: basic
wants:
cpu: 0.01
memory: 3
command:
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
env:
- O2_DETECTOR={{ detector }}
- O2_PARTITION={{ environment_id }}
user: "{{ user }}"
value: >-
{{ shell_command }}
65 changes: 65 additions & 0 deletions tasks/stfbuilder-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: stfbuilder-k8s
control:
mode: kubernetes_fairmq
defaults:
detector: TST
rdh_version: "6"
user: flp
fmq_severity: info
dd_detector_subspec: feeid
dd_discovery_endpoint: "no-op://" # location of consul docker instance
log_task_stdout: none
log_task_stderr: none
stfb_dd_mode: "physics"
stfb_fee_mask: "0xffff"
stfb_enable_datasink: "false"
stfb_datasink_dir: "/tmp"
stfb_datasink_filesize: "2048"
monitoring_dd_interval: "5"
_module_cmdline: >-
source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load DataDistribution Control-OCCPlugin &&
StfBuilder
_plain_cmdline: "{{ o2_install_path }}/bin/StfBuilder"
wants:
cpu: 0.15
memory: 128
bind:
- name: dpl-chan
type: push
rateLogging: "{{ fmq_rate_logging }}"
transport: shmem
addressing: ipc
sndBufSize: "4"
global: "readout-proxy-{{ it }}"
command:
env:
- O2_INFOLOGGER_MODE={{infologger_mode}}
- O2_DETECTOR={{ detector }}
- DATADIST_FEE_MASK={{ stfb_fee_mask }}
- O2_PARTITION={{ environment_id }}
stdout: "{{ log_task_stdout }}"
stderr: "{{ log_task_stderr }}"
shell: true
user: "{{ user }}"
value: "{{ len(modulepath)>0 ? _module_cmdline : _plain_cmdline }}"
arguments:
- "--session=default"
- "--shm-segment-id=2"
- "--shm-segment-size=33554432"
- "--transport=shmem"
- "--monitoring-backend={{ monitoring_dd_url }}"
- "--monitoring-process-interval={{ monitoring_dd_interval }}"
- "--discovery-partition={{ environment_id }}"
- "--discovery-endpoint={{ dd_discovery_endpoint }}"
- "--detector-rdh={{ rdh_version }}"
- "--detector-subspec={{ dd_detector_subspec }}"
- "--severity={{ fmq_severity }}"
- "--severity-infologger={{ infologger_severity }}"
- "--dpl-channel-name=dpl-chan"
- "--shm-monitor=false"
- "--detector={{ detector }}"
- "--run-type={{ stfb_dd_mode }}"
- "{{ stfb_enable_datasink == 'true' ? '--data-sink-enable' : ' ' }}"
- "{{ stfb_enable_datasink == 'true' ? '--data-sink-dir=' + stfb_datasink_dir : ' ' }}"
- "{{ stfb_enable_datasink == 'true' ? '--data-sink-max-stfs-per-file=0' : ' ' }}"
- "{{ stfb_enable_datasink == 'true' ? '--data-sink-max-file-size=' + stfb_datasink_filesize : ' ' }}"
Loading
Loading