Add installer phase for dashboard roles

This commits adds the support of the installer phase for dashboard,
grafana and node-exporter roles.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit c7a5967a6f)
pull/4127/head
Dimitri Savineau 2019-06-17 15:52:04 -04:00 committed by mergify[bot]
parent c51e0b51d2
commit 1603cefea2
3 changed files with 105 additions and 0 deletions

View File

@ -31,6 +31,9 @@ class CallbackModule(CallbackBase):
'installer_phase_ceph_client', 'installer_phase_ceph_client',
'installer_phase_ceph_iscsi_gw', 'installer_phase_ceph_iscsi_gw',
'installer_phase_ceph_rgw_loadbalancer', 'installer_phase_ceph_rgw_loadbalancer',
'installer_phase_ceph_dashboard',
'installer_phase_ceph_grafana',
'installer_phase_ceph_node_exporter',
] ]
# Define the attributes of the installer phases # Define the attributes of the installer phases
@ -75,6 +78,18 @@ class CallbackModule(CallbackBase):
'title': 'Install Ceph RGW LoadBalancer', 'title': 'Install Ceph RGW LoadBalancer',
'playbook': 'roles/ceph-rgw-loadbalancer/tasks/main.yml' 'playbook': 'roles/ceph-rgw-loadbalancer/tasks/main.yml'
}, },
'installer_phase_ceph_dashboard': {
'title': 'Install Ceph Dashboard',
'playbook': 'roles/ceph-dashboard/tasks/main.yml'
},
'installer_phase_ceph_grafana': {
'title': 'Install Ceph Grafana',
'playbook': 'roles/ceph-grafana/tasks/main.yml'
},
'installer_phase_ceph_node_exporter': {
'title': 'Install Ceph Node Exporter',
'playbook': 'roles/ceph-node-exporter/tasks/main.yml'
},
} }
# Find the longest phase title # Find the longest phase title

View File

@ -519,6 +519,15 @@
- hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}' - hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}'
become: true become: true
pre_tasks:
- name: set ceph grafana install 'In Progress'
run_once: true
set_stats:
data:
installer_phase_ceph_grafana:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
tasks: tasks:
- block: - block:
- import_role: - import_role:
@ -544,8 +553,26 @@
name: ceph-grafana name: ceph-grafana
when: dashboard_enabled | bool when: dashboard_enabled | bool
post_tasks:
- name: set ceph grafana install 'Complete'
run_once: true
set_stats:
data:
installer_phase_ceph_grafana:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
- hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}' - hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}'
become: true become: true
pre_tasks:
- name: set ceph dashboard install 'In Progress'
run_once: true
set_stats:
data:
installer_phase_ceph_dashboard:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
tasks: tasks:
- block: - block:
- import_role: - import_role:
@ -554,3 +581,12 @@
- import_role: - import_role:
name: ceph-dashboard name: ceph-dashboard
when: dashboard_enabled | bool when: dashboard_enabled | bool
post_tasks:
- name: set ceph dashboard install 'Complete'
run_once: true
set_stats:
data:
installer_phase_ceph_dashboard:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"

View File

@ -483,6 +483,15 @@
- hosts: all - hosts: all
become: true become: true
pre_tasks:
- name: set ceph node exporter install 'In Progress'
run_once: true
set_stats:
data:
installer_phase_ceph_node_exporter:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
tasks: tasks:
- block: - block:
- import_role: - import_role:
@ -497,8 +506,26 @@
name: ceph-node-exporter name: ceph-node-exporter
when: dashboard_enabled | bool when: dashboard_enabled | bool
post_tasks:
- name: set ceph node exporter install 'Complete'
run_once: true
set_stats:
data:
installer_phase_ceph_node_exporter:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
- hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}' - hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}'
become: true become: true
pre_tasks:
- name: set ceph grafana install 'In Progress'
run_once: true
set_stats:
data:
installer_phase_ceph_grafana:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
tasks: tasks:
- block: - block:
- import_role: - import_role:
@ -520,8 +547,26 @@
name: ceph-grafana name: ceph-grafana
when: dashboard_enabled | bool when: dashboard_enabled | bool
post_tasks:
- name: set ceph grafana install 'Complete'
run_once: true
set_stats:
data:
installer_phase_ceph_grafana:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
- hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}' - hosts: '{{ groups["mgrs"][0] | default(groups["mons"][0]) | default(omit) }}'
become: true become: true
pre_tasks:
- name: set ceph dashboard install 'In Progress'
run_once: true
set_stats:
data:
installer_phase_ceph_dashboard:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
tasks: tasks:
- block: - block:
- import_role: - import_role:
@ -530,3 +575,12 @@
- import_role: - import_role:
name: ceph-dashboard name: ceph-dashboard
when: dashboard_enabled | bool when: dashboard_enabled | bool
post_tasks:
- name: set ceph dashboard install 'Complete'
run_once: true
set_stats:
data:
installer_phase_ceph_dashboard:
status: "Complete"
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"