From 8c9be9c1794c6af0812afbf8d61d102ded90c9e2 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 21 Apr 2020 09:50:27 +0200 Subject: [PATCH] doc: add day-2 operations documentation This commit is the first of a serie in order to describe all day-2 operations that are possible via ceph-ansible using a set of playbook provided in `infrastructure-playbooks` directory. Fixes: #5061 Signed-off-by: Guillaume Abrioux (cherry picked from commit 7e800303e9933cb61a5288b608e8d4f2cfdd7746) --- docs/source/day-2/osds.rst | 51 +++++++++++++++++++++++++++++++++++++ docs/source/day-2/purge.rst | 15 +++++++++++ docs/source/index.rst | 11 ++++++++ 3 files changed, 77 insertions(+) create mode 100644 docs/source/day-2/osds.rst create mode 100644 docs/source/day-2/purge.rst diff --git a/docs/source/day-2/osds.rst b/docs/source/day-2/osds.rst new file mode 100644 index 000000000..52c34be6d --- /dev/null +++ b/docs/source/day-2/osds.rst @@ -0,0 +1,51 @@ +Adding/Removing OSD(s) after a cluster is deployed is a common operation that should be straight-forward to achieve. + + +Adding osd(s) +------------- + +Adding new OSD(s) on an existing host or adding a new OSD node can be achieved by running the main playbook with the ``--limit`` ansible option. +You basically need to update your host_vars/group_vars with the new hardware and/or the inventory host file with the new osd nodes being added. + +The command used would be like following: + +``ansible-playbook -vv -i site-docker.yml --limit `` + +example: + +.. code-block:: shell + + $ cat hosts + [mons] + mon-node-1 + mon-node-2 + mon-node-3 + + [mgrs] + mon-node-1 + mon-node-2 + mon-node-3 + + [osds] + osd-node-1 + osd-node-2 + osd-node-3 + osd-node-99 + + $ ansible-playbook -vv -i hosts site-docker.yml --limit osd-node-99 + + +Shrinking osd(s) +---------------- + +Shrinking OSDs can be done by using the shrink-osd.yml playbook provided in ``infrastructure-playbooks`` directory. + +The variable ``osd_to_kill`` is a comma separated list of OSD IDs which must be passed to the playbook (passing it as an extra var is the easiest way). + +The playbook will shrink all osds passed in ``osd_to_kill`` serially. + +example: + +.. code-block:: shell + + $ ansible-playbook -vv -i hosts infrastructure-playbooks/shrink-osds.yml -e osd_to_kill=1,2,3 \ No newline at end of file diff --git a/docs/source/day-2/purge.rst b/docs/source/day-2/purge.rst new file mode 100644 index 000000000..dedb26a1f --- /dev/null +++ b/docs/source/day-2/purge.rst @@ -0,0 +1,15 @@ +Purging the cluster +------------------- + +ceph-ansible provides two playbooks in ``infrastructure-playbooks`` for purging a Ceph cluster: ``purge-cluster.yml`` and ``purge-docker-cluster.yml``. + +The names are pretty self-explanatory, ``purge-cluster.yml`` is intended to purge a non-containerized cluster whereas ``purge-docker-cluster.yml`` is to purge a containerized cluster. + +example: + +.. code-block:: shell + + $ ansible-playbook -vv -i hosts infrastructure-playbooks/purge-docker-cluster.yml + +.. note:: + These playbooks aren't intended to be run with the ``--limit`` option. \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 16ca72fa2..eada41ec4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -271,6 +271,17 @@ by setting the ``osd_scenario`` configuration option. osds/scenarios +Day-2 Operations +---------------- + +ceph-ansible provides a set of playbook in ``infrastructure-playbooks`` directory in order to perform some basic day-2 operations. + +.. toctree:: + :maxdepth: 1 + + day-2/osds + day-2/purge + Contribution ============