2012-03-14 18:58:27 +00:00
|
|
|
Building Ceph Documentation
|
2012-03-13 23:22:26 +00:00
|
|
|
===========================
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
Ceph utilizes Python's Sphinx documentation tool. For details on
|
2018-06-01 08:05:16 +00:00
|
|
|
the Sphinx documentation tool, refer to `The Sphinx Documentation Tool <https://www.sphinx-doc.org/en/master/>`_.
|
2012-03-13 23:22:26 +00:00
|
|
|
|
|
|
|
To build the Ceph documentation set, you must:
|
|
|
|
|
|
|
|
1. Clone the Ceph repository
|
|
|
|
2. Install the required tools
|
2012-03-14 18:58:27 +00:00
|
|
|
3. Build the documents
|
2018-10-28 05:44:17 +00:00
|
|
|
4. Demo the documents (Optional)
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2020-12-18 01:37:50 +00:00
|
|
|
.. highlight:: bash
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
Clone the Ceph Repository
|
2012-03-13 23:22:26 +00:00
|
|
|
-------------------------
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
To clone the Ceph repository, you must have ``git`` installed
|
2012-10-19 17:40:25 +00:00
|
|
|
on your local host. To install ``git``, execute::
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-10-19 17:40:25 +00:00
|
|
|
sudo apt-get install git
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-10-19 17:40:25 +00:00
|
|
|
To clone the Ceph repository, execute::
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2013-09-03 22:56:53 +00:00
|
|
|
git clone git://github.com/ceph/ceph
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-03-13 23:22:26 +00:00
|
|
|
You should have a full copy of the Ceph repository.
|
|
|
|
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
Install the Required Tools
|
2012-05-03 17:15:21 +00:00
|
|
|
--------------------------
|
2012-10-19 17:40:25 +00:00
|
|
|
|
2016-05-16 15:35:18 +00:00
|
|
|
To build the Ceph documentation, some dependencies are required.
|
|
|
|
To know what packages are needed, you can launch this command::
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2016-05-16 15:35:18 +00:00
|
|
|
cd ceph
|
|
|
|
admin/build-doc
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2016-05-16 15:35:18 +00:00
|
|
|
If dependencies are missing, the command above will fail
|
|
|
|
with a message that suggests you a command to install all
|
|
|
|
missing dependencies.
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
|
|
|
|
Build the Documents
|
|
|
|
-------------------
|
|
|
|
|
2016-05-16 15:35:18 +00:00
|
|
|
Once you have installed all the dependencies, execute the build (the
|
|
|
|
same command as above)::
|
2012-03-14 18:58:27 +00:00
|
|
|
|
2012-10-19 17:40:25 +00:00
|
|
|
cd ceph
|
|
|
|
admin/build-doc
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-10-19 17:40:25 +00:00
|
|
|
Once you build the documentation set, you may navigate to the source directory to view it::
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-10-19 17:40:25 +00:00
|
|
|
cd build-doc/output
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
There should be an ``html`` directory and a ``man`` directory containing documentation
|
2012-05-03 17:15:21 +00:00
|
|
|
in HTML and manpage formats respectively.
|
2018-10-28 05:44:17 +00:00
|
|
|
|
2020-12-11 13:33:41 +00:00
|
|
|
``admin/build-doc`` takes a long time to prepare the environment and build the document.
|
|
|
|
But you can just rebuild the document on changes using::
|
|
|
|
|
|
|
|
admin/build-doc livehtml
|
|
|
|
|
2020-12-18 01:37:50 +00:00
|
|
|
This feature uses ``sphinx-autobuild`` under the hood. You can also pass options to it. For
|
2020-12-11 13:33:41 +00:00
|
|
|
instance, to open the browser after building the documentation::
|
|
|
|
|
|
|
|
admin/build-doc livehtml -- --open-browser
|
|
|
|
|
2020-12-18 01:37:50 +00:00
|
|
|
Please see `sphinx-autobuild <https://pypi.org/project/sphinx-autobuild/>`_ for more details.
|
2018-10-28 05:44:17 +00:00
|
|
|
|
|
|
|
Demo the Documents
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Once you build the documentation, as described above, you can demo the rendered documents
|
|
|
|
by running ``serve-doc``::
|
|
|
|
|
|
|
|
cd ceph
|
|
|
|
admin/serve-doc
|
|
|
|
|
|
|
|
This will serve the ``build-doc/output/html`` directory over port 8080 via
|
|
|
|
Python's ``SimpleHTTPServer`` module.
|