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
|
|
|
|
the Sphinx documentation tool, refer to `The Sphinx Documentation Tool <http://sphinx.pocoo.org/>`_.
|
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
|
2012-03-13 23:22:26 +00:00
|
|
|
|
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
|
|
|
|
on your local host. To install ``git``, execute:
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
``$ sudo apt-get install git``
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
You must also have a github account. If you do not have a
|
|
|
|
github account, go to `github <http://github.com>`_ and register.
|
2012-03-13 23:22:26 +00:00
|
|
|
|
|
|
|
You must set up SSH keys with github to clone the Ceph
|
|
|
|
repository. If you do not have SSH keys for github, execute:
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
``$ ssh-keygen -d``
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-03-13 23:22:26 +00:00
|
|
|
Get the key to add to your github account:
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
``$ cat .ssh/id_dsa.pub``
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-03-13 23:22:26 +00:00
|
|
|
Copy the public key. Then, go to your your github account,
|
2012-03-14 18:58:27 +00:00
|
|
|
click on **Account Settings** (*i.e.*, the tools icon); then,
|
2012-05-03 17:15:21 +00:00
|
|
|
click **SSH Keys** on the left side navbar.
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
Click **Add SSH key** in the **SSH Keys** list, enter a name for
|
|
|
|
the key, paste the key you generated, and press the **Add key**
|
2012-03-13 23:22:26 +00:00
|
|
|
button.
|
|
|
|
|
|
|
|
To clone the Ceph repository, execute:
|
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
``$ git clone git@github:ceph/ceph.git``
|
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
|
|
|
--------------------------
|
|
|
|
If you do not have Sphinx and its dependencies installed,
|
2012-03-13 23:22:26 +00:00
|
|
|
a list of dependencies will appear in the output. Install
|
|
|
|
the dependencies on your system, and then execute the build.
|
2012-05-03 17:15:21 +00:00
|
|
|
|
|
|
|
To run Sphinx, at least the following are required:
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
- ``python-dev``
|
|
|
|
- ``python-pip``
|
|
|
|
- ``python-virtualenv``
|
|
|
|
- ``libxml2-dev``
|
|
|
|
- ``libxslt-dev``
|
|
|
|
- ``doxygen``
|
|
|
|
- ``ditaa``
|
|
|
|
- ``graphviz``
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
Execute ``apt-get install`` for each dependency that isn't
|
2012-05-03 17:15:21 +00:00
|
|
|
installed on your host.
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
``$ apt-get install python-dev python-pip python-virtualenv libxml2-dev libxslt-dev doxygen ditaa graphviz``
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-03-13 23:22:26 +00:00
|
|
|
|
2012-03-14 18:58:27 +00:00
|
|
|
|
|
|
|
Build the Documents
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
Once you have installed all the dependencies, execute the build:
|
|
|
|
|
|
|
|
``$ cd ceph``
|
|
|
|
``$ admin/build-doc``
|
2012-03-13 23:22:26 +00:00
|
|
|
|
|
|
|
Once you build the documentation set, you may navigate to the source directory to view it:
|
|
|
|
|
2012-03-14 18:58:27 +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.
|