]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add flag to automatically deploy loki/promtail service at bootstrap 47623/head
authorAashish Sharma <aasharma@redhat.com>
Fri, 29 Jul 2022 07:05:47 +0000 (12:35 +0530)
committerAashish Sharma <aasharma@redhat.com>
Tue, 16 Aug 2022 06:32:55 +0000 (12:02 +0530)
Fixes: https://tracker.ceph.com/issues/56964
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
(cherry picked from commit 5ced5f37d29ee019a51e8c903c8a334406601c8c)

src/cephadm/cephadm

index 3d540f4edd35cf9e5f555a16a5bec0f9b07b6a2f..2e551377cfc5863e15dc8e5b3f708e23ec753f33 100755 (executable)
@@ -5157,6 +5157,11 @@ def prepare_ssh(
             logger.info('Deploying %s service with default placement...' % t)
             cli(['orch', 'apply', t])
 
+    if ctx.with_centralized_logging:
+        for t in ['loki', 'promtail']:
+            logger.info('Deploying %s service with default placement...' % t)
+            cli(['orch', 'apply', t])
+
 
 def enable_cephadm_mgr_module(
     cli: Callable, wait_for_mgr_restart: Callable
@@ -9141,6 +9146,10 @@ def _get_parser():
         '--skip-monitoring-stack',
         action='store_true',
         help='Do not automatically provision monitoring stack (prometheus, grafana, alertmanager, node-exporter)')
+    parser_bootstrap.add_argument(
+        '--with-centralized-logging',
+        action='store_true',
+        help='Automatically provision centralized logging (promtail, loki)')
     parser_bootstrap.add_argument(
         '--apply-spec',
         help='Apply cluster spec after bootstrap (copy ssh key, add hosts and apply services)')