From 88555d1490ec2b187081b16d3fc7c9be2fb9c260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Wed, 28 Oct 2026 13:38:06 +0100 Subject: [PATCH 1/2] ecs: add jit k8s button --- workflows/readout-dataflow.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workflows/readout-dataflow.yaml b/workflows/readout-dataflow.yaml index d1b154c7d..4bdf2a858 100644 --- a/workflows/readout-dataflow.yaml +++ b/workflows/readout-dataflow.yaml @@ -96,6 +96,14 @@ defaults: widget: checkBox panel: General_Configuration index: 8 + jit_k8s_enabled: !public + value: "false" + type: bool + label: "DPL (JIT) on Kubernetes" + description: "Enable/disable running JIT-generated DPL tasks on Kubernetes instead of Mesos (requires Kubernetes support in AliECS core)" + widget: checkBox + panel: General_Configuration + index: 9 ############################### # DCS and FLP Workflows Panel ############################### From 453a24120d94b28d87589b23680d6b6035121aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Tue, 17 Nov 2026 19:02:26 +0100 Subject: [PATCH 2/2] ecs: remote jit k8s button, add global k8s button with k8s workflows --- tasks/fairmq-shmmonitor-k8s.yaml | 26 +++++++ tasks/o2-roc-cleanup-k8s.yaml | 26 +++++++ tasks/o2-roc-ctp-emulator-k8s.yaml | 29 +++++++ tasks/readout-ctp-k8s.yaml | 33 ++++++++ tasks/readout-k8s.yaml | 33 ++++++++ tasks/roc-config-args-k8s.yaml | 100 +++++++++++++++++++++++++ tasks/roc-config-uri-k8s.yaml | 29 +++++++ tasks/shell-command-k8s.yaml | 20 +++++ tasks/stfbuilder-k8s.yaml | 65 ++++++++++++++++ tasks/stfbuilder-nooutput-k8s.yaml | 51 +++++++++++++ tasks/stfbuilder-senderoutput-k8s.yaml | 64 ++++++++++++++++ tasks/stfsender-k8s.yaml | 68 +++++++++++++++++ workflows/readout-dataflow.yaml | 6 +- 13 files changed, 547 insertions(+), 3 deletions(-) create mode 100644 tasks/fairmq-shmmonitor-k8s.yaml create mode 100644 tasks/o2-roc-cleanup-k8s.yaml create mode 100644 tasks/o2-roc-ctp-emulator-k8s.yaml create mode 100644 tasks/readout-ctp-k8s.yaml create mode 100644 tasks/readout-k8s.yaml create mode 100644 tasks/roc-config-args-k8s.yaml create mode 100644 tasks/roc-config-uri-k8s.yaml create mode 100644 tasks/shell-command-k8s.yaml create mode 100644 tasks/stfbuilder-k8s.yaml create mode 100644 tasks/stfbuilder-nooutput-k8s.yaml create mode 100644 tasks/stfbuilder-senderoutput-k8s.yaml create mode 100644 tasks/stfsender-k8s.yaml diff --git a/tasks/fairmq-shmmonitor-k8s.yaml b/tasks/fairmq-shmmonitor-k8s.yaml new file mode 100644 index 000000000..163e8f728 --- /dev/null +++ b/tasks/fairmq-shmmonitor-k8s.yaml @@ -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 }}" diff --git a/tasks/o2-roc-cleanup-k8s.yaml b/tasks/o2-roc-cleanup-k8s.yaml new file mode 100644 index 000000000..b7fb63858 --- /dev/null +++ b/tasks/o2-roc-cleanup-k8s.yaml @@ -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 diff --git a/tasks/o2-roc-ctp-emulator-k8s.yaml b/tasks/o2-roc-ctp-emulator-k8s.yaml new file mode 100644 index 000000000..1243b9366 --- /dev/null +++ b/tasks/o2-roc-ctp-emulator-k8s.yaml @@ -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 }}" diff --git a/tasks/readout-ctp-k8s.yaml b/tasks/readout-ctp-k8s.yaml new file mode 100644 index 000000000..5efc6ee0a --- /dev/null +++ b/tasks/readout-ctp-k8s.yaml @@ -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 }}" diff --git a/tasks/readout-k8s.yaml b/tasks/readout-k8s.yaml new file mode 100644 index 000000000..15d2595ea --- /dev/null +++ b/tasks/readout-k8s.yaml @@ -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 }}" diff --git a/tasks/roc-config-args-k8s.yaml b/tasks/roc-config-args-k8s.yaml new file mode 100644 index 000000000..5dfe0f85d --- /dev/null +++ b/tasks/roc-config-args-k8s.yaml @@ -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 }}" diff --git a/tasks/roc-config-uri-k8s.yaml b/tasks/roc-config-uri-k8s.yaml new file mode 100644 index 000000000..ca2f36569 --- /dev/null +++ b/tasks/roc-config-uri-k8s.yaml @@ -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 }}" diff --git a/tasks/shell-command-k8s.yaml b/tasks/shell-command-k8s.yaml new file mode 100644 index 000000000..c50365d25 --- /dev/null +++ b/tasks/shell-command-k8s.yaml @@ -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 }} diff --git a/tasks/stfbuilder-k8s.yaml b/tasks/stfbuilder-k8s.yaml new file mode 100644 index 000000000..eee63baad --- /dev/null +++ b/tasks/stfbuilder-k8s.yaml @@ -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 : ' ' }}" diff --git a/tasks/stfbuilder-nooutput-k8s.yaml b/tasks/stfbuilder-nooutput-k8s.yaml new file mode 100644 index 000000000..b1c446bf1 --- /dev/null +++ b/tasks/stfbuilder-nooutput-k8s.yaml @@ -0,0 +1,51 @@ +name: stfbuilder-nooutput-k8s +control: + mode: fairmq +defaults: + detector: TST + rdh_version: "6" + user: flp + fmq_severity: info + dd_detector_subspec: feeid + 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 +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" + - "--transport=shmem" + - "--monitoring-backend='{{ monitoring_dd_url }}'" + - "--monitoring-process-interval='{{ monitoring_dd_interval }}'" + - "--detector-rdh={{ rdh_version }}" + - "--detector-subspec={{dd_detector_subspec}}" + - "--severity={{ fmq_severity }}" + - "--severity-infologger={{ infologger_severity }}" + - "--stand-alone" + - "--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 : ' ' }}" diff --git a/tasks/stfbuilder-senderoutput-k8s.yaml b/tasks/stfbuilder-senderoutput-k8s.yaml new file mode 100644 index 000000000..4f34cc89d --- /dev/null +++ b/tasks/stfbuilder-senderoutput-k8s.yaml @@ -0,0 +1,64 @@ +name: stfbuilder-senderoutput-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: buildertosender + type: push + rateLogging: "{{ fmq_rate_logging }}" + transport: shmem + addressing: ipc + sndBufSize: "4" +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" + - "--transport=shmem" + - "--shm-segment-id=2" + - "--shm-segment-size=33554432" + - "--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 }}" + - "--output-channel-name=buildertosender" + - "--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 : ' ' }}" diff --git a/tasks/stfsender-k8s.yaml b/tasks/stfsender-k8s.yaml new file mode 100644 index 000000000..0750761f3 --- /dev/null +++ b/tasks/stfsender-k8s.yaml @@ -0,0 +1,68 @@ +name: stfsender-k8s +control: + mode: kubernetes_fairmq +wants: + cpu: 0.15 + memory: 128 +defaults: + max_buffered_stfs: "-1" + dd_discovery_net_if: "ib0" #the loopback intf + dd_discovery_endpoint: "no-op://" # location of consul docker instance + user: flp + fmq_severity: info + log_task_stdout: none + log_task_stderr: none + stfs_dd_region_size: 4096 + stfs_shm_segment_size: 33554432 + stfs_enable_datasink: "false" + stfs_datasink_dir: "/tmp" + stfs_datasink_filesize: "2048" + monitoring_dd_interval: "5" + _module_cmdline: >- + source /etc/profile.d/modules.sh && MODULEPATH={{ modulepath }} module load DataDistribution Control-OCCPlugin && + numactl --cpunodebind=0 --preferred=0 -- StfSender + _plain_cmdline: "numactl" +command: + env: + - O2_INFOLOGGER_MODE={{infologger_mode}} + - http_proxy="" + - https_proxy="" + - no_proxy=-ib,.internal + - O2_DETECTOR={{ detector }} + - UCX_NET_DEVICES=mlx5_0:1 # This limits StfSender to IB interface (used as of DD v1.3.0) + - UCX_TLS=sm,self,dc,rc # Force dc/rc connection (used as of DD v1.4.0) + - UCX_IB_SL=1 # Force IB SL1 with Adaptive Routing (AR) + - UCX_DC_MAX_NUM_EPS=512 # Allow 512 peers for DC transport + - UCX_RC_MAX_NUM_EPS=512 # Allow 512 peers for RC transport + - 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: + - "--cpunodebind=0" + - "--preferred=0" + - "--" + - "{{ o2_install_path }}/bin/StfSender" + - "--session=default" + - "--shm-segment-id=2" + - "--shm-segment-size={{ stfs_shm_segment_size }}" + - "--dd-region-size={{ stfs_dd_region_size }}" + - "--dd-region-id=3536" + - "--transport=shmem" + - "--input-channel-name={{ stfs_input_channel_name }}" + - "--severity={{ fmq_severity }}" + - "--severity-infologger={{ infologger_severity }}" + - "--monitoring-backend={{ monitoring_dd_url }}" + - "--monitoring-process-interval={{ monitoring_dd_interval }}" + - "--discovery-partition={{ environment_id }}" + - "--discovery-id={{ dd_discovery_stfs_id }}" + - "--discovery-endpoint={{ dd_discovery_endpoint }}" + - "--discovery-net-if={{ dd_discovery_net_if }}" + - '{{ ddsched_enabled == "true" ? "" : "--stand-alone" }}' + - "--shm-monitor=false" + - "{{ stfs_enable_datasink == 'true' ? '--data-sink-enable' : ' ' }}" + - "{{ stfs_enable_datasink == 'true' ? '--data-sink-dir=' + stfs_datasink_dir : ' ' }}" + - "{{ stfs_enable_datasink == 'true' ? '--data-sink-max-stfs-per-file=0' : ' ' }}" + - "{{ stfs_enable_datasink == 'true' ? '--data-sink-max-file-size=' + stfs_datasink_filesize : ' ' }}" diff --git a/workflows/readout-dataflow.yaml b/workflows/readout-dataflow.yaml index 4bdf2a858..b15ec62cb 100644 --- a/workflows/readout-dataflow.yaml +++ b/workflows/readout-dataflow.yaml @@ -96,11 +96,11 @@ defaults: widget: checkBox panel: General_Configuration index: 8 - jit_k8s_enabled: !public + k8s_enabled: !public value: "false" type: bool - label: "DPL (JIT) on Kubernetes" - description: "Enable/disable running JIT-generated DPL tasks on Kubernetes instead of Mesos (requires Kubernetes support in AliECS core)" + label: "Run on Kubernetes" + description: "Enable/disable running all tasks on Kubernetes instead of Mesos. Every enabled task needs a Kubernetes variant (-k8s), JIT-generated DPL tasks are generated for Kubernetes (requires Kubernetes support in AliECS core)" widget: checkBox panel: General_Configuration index: 9