]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add installer phase for dashboard roles
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 17 Jun 2019 19:52:04 +0000 (15:52 -0400)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 18 Jun 2019 13:14:04 +0000 (13:14 +0000)
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 c7a5967a6fa60e3f0d81a03bc148834c3d4f9b59)

plugins/callback/installer_checkpoint.py
site-container.yml.sample
site.yml.sample

index 0a76c0964b6a76a3bf22ef2c8e96ba59c81e3975..9c7cbc58ca7d7e2027187dba40dbcfdff48b31fa 100644 (file)
@@ -31,6 +31,9 @@ class CallbackModule(CallbackBase):
             'installer_phase_ceph_client',
             'installer_phase_ceph_iscsi_gw',
             '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
@@ -75,6 +78,18 @@ class CallbackModule(CallbackBase):
                 'title': 'Install Ceph RGW LoadBalancer',
                 '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
index bcecffa7ec2925b4cb221f9f9aa5df43b98af5fc..2ca39f6ca2c23172b50e8bd702a80d7f77c2506c 100644 (file)
 
 - hosts: '{{ groups["grafana-server"][0] | default(groups["mgrs"][0]) | default(groups["mons"][0]) | default(omit) }}'
   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:
     - block:
         - import_role:
             name: ceph-grafana
       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) }}'
   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:
     - block:
         - import_role:
         - import_role:
             name: ceph-dashboard
       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') }}"
index 38b14c36d66b547365bf8834cf246530e6aa5a05..da208e3fe5e5d01ab313839ac9fa8d7354a911f9 100644 (file)
 
 - hosts: all
   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:
     - block:
         - import_role:
             name: ceph-node-exporter
       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) }}'
   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:
     - block:
         - import_role:
             name: ceph-grafana
       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) }}'
   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:
     - block:
         - import_role:
         - import_role:
             name: ceph-dashboard
       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') }}"