[PATCH 4/5] ai milvus: add monitoring support
Luis Chamberlain <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
Add monitoring framework integration to the AI Milvus workflow to track performance during vector database benchmarks. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]> --- playbooks/ai_benchmark.yml | 14 ++++++++++++++ playbooks/roles/milvus/tasks/install_docker.yml | 2 ++ .../roles/monitoring/tasks/monitor_collect.yml | 2 ++ workflows/ai/Makefile | 5 +++++ 4 files changed, 23 insertions(+) diff --git a/playbooks/ai_benchmark.yml b/playbooks/ai_benchmark.yml index 85fc117c8ba7..7e681328e2bc 100644 --- a/playbooks/ai_benchmark.yml +++ b/playbooks/ai_benchmark.yml @@ -3,6 +3,20 @@ hosts: ai vars: ai_vector_db_milvus_benchmark_enable: true + 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: milvus tags: ['ai', 'vector_db', 'milvus', 'benchmark'] + + 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"] diff --git a/playbooks/roles/milvus/tasks/install_docker.yml b/playbooks/roles/milvus/tasks/install_docker.yml index e1e1d911aee0..8c3a80430cd7 100644 --- a/playbooks/roles/milvus/tasks/install_docker.yml +++ b/playbooks/roles/milvus/tasks/install_docker.yml @@ -14,6 +14,7 @@ - python3-pip - python3-setuptools - python3-packaging + - python3-bpfcc state: present become: true when: @@ -35,6 +36,7 @@ - docker-compose - python3-pip - python3-setuptools + - python3-bcc state: present become: true when: diff --git a/playbooks/roles/monitoring/tasks/monitor_collect.yml b/playbooks/roles/monitoring/tasks/monitor_collect.yml index 9662f827301f..83193ed459b6 100644 --- a/playbooks/roles/monitoring/tasks/monitor_collect.yml +++ b/playbooks/roles/monitoring/tasks/monitor_collect.yml @@ -119,6 +119,8 @@ {{ topdir_path }}/workflows/mmtests/results/monitoring {%- elif kdevops_workflow_enable_sysbench|default(false)|bool -%} {{ topdir_path }}/workflows/sysbench/results/monitoring + {%- elif kdevops_workflow_enable_ai|default(false)|bool -%} + {{ topdir_path }}/workflows/ai/results/monitoring {%- else -%} {{ topdir_path }}/results/monitoring {%- endif -%} diff --git a/workflows/ai/Makefile b/workflows/ai/Makefile index 7e9b8af236b7..2ffa64c727fa 100644 --- a/workflows/ai/Makefile +++ b/workflows/ai/Makefile @@ -101,6 +101,11 @@ ai-results-baseline: ai-results-dev: $(Q)$(MAKE) ai-results HOSTS="dev" +monitor-results: $(KDEVOPS_EXTRA_VARS) + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + playbooks/monitor-results.yml \ + --extra-vars=@./extra_vars.yaml + ai-setup: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ -i hosts \ -- 2.45.2