]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Switch diagram tools from dia to ditaa.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 6 Dec 2011 20:04:03 +0000 (12:04 -0800)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 6 Dec 2011 20:07:59 +0000 (12:07 -0800)
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 <tommi.virtanen@dreamhost.com>
admin/build-doc
doc/conf.py
doc/index.rst
doc/overview.dia [deleted file]

index 52c3870a9f4bde3439201fb06b6f613e1340b4a9..aff578e131a9998d12100d0133c4a101029b4df8 100755 (executable)
@@ -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
index 4dab00c1604b5f0677cbabeee41460397e15118b..270ae996afd2f520bcdde571b742e298b8c7677b 100644 (file)
@@ -26,6 +26,7 @@ extensions = [
     'sphinx.ext.graphviz',
     'sphinx.ext.todo',
     'breathe',
+    'sphinx_ditaa',
     ]
 todo_include_todos = True
 
index 28bda23342ad74ebe4301c225aed68350e18d354..f5e2e732164f4bce5e4d72467a70e7dae577570f 100644 (file)
@@ -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 (file)
index ff34785..0000000
Binary files a/doc/overview.dia and /dev/null differ