[PATCH 5/5] minio: add monitoring support
Luis Chamberlain <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
Add monitoring framework integration to the MinIO Warp workflow to track performance during S3 benchmarking tests. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]> --- playbooks/minio.yml | 15 ++++++++++++ playbooks/roles/minio_install/tasks/main.yml | 24 ++++++++++++++++++- .../monitoring/tasks/monitor_collect.yml | 4 ++++ workflows/minio/Makefile | 9 ++++++- 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/playbooks/minio.yml b/playbooks/minio.yml index bf80bbf4eaa0..a3b2be26ed91 100644 --- a/playbooks/minio.yml +++ b/playbooks/minio.yml @@ -25,9 +25,24 @@ become: true become_user: root tags: ['minio_warp'] + + pre_tasks: + # Start monitoring services before running benchmarks + - ansible.builtin.import_tasks: roles/monitoring/tasks/monitor_run.yml + when: + - enable_monitoring|default(false)|bool + tags: ["monitoring", "monitor_run"] + roles: - role: minio_warp_run + post_tasks: + # Collect monitoring data after benchmarks complete + - ansible.builtin.import_tasks: roles/monitoring/tasks/monitor_collect.yml + when: + - enable_monitoring|default(false)|bool + tags: ["monitoring", "monitor_collect"] + - name: Uninstall MinIO hosts: minio become: true diff --git a/playbooks/roles/minio_install/tasks/main.yml b/playbooks/roles/minio_install/tasks/main.yml index 9ea3d758adcb..e8ec3067b8b3 100644 --- a/playbooks/roles/minio_install/tasks/main.yml +++ b/playbooks/roles/minio_install/tasks/main.yml @@ -6,13 +6,35 @@ - "../extra_vars.yaml" tags: vars -- name: Install Docker +- name: Install Docker and monitoring dependencies package: name: - docker.io - python3-docker + - python3-bpfcc state: present become: yes + when: ansible_os_family == "Debian" + +- name: Install Docker and monitoring dependencies (RedHat) + package: + name: + - docker + - python3-docker + - python3-bcc + state: present + become: yes + when: ansible_os_family == "RedHat" + +- name: Install Docker and monitoring dependencies (SUSE) + package: + name: + - docker + - python3-docker + - python3-bcc + state: present + become: yes + when: ansible_os_family == "SUSE" - name: Ensure Docker service is running systemd: diff --git a/playbooks/roles/monitoring/tasks/monitor_collect.yml b/playbooks/roles/monitoring/tasks/monitor_collect.yml index 83193ed459b6..e59e4ce7a386 100644 --- a/playbooks/roles/monitoring/tasks/monitor_collect.yml +++ b/playbooks/roles/monitoring/tasks/monitor_collect.yml @@ -121,6 +121,10 @@ {{ topdir_path }}/workflows/sysbench/results/monitoring {%- elif kdevops_workflow_enable_ai|default(false)|bool -%} {{ topdir_path }}/workflows/ai/results/monitoring + {%- elif kdevops_workflow_enable_minio|default(false)|bool -%} + {{ topdir_path }}/workflows/minio/results/monitoring + {%- elif kdevops_workflow_enable_build_linux|default(false)|bool -%} + {{ topdir_path }}/workflows/build-linux/results/monitoring {%- else -%} {{ topdir_path }}/results/monitoring {%- endif -%} diff --git a/workflows/minio/Makefile b/workflows/minio/Makefile index c543ed3b26ea..ef2ecb973429 100644 --- a/workflows/minio/Makefile +++ b/workflows/minio/Makefile @@ -4,6 +4,7 @@ MINIO_DATA_TARGET_UNINSTALL := minio-uninstall MINIO_DATA_TARGET_DESTROY := minio-destroy MINIO_DATA_TARGET_RUN := minio-warp MINIO_DATA_TARGET_RESULTS := minio-results +MINIO_DATA_TARGET_MONITOR := monitor-results MINIO_PLAYBOOK := playbooks/minio.yml @@ -49,6 +50,11 @@ $(MINIO_DATA_TARGET_RESULTS): echo "No results directory found. Run 'make minio-warp' first."; \ fi +$(MINIO_DATA_TARGET_MONITOR): $(KDEVOPS_EXTRA_VARS) + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + playbooks/monitor-results.yml \ + --extra-vars=@./extra_vars.yaml + minio-help: @echo "MinIO Warp S3 benchmarking targets:" @echo "" @@ -58,6 +64,7 @@ minio-help: @echo "minio-destroy - Remove MinIO containers and clean up data" @echo "minio-warp - Run MinIO Warp benchmarks" @echo "minio-results - Collect and analyze benchmark results" + @echo "monitor-results - Collect monitoring data" @echo "" @echo "Example usage:" @echo " make defconfig-minio-warp # Configure for Warp benchmarking" @@ -73,4 +80,4 @@ minio-help: .PHONY: $(MINIO_DATA_TARGET) $(MINIO_DATA_TARGET_INSTALL) $(MINIO_DATA_TARGET_UNINSTALL) .PHONY: $(MINIO_DATA_TARGET_DESTROY) $(MINIO_DATA_TARGET_RUN) $(MINIO_DATA_TARGET_RESULTS) -.PHONY: minio-help +.PHONY: $(MINIO_DATA_TARGET_MONITOR) minio-help -- 2.45.2