aboutsummaryrefslogtreecommitdiff
path: root/ansible/site.yml
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2020-07-08 19:22:29 +0100
committerBartosz Bezak <bartosz@stackhpc.com>2025-09-09 15:18:59 +0200
commitdba99ea974ccfa59c8701a64731ae3b72a226122 (patch)
tree030b776386a29fbb73f72766f641ed605bc16e04 /ansible/site.yml
parent0e6bab76fe1b3e47e21295c5a23a8008e395b8de (diff)
downloadkolla-ansible-dba99ea974ccfa59c8701a64731ae3b72a226122.tar.gz
kolla-ansible-dba99ea974ccfa59c8701a64731ae3b72a226122.zip
Performance: Split out prometheus node exporter and cadvisor
Executing tasks has a performance penalty, even if they are skipped [1]. The prometheus role deploys a few types of services: * core prometheus server and alert manager services * centralised service-based exporters (mysql, memcached, OpenStack, etc.) * distributed node-based exporters (node exporter, cadvisor) that are deployed to all hosts There is a significant overhead in executing the tasks associated with the core services and centralised exporters against all hosts, even though they are skipped. This change extracts the node exporter and cadvisor deployment into a new prometheus-node-exporters role, to avoid executing the prometheus role against all hosts. The new role is lightweight, and has a small number of tasks, which should significantly improve performance. [1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/skip.md Partially-Implements: blueprint performance-improvements Change-Id: I6913756ff85b7cc626d50ce16d55085d3683db17 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
Diffstat (limited to 'ansible/site.yml')
-rw-r--r--ansible/site.yml18
1 files changed, 16 insertions, 2 deletions
diff --git a/ansible/site.yml b/ansible/site.yml
index 6c8755e80..1f6f409d6 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -440,10 +440,8 @@
gather_facts: false
hosts:
- prometheus
- - prometheus-node-exporter
- prometheus-mysqld-exporter
- prometheus-memcached-exporter
- - prometheus-cadvisor
- prometheus-alertmanager
- prometheus-openstack-exporter
- prometheus-elasticsearch-exporter
@@ -459,6 +457,22 @@
- { role: prometheus,
tags: prometheus }
+- name: Apply role prometheus-node-exporters
+ gather_facts: false
+ hosts:
+ - prometheus-node-exporter
+ - prometheus-cadvisor
+ - '&enable_prometheus_True'
+ serial: '{{ kolla_serial|default("0") }}'
+ max_fail_percentage: >-
+ {{ prometheus_node_exporters_max_fail_percentage |
+ default(kolla_max_fail_percentage) |
+ default(100) }}
+ roles:
+ - { role: prometheus-node-exporters,
+ tags: [prometheus, prometheus-node-exporters],
+ when: enable_prometheus | bool }
+
- name: Apply role iscsi
gather_facts: false
hosts: