Statistics
| Branch: | Tag: | Revision:

root / doc / devnotes.rst @ fd0bc853

History | View | Annotate | Download (3 kB)

1 832aef24 Michael Hanselmann
Developer notes
2 832aef24 Michael Hanselmann
===============
3 832aef24 Michael Hanselmann
4 b2fc7ea1 Michael Hanselmann
Build dependencies
5 b2fc7ea1 Michael Hanselmann
------------------
6 b2fc7ea1 Michael Hanselmann
7 77a180f6 Iustin Pop
Most dependencies from :doc:`install-quick`, plus (for Python):
8 cbf3d64b Michael Hanselmann
9 c27ba1cc Michael Hanselmann
- `GNU make <http://www.gnu.org/software/make/>`_
10 c27ba1cc Michael Hanselmann
- `GNU tar <http://www.gnu.org/software/tar/>`_
11 c27ba1cc Michael Hanselmann
- `Gzip <http://www.gnu.org/software/gzip/>`_
12 18e2b6e4 Iustin Pop
- `pandoc <http://johnmacfarlane.net/pandoc/>`_
13 c27ba1cc Michael Hanselmann
- `python-sphinx <http://sphinx.pocoo.org/>`_
14 c27ba1cc Michael Hanselmann
  (tested with version 0.6.1)
15 c27ba1cc Michael Hanselmann
- `graphviz <http://www.graphviz.org/>`_
16 1de45c78 Guido Trotter
- the `en_US.UTF-8` locale must be enabled on the system
17 77a180f6 Iustin Pop
- `pylint <http://www.logilab.org/857>`_ and its associated
18 77a180f6 Iustin Pop
  dependencies
19 77a180f6 Iustin Pop
20 77a180f6 Iustin Pop
Note that for pylint, at the current moment the following versions
21 77a180f6 Iustin Pop
need to be used::
22 77a180f6 Iustin Pop
23 77a180f6 Iustin Pop
    $ pylint --version
24 77a180f6 Iustin Pop
    pylint 0.21.1,
25 77a180f6 Iustin Pop
    astng 0.20.1, common 0.50.3
26 b2fc7ea1 Michael Hanselmann
27 27e336af Michael Hanselmann
To generate unittest coverage reports (``make coverage``), `coverage
28 27e336af Michael Hanselmann
<http://pypi.python.org/pypi/coverage>`_ needs to be installed.
29 27e336af Michael Hanselmann
30 77a180f6 Iustin Pop
For Haskell development, again all things from the quick install
31 77a180f6 Iustin Pop
document, plus:
32 77a180f6 Iustin Pop
33 77a180f6 Iustin Pop
- `haddock <http://www.haskell.org/haddock/>`_, documentation
34 77a180f6 Iustin Pop
  generator (equivalent to epydoc for Python)
35 77a180f6 Iustin Pop
- `HsColour <http://hackage.haskell.org/package/hscolour>`_, again
36 77a180f6 Iustin Pop
  used for documentation (it's source-code pretty-printing)
37 77a180f6 Iustin Pop
- `hlint <http://community.haskell.org/~ndm/hlint/>`_, a source code
38 77a180f6 Iustin Pop
  linter (equivalent to pylint for Python)
39 77a180f6 Iustin Pop
- the `QuickCheck <http://hackage.haskell.org/package/QuickCheck>`_
40 77a180f6 Iustin Pop
  library, version 1.x
41 fd0bc853 Iustin Pop
- ``hpc``, which comes with the compiler, so you should already have
42 fd0bc853 Iustin Pop
  it
43 fd0bc853 Iustin Pop
44 fd0bc853 Iustin Pop
Under Debian, these can be installed (on top of the required ones from
45 fd0bc853 Iustin Pop
the quick install document) via::
46 fd0bc853 Iustin Pop
47 fd0bc853 Iustin Pop
  apt-get install libghc6-quickcheck1-dev hscolour hlint
48 77a180f6 Iustin Pop
49 b2fc7ea1 Michael Hanselmann
50 832aef24 Michael Hanselmann
Configuring for development
51 832aef24 Michael Hanselmann
---------------------------
52 832aef24 Michael Hanselmann
53 c27ba1cc Michael Hanselmann
.. highlight:: sh
54 c27ba1cc Michael Hanselmann
55 d17e74b4 Iustin Pop
Run the following command (only use ``PYTHON=...`` if you need to use a
56 d17e74b4 Iustin Pop
different python version)::
57 d17e74b4 Iustin Pop
58 62947ebb Michael Hanselmann
  ./autogen.sh && \
59 b3a8bebf Michael Hanselmann
  ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var
60 558fd122 Michael Hanselmann
61 94338f0a Michael Hanselmann
62 94338f0a Michael Hanselmann
Packaging notes
63 94338f0a Michael Hanselmann
===============
64 94338f0a Michael Hanselmann
65 94338f0a Michael Hanselmann
Ganeti is mostly developped and tested on `Debian
66 94338f0a Michael Hanselmann
<http://www.debian.org/>`_-based distributions, while still keeping
67 94338f0a Michael Hanselmann
adoptability to other Linux distributions in mind.
68 94338f0a Michael Hanselmann
69 94338f0a Michael Hanselmann
The ``doc/examples/`` directory contains a number of potentially useful
70 94338f0a Michael Hanselmann
scripts and configuration files. Some of them might need adjustment
71 94338f0a Michael Hanselmann
before use.
72 94338f0a Michael Hanselmann
73 94338f0a Michael Hanselmann
``daemon-util``
74 94338f0a Michael Hanselmann
---------------
75 94338f0a Michael Hanselmann
76 94338f0a Michael Hanselmann
This script, in the source code as ``daemons/daemon-util.in``, is used
77 94338f0a Michael Hanselmann
to start/stop Ganeti and do a few other things related to system
78 77a180f6 Iustin Pop
daemons. It is recommended to use ``daemon-util`` also from the system's
79 94338f0a Michael Hanselmann
init scripts. That way the code starting and stopping daemons is shared
80 94338f0a Michael Hanselmann
and future changes have to be made in only one place.
81 94338f0a Michael Hanselmann
82 94338f0a Michael Hanselmann
``daemon-util`` reads extra arguments from variables (``*_ARGS``) in
83 94338f0a Michael Hanselmann
``/etc/default/ganeti``. When modifying ``daemon-util``, keep in mind to
84 94338f0a Michael Hanselmann
not remove support for the ``EXTRA_*_ARGS`` variables for starting
85 94338f0a Michael Hanselmann
daemons. Some parts of Ganeti use them to pass additional arguments when
86 94338f0a Michael Hanselmann
starting a daemon.
87 94338f0a Michael Hanselmann
88 94338f0a Michael Hanselmann
The ``reload_ssh_keys`` function can be adjusted to use another command
89 94338f0a Michael Hanselmann
for reloading the OpenSSH daemon's host keys.
90 94338f0a Michael Hanselmann
91 558fd122 Michael Hanselmann
.. vim: set textwidth=72 :