From 606b2e2082f53db9d89b9874eafa667a6138daf0 Mon Sep 17 00:00:00 2001 From: guihecheng Date: Thu, 4 Apr 2019 11:33:15 +0800 Subject: [PATCH] Add section for rgw loadbalancer in site.yml This drives ceph rgw loadbalancer stuff to run. Signed-off-by: guihecheng (cherry picked from commit 96c346743ba7cff2e737f13b8b442f14c54a9a55) --- plugins/callback/installer_checkpoint.py | 5 ++++ site.yml.sample | 34 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/plugins/callback/installer_checkpoint.py b/plugins/callback/installer_checkpoint.py index 85f6ae2bc..834563420 100644 --- a/plugins/callback/installer_checkpoint.py +++ b/plugins/callback/installer_checkpoint.py @@ -31,6 +31,7 @@ class CallbackModule(CallbackBase): 'installer_phase_ceph_rbdmirror', 'installer_phase_ceph_client', 'installer_phase_ceph_iscsi_gw', + 'installer_phase_ceph_rgw_loadbalancer', ] # Define the attributes of the installer phases @@ -75,6 +76,10 @@ class CallbackModule(CallbackBase): 'title': 'Install Ceph iSCSI Gateway', 'playbook': 'roles/ceph-iscsi-gw/tasks/main.yml' }, + 'installer_phase_ceph_rgw_loadbalancer': { + 'title': 'Install Ceph RGW LoadBalancer', + 'playbook': 'roles/ceph-rgw-loadbalancer/tasks/main.yml' + }, } # Find the longest phase title diff --git a/site.yml.sample b/site.yml.sample index 17f4c010f..637920803 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -14,6 +14,7 @@ - iscsigws - iscsi-gws # for backward compatibility only! - grafana-server + - rgwloadbalancers gather_facts: false any_errors_fatal: true @@ -466,6 +467,39 @@ status: "Complete" end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}" +- hosts: + - rgwloadbalancers + gather_facts: false + become: True + any_errors_fatal: true + pre_tasks: + - name: set ceph rgw loadbalancer install 'In Progress' + run_once: true + set_stats: + data: + installer_phase_ceph_rgw_loadbalancer: + status: "In Progress" + start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}" + + tasks: + - import_role: + name: ceph-defaults + tags: ['ceph_update_config'] + - import_role: + name: ceph-facts + tags: ['ceph_update_config'] + - import_role: + name: ceph-rgw-loadbalancer + + post_tasks: + - name: set ceph rgw loadbalancer install 'Complete' + run_once: true + set_stats: + data: + installer_phase_ceph_rgw_loadbalancer: + status: "Complete" + end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}" + - hosts: mons gather_facts: false become: True