]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/cephadm: add prompts to adoption.rst 39789/head
authorZac Dover <zac.dover@gmail.com>
Tue, 2 Mar 2021 18:16:27 +0000 (04:16 +1000)
committerZac Dover <zac.dover@gmail.com>
Tue, 2 Mar 2021 18:22:51 +0000 (04:22 +1000)
This PR formats the bash prompts. It also formats the
bash output so that it appears in the correct (easily
copy-and-pasteable) format. This PR will be followed by
a grammar-improving PR, but this PR is just a
formatting PR.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
doc/cephadm/adoption.rst

index 5c1d2ad1bca288d0684dd4d4d980969b1e693e9e..0a7db7313b8a050ddf2d81c163801e2c558d5569 100644 (file)
@@ -18,9 +18,11 @@ Preparation
 #. Get the ``cephadm`` command line tool on each host in the existing
    cluster.  See :ref:`get-cephadm`.
 
-#. Prepare each host for use by ``cephadm``::
+#. Prepare each host for use by ``cephadm``:
 
-     # cephadm prepare-host
+   .. prompt:: bash #
+
+      cephadm prepare-host
 
 #. Determine which Ceph version you will use.  You can use any Octopus (15.2.z)
    release or later.  For example, ``docker.io/ceph/ceph:v15.2.0``.  The default
@@ -28,13 +30,17 @@ Preparation
    release at the same time be sure to refer to the upgrade notes for any
    special steps to take while upgrading.
 
-   The image is passed to cephadm with::
+   The image is passed to cephadm with:
+
+   .. prompt:: bash #
+
+      cephadm --image $IMAGE <rest of command goes here>
 
-     # cephadm --image $IMAGE <rest of command goes here>
+#. Cephadm can provide a list of all Ceph daemons on the current host:
 
-#. Cephadm can provide a list of all Ceph daemons on the current host::
+   .. prompt:: bash #
 
-     # cephadm ls
+      cephadm ls
 
    Before starting, you should see that all existing daemons have a
    style of ``legacy`` in the resulting output.  As the adoption
@@ -46,40 +52,54 @@ Adoption process
 ----------------
 
 #. Ensure the ceph configuration is migrated to use the cluster config database.
-   If the ``/etc/ceph/ceph.conf`` is identical on each host, then on one host::
+   If the ``/etc/ceph/ceph.conf`` is identical on each host, then on one host:
 
-     # ceph config assimilate-conf -i /etc/ceph/ceph.conf
+   .. prompt:: bash #
+
+      ceph config assimilate-conf -i /etc/ceph/ceph.conf
 
    If there are config variations on each host, you may need to repeat
    this command on each host.  You can view the cluster's
-   configuration to confirm that it is complete with::
+   configuration to confirm that it is complete with:
+
+   .. prompt:: bash #
+
+      ceph config dump
 
-     # ceph config dump
+#. Adopt each monitor:
 
-#. Adopt each monitor::
+   .. prompt:: bash #
 
-     # cephadm adopt --style legacy --name mon.<hostname>
+      cephadm adopt --style legacy --name mon.<hostname>
 
    Each legacy monitor should stop, quickly restart as a cephadm
    container, and rejoin the quorum.
 
-#. Adopt each manager::
+#. Adopt each manager:
 
-     # cephadm adopt --style legacy --name mgr.<hostname>
+   .. prompt:: bash #
 
-#. Enable cephadm::
+      cephadm adopt --style legacy --name mgr.<hostname>
 
-     # ceph mgr module enable cephadm
-     # ceph orch set backend cephadm
+#. Enable cephadm:
 
-#. Generate an SSH key::
+   .. prompt:: bash #
 
-     # ceph cephadm generate-key
-     # ceph cephadm get-pub-key > ~/ceph.pub
+      ceph mgr module enable cephadm
+      ceph orch set backend cephadm
 
-#. Install the cluster SSH key on each host in the cluster::
+#. Generate an SSH key:
 
-     # ssh-copy-id -f -i ~/ceph.pub root@<host>
+   .. prompt:: bash #
+
+      ceph cephadm generate-key
+      ceph cephadm get-pub-key > ~/ceph.pub
+
+#. Install the cluster SSH key on each host in the cluster:
+
+   .. prompt:: bash #
+
+      ssh-copy-id -f -i ~/ceph.pub root@<host>
 
    .. note::
      It is also possible to import an existing ssh key. See
@@ -87,62 +107,88 @@ Adoption process
      document for instructions describing how to import existing
      ssh keys.
 
-#. Tell cephadm which hosts to manage::
+#. Tell cephadm which hosts to manage:
+
+   .. prompt:: bash #
 
-     # ceph orch host add <hostname> [ip-address]
+      ceph orch host add <hostname> [ip-address]
 
    This will perform a ``cephadm check-host`` on each host before
    adding it to ensure it is working.  The IP address argument is only
    required if DNS does not allow you to connect to each host by its
    short name.
 
-#. Verify that the adopted monitor and manager daemons are visible::
+#. Verify that the adopted monitor and manager daemons are visible:
+
+   .. prompt:: bash #
 
-     # ceph orch ps
+      ceph orch ps
 
-#. Adopt all OSDs in the cluster::
+#. Adopt all OSDs in the cluster:
 
-     # cephadm adopt --style legacy --name <name>
+   .. prompt:: bash #
 
-   For example::
+      cephadm adopt --style legacy --name <name>
 
-     # cephadm adopt --style legacy --name osd.1
-     # cephadm adopt --style legacy --name osd.2
+   For example:
+
+   .. prompt:: bash #
+
+      cephadm adopt --style legacy --name osd.1
+      cephadm adopt --style legacy --name osd.2
 
 #. Redeploy MDS daemons by telling cephadm how many daemons to run for
    each file system.  You can list file systems by name with ``ceph fs
-   ls``.  Run the following command on the master nodes::
+   ls``.  Run the following command on the master nodes:
+
+   .. prompt:: bash #
+
+      ceph orch apply mds <fs-name> [--placement=<placement>]
+
+   For example, in a cluster with a single file system called `foo`:
+
+   .. prompt:: bash #
 
-     # ceph orch apply mds <fs-name> [--placement=<placement>]
+      ceph fs ls
 
-   For example, in a cluster with a single file system called `foo`::
+   .. code-block:: bash
 
-     # ceph fs ls
-     name: foo, metadata pool: foo_metadata, data pools: [foo_data ]
-     # ceph orch apply mds foo 2
+      name: foo, metadata pool: foo_metadata, data pools: [foo_data ]
 
-   Wait for the new MDS daemons to start with::
+   .. prompt:: bash #
 
-     # ceph orch ps --daemon-type mds
+      ceph orch apply mds foo 2
 
-   Finally, stop and remove the legacy MDS daemons::
+   Wait for the new MDS daemons to start with:
 
-     # systemctl stop ceph-mds.target
-     # rm -rf /var/lib/ceph/mds/ceph-*
+   .. prompt:: bash #
+
+      ceph orch ps --daemon-type mds
+
+   Finally, stop and remove the legacy MDS daemons:
+
+   .. prompt:: bash #
+
+      systemctl stop ceph-mds.target
+      rm -rf /var/lib/ceph/mds/ceph-*
 
 #. Redeploy RGW daemons.  Cephadm manages RGW daemons by zone.  For each
-   zone, deploy new RGW daemons with cephadm::
+   zone, deploy new RGW daemons with cephadm:
+
+   .. prompt:: bash #
 
-     # ceph orch apply rgw <realm> <zone> [--subcluster=<subcluster>] [--port=<port>] [--ssl] [--placement=<placement>]
+      ceph orch apply rgw <realm> <zone> [--subcluster=<subcluster>] [--port=<port>] [--ssl] [--placement=<placement>]
 
    where *<placement>* can be a simple daemon count, or a list of
    specific hosts (see :ref:`orchestrator-cli-placement-spec`).
 
    Once the daemons have started and you have confirmed they are functioning,
-   stop and remove the old legacy daemons::
+   stop and remove the old legacy daemons:
+
+   .. prompt:: bash #
 
-     # systemctl stop ceph-rgw.target
-     # rm -rf /var/lib/ceph/radosgw/ceph-*
+      systemctl stop ceph-rgw.target
+      rm -rf /var/lib/ceph/radosgw/ceph-*
 
    For adopting single-site systems without a realm, see also
    :ref:`rgw-multisite-migrate-from-single-site`.