From 0d8d7be5849790256d129af402a350160a9807d4 Mon Sep 17 00:00:00 2001 From: Melissa Date: Tue, 26 Oct 2021 02:46:37 -0400 Subject: [PATCH] doc/cephadm: deployment scenarios single host and isolated environment This PR adds a deployment scenarios section to the cephadm docs to document the single-host-defaults flag, and explain how to deploy in an isolated environment. Signed-off-by: Melissa Li --- doc/cephadm/install.rst | 45 ++++++++++++++++++- .../troubleshooting/troubleshooting-pg.rst | 2 + 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/doc/cephadm/install.rst b/doc/cephadm/install.rst index 25907296c5455..04c8ccad94b61 100644 --- a/doc/cephadm/install.rst +++ b/doc/cephadm/install.rst @@ -229,6 +229,8 @@ available options. and then store the login info in its config database. Other hosts added to the cluster will then also be able to make use of the authenticated registry. +* See :ref:`cephadm-deployment-scenarios` for additional examples for using ``cephadm bootstrap``. + .. _cephadm-enable-cli: Enable Ceph CLI @@ -329,5 +331,46 @@ To use *NFS*, follow :ref:`deploy-cephadm-nfs-ganesha` To use *iSCSI*, follow :ref:`cephadm-iscsi` +.. _cephadm-deployment-scenarios: + +Different deployment scenarios +============================== + +Single host +----------- + +To configure a Ceph cluster to run on a single host, use the ``--single-host-defaults`` flag when bootstrapping. For use cases of this, see :ref:`one-node-cluster`. + +The ``--single-host-defaults`` flag sets the following configuration options:: + + global/osd_crush_choose_leaf_type = 0 + global/osd_pool_default_size = 2 + mgr/mgr_standby_modules = False + +For more information on these options, see :ref:`one-node-cluster` and ``mgr_standby_modules`` in :ref:`mgr-administrator-guide`. + +Deployment in an isolated environment +------------------------------------- + +You can install Cephadm in an isolated environment by using a custom container registry. You can either configure Podman or Docker to use an insecure registry, or make the registry secure. Ensure your container image is inside the registry and that you have access to all hosts you wish to add to the cluster. + +Run a local container registry: + +.. prompt:: bash # + + podman run --privileged -d --name registry -p 5000:5000 -v /var/lib/registry:/var/lib/registry --restart=always registry:2 + +If you are using an insecure registry, configure Podman or Docker with the hostname and port where the registry is running. + +.. note:: For every host which accesses the local insecure registry, you will need to repeat this step on the host. + +Next, push your container image to your local registry. + +Then run bootstrap using the ``--image`` flag with your container image. For example: + +.. prompt:: bash # + + cephadm --image **:5000/ceph/ceph bootstrap --mon-ip ** + -.. _cluster network: ../rados/configuration/network-config-ref#cluster-network +.. _cluster network: ../rados/configuration/network-config-ref#cluster-network \ No newline at end of file diff --git a/doc/rados/troubleshooting/troubleshooting-pg.rst b/doc/rados/troubleshooting/troubleshooting-pg.rst index 04310d322a970..54e198a47a6c8 100644 --- a/doc/rados/troubleshooting/troubleshooting-pg.rst +++ b/doc/rados/troubleshooting/troubleshooting-pg.rst @@ -15,6 +15,8 @@ and make appropriate adjustments. As a general rule, you should run your cluster with more than one OSD and a pool size greater than 1 object replica. +.. _one-node-cluster: + One Node Cluster ---------------- -- 2.39.5