From: Tommi Virtanen Date: Tue, 6 Dec 2011 20:04:03 +0000 (-0800) Subject: doc: Switch diagram tools from dia to ditaa. X-Git-Tag: v0.40~207 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=200d7c89a6130847771dc4ab83cfbe1ea159c58e;p=ceph.git doc: Switch diagram tools from dia to ditaa. Now you can create diagrams easily with the ".. ditaa::" directive in the Sphinx documents. admin/build-doc now checks for debs required for building the documentation, or just lists commands missing for hosts not using dpkg. For more on Ditaa, see http://ditaa.sourceforge.net/ Signed-off-by: Tommi Virtanen --- diff --git a/admin/build-doc b/admin/build-doc index 52c3870a9f4bd..aff578e131a99 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -5,14 +5,36 @@ cd .. install -d -m0755 build-doc +if command -v dpkg >/dev/null; then + for package in python-dev python-pip python-virtualenv doxygen ditaa; do + if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then + # add a space after old values + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required packages, please install them:" 1>&2 + echo "sudo apt-get install $missing" + exit 1 + fi +else + for command in virtualenv doxygen ditaa; do + if ! command -v "$command" >/dev/null; then + # add a space after old values + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required command, please install them:" 1>&2 + echo "$missing" + exit 1 + fi +fi + if [ ! -e build-doc/doxygen/xml ]; then doxygen fi -dia --filter=png-libart --export=doc/overview.png.tmp doc/overview.dia - -mv -- doc/overview.png.tmp doc/overview.png - cat src/osd/PG.h src/osd/PG.cc | doc/scripts/gen_state_diagram.py > doc/dev/peering_graph.generated.dot cd build-doc @@ -35,6 +57,8 @@ if [ -z "$(git rev-parse --default HEAD)" ]; then fi cd .. +./virtualenv/bin/pip install --quiet -e 'git+https://github.com/NewDreamNetwork/sphinx-ditaa.git#egg=sphinx-ditaa' + install -d -m0755 \ output/html \ output/man diff --git a/doc/conf.py b/doc/conf.py index 4dab00c1604b5..270ae996afd2f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,6 +26,7 @@ extensions = [ 'sphinx.ext.graphviz', 'sphinx.ext.todo', 'breathe', + 'sphinx_ditaa', ] todo_include_todos = True diff --git a/doc/index.rst b/doc/index.rst index 28bda23342ad7..f5e2e732164f4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,7 +15,25 @@ RBD is a Linux kernel feature that exposes RADOS storage as a block device. Qemu/KVM also has a direct RBD client, that avoids the kernel overhead. -.. image:: overview.png +.. ditaa:: + + /---------+-----------+-----------\/----------+------\/---------\/-----------\ + | ceph.ko | ceph-fuse | libcephfs || kernel | Qemu || ||librados | + |c9EE |c3EA |c6F6 || /dev/rbd | /KVM || ||c6F6 | + +---------+-----------+-----------+|c9EE |c3EA || |+-----------+ + | Ceph DFS (protocol) |+----------+------+| radosgw || | + | +-----------------+| || || | + | | ceph-mds || RBD (protocol) || || | + | |cFA2 || ||cFB5 || | + +---------------+-----------------++-----------------++---------++ | + | | + | +=------+ +=------+ | + | |cls_rbd| |cls_rgw| | + | +-------+ +-------+ | + | | + | ceph-osd | + |cFB3 | + \----------------------------------------------------------------------------/ diff --git a/doc/overview.dia b/doc/overview.dia deleted file mode 100644 index ff3478503189f..0000000000000 Binary files a/doc/overview.dia and /dev/null differ