mirror of https://github.com/ceph/ceph-ansible.git
rolling_update: refact dashboard workflow
The dashboard upgrade workflow should do the same process than the ceph
upgrade otherwise any systemd unit modification won't be apply on the
monitoring/dashboard stack.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1859173
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a6209bd957
)
pull/5604/head
parent
15872e3db1
commit
7a970ac028
|
@ -872,10 +872,85 @@
|
||||||
vars:
|
vars:
|
||||||
msgr2_migration: True
|
msgr2_migration: True
|
||||||
|
|
||||||
- import_playbook: ../dashboard.yml
|
- name: upgrade node-exporter
|
||||||
when:
|
hosts: all
|
||||||
- dashboard_enabled | bool
|
gather_facts: false
|
||||||
- groups.get(grafana_server_group_name, []) | length > 0
|
become: true
|
||||||
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
|
||||||
|
- name: with dashboard configuration
|
||||||
|
when: dashboard_enabled | bool
|
||||||
|
block:
|
||||||
|
- name: stop node-exporter
|
||||||
|
service:
|
||||||
|
name: node_exporter
|
||||||
|
state: stopped
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-facts
|
||||||
|
- import_role:
|
||||||
|
name: ceph-container-engine
|
||||||
|
- import_role:
|
||||||
|
name: ceph-container-common
|
||||||
|
tasks_from: registry
|
||||||
|
when:
|
||||||
|
- not containerized_deployment | bool
|
||||||
|
- ceph_docker_registry_auth | bool
|
||||||
|
- import_role:
|
||||||
|
name: ceph-node-exporter
|
||||||
|
|
||||||
|
- name: upgrade monitoring node
|
||||||
|
hosts: "{{ grafana_server_group_name }}"
|
||||||
|
gather_facts: false
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
|
||||||
|
- name: with dashboard configuration
|
||||||
|
when: dashboard_enabled | bool
|
||||||
|
block:
|
||||||
|
- name: stop monitoring services
|
||||||
|
service:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: stopped
|
||||||
|
failed_when: false
|
||||||
|
with_items:
|
||||||
|
- alertmanager
|
||||||
|
- prometheus
|
||||||
|
- grafana-server
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-facts
|
||||||
|
- import_role:
|
||||||
|
name: ceph-facts
|
||||||
|
tasks_from: grafana
|
||||||
|
- import_role:
|
||||||
|
name: ceph-prometheus
|
||||||
|
- import_role:
|
||||||
|
name: ceph-grafana
|
||||||
|
|
||||||
|
- name: upgrade ceph dashboard
|
||||||
|
hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) | default(omit) }}"
|
||||||
|
gather_facts: false
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
|
||||||
|
- name: with dashboard configuration
|
||||||
|
when: dashboard_enabled | bool
|
||||||
|
block:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-facts
|
||||||
|
- import_role:
|
||||||
|
name: ceph-facts
|
||||||
|
tasks_from: grafana
|
||||||
|
- import_role:
|
||||||
|
name: ceph-dashboard
|
||||||
|
|
||||||
- name: show ceph status
|
- name: show ceph status
|
||||||
hosts: "{{ mon_group_name|default('mons') }}"
|
hosts: "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
Loading…
Reference in New Issue