From 48f5cd5b9bb1ccf89e1eaad163cf11874ad3e176 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 30 Sep 2021 07:22:09 +0800 Subject: [PATCH] doc/cephadm/services: unindent note section before this change the note on "apply" command is embedded in the note on "_no_schedule". and they are not related. so let's move the former out. also, highlight the yaml file sample in YAML. Signed-off-by: Kefu Chai --- doc/cephadm/services/index.rst | 68 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/doc/cephadm/services/index.rst b/doc/cephadm/services/index.rst index 3fb7bddf5115d..00eacdfce2f7e 100644 --- a/doc/cephadm/services/index.rst +++ b/doc/cephadm/services/index.rst @@ -207,53 +207,55 @@ or in a YAML files. cephadm will not deploy daemons on hosts with the ``_no_schedule`` label; see :ref:`cephadm-special-host-labels`. - .. note:: - The **apply** command can be confusing. For this reason, we recommend using - YAML specifications. +.. note:: + The **apply** command can be confusing. For this reason, we recommend using + YAML specifications. - Each ``ceph orch apply `` command supersedes the one before it. - If you do not use the proper syntax, you will clobber your work - as you go. + Each ``ceph orch apply `` command supersedes the one before it. + If you do not use the proper syntax, you will clobber your work + as you go. - For example: + For example: - .. prompt:: bash # + .. prompt:: bash # - ceph orch apply mon host1 - ceph orch apply mon host2 - ceph orch apply mon host3 + ceph orch apply mon host1 + ceph orch apply mon host2 + ceph orch apply mon host3 - This results in only one host having a monitor applied to it: host 3. + This results in only one host having a monitor applied to it: host 3. - (The first command creates a monitor on host1. Then the second command - clobbers the monitor on host1 and creates a monitor on host2. Then the - third command clobbers the monitor on host2 and creates a monitor on - host3. In this scenario, at this point, there is a monitor ONLY on - host3.) + (The first command creates a monitor on host1. Then the second command + clobbers the monitor on host1 and creates a monitor on host2. Then the + third command clobbers the monitor on host2 and creates a monitor on + host3. In this scenario, at this point, there is a monitor ONLY on + host3.) - To make certain that a monitor is applied to each of these three hosts, - run a command like this: + To make certain that a monitor is applied to each of these three hosts, + run a command like this: - .. prompt:: bash # + .. prompt:: bash # - ceph orch apply mon "host1,host2,host3" + ceph orch apply mon "host1,host2,host3" - There is another way to apply monitors to multiple hosts: a ``yaml`` file - can be used. Instead of using the "ceph orch apply mon" commands, run a - command of this form: + There is another way to apply monitors to multiple hosts: a ``yaml`` file + can be used. Instead of using the "ceph orch apply mon" commands, run a + command of this form: + + .. prompt:: bash # - .. prompt:: bash # + ceph orch apply -i file.yaml - ceph orch apply -i file.yaml + Here is a sample **file.yaml** file - Here is a sample **file.yaml** file:: + .. code-block:: yaml - service_type: mon - placement: - hosts: - - host1 - - host2 - - host3 + service_type: mon + placement: + hosts: + - host1 + - host2 + - host3 Explicit placements ------------------- -- 2.39.5