Statistics
| Branch: | Tag: | Revision:

root / doc / devnotes.rst @ fd0bc853

History | View | Annotate | Download (3 kB)

1
Developer notes
2
===============
3

    
4
Build dependencies
5
------------------
6

    
7
Most dependencies from :doc:`install-quick`, plus (for Python):
8

    
9
- `GNU make <http://www.gnu.org/software/make/>`_
10
- `GNU tar <http://www.gnu.org/software/tar/>`_
11
- `Gzip <http://www.gnu.org/software/gzip/>`_
12
- `pandoc <http://johnmacfarlane.net/pandoc/>`_
13
- `python-sphinx <http://sphinx.pocoo.org/>`_
14
  (tested with version 0.6.1)
15
- `graphviz <http://www.graphviz.org/>`_
16
- the `en_US.UTF-8` locale must be enabled on the system
17
- `pylint <http://www.logilab.org/857>`_ and its associated
18
  dependencies
19

    
20
Note that for pylint, at the current moment the following versions
21
need to be used::
22

    
23
    $ pylint --version
24
    pylint 0.21.1,
25
    astng 0.20.1, common 0.50.3
26

    
27
To generate unittest coverage reports (``make coverage``), `coverage
28
<http://pypi.python.org/pypi/coverage>`_ needs to be installed.
29

    
30
For Haskell development, again all things from the quick install
31
document, plus:
32

    
33
- `haddock <http://www.haskell.org/haddock/>`_, documentation
34
  generator (equivalent to epydoc for Python)
35
- `HsColour <http://hackage.haskell.org/package/hscolour>`_, again
36
  used for documentation (it's source-code pretty-printing)
37
- `hlint <http://community.haskell.org/~ndm/hlint/>`_, a source code
38
  linter (equivalent to pylint for Python)
39
- the `QuickCheck <http://hackage.haskell.org/package/QuickCheck>`_
40
  library, version 1.x
41
- ``hpc``, which comes with the compiler, so you should already have
42
  it
43

    
44
Under Debian, these can be installed (on top of the required ones from
45
the quick install document) via::
46

    
47
  apt-get install libghc6-quickcheck1-dev hscolour hlint
48

    
49

    
50
Configuring for development
51
---------------------------
52

    
53
.. highlight:: sh
54

    
55
Run the following command (only use ``PYTHON=...`` if you need to use a
56
different python version)::
57

    
58
  ./autogen.sh && \
59
  ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var
60

    
61

    
62
Packaging notes
63
===============
64

    
65
Ganeti is mostly developped and tested on `Debian
66
<http://www.debian.org/>`_-based distributions, while still keeping
67
adoptability to other Linux distributions in mind.
68

    
69
The ``doc/examples/`` directory contains a number of potentially useful
70
scripts and configuration files. Some of them might need adjustment
71
before use.
72

    
73
``daemon-util``
74
---------------
75

    
76
This script, in the source code as ``daemons/daemon-util.in``, is used
77
to start/stop Ganeti and do a few other things related to system
78
daemons. It is recommended to use ``daemon-util`` also from the system's
79
init scripts. That way the code starting and stopping daemons is shared
80
and future changes have to be made in only one place.
81

    
82
``daemon-util`` reads extra arguments from variables (``*_ARGS``) in
83
``/etc/default/ganeti``. When modifying ``daemon-util``, keep in mind to
84
not remove support for the ``EXTRA_*_ARGS`` variables for starting
85
daemons. Some parts of Ganeti use them to pass additional arguments when
86
starting a daemon.
87

    
88
The ``reload_ssh_keys`` function can be adjusted to use another command
89
for reloading the OpenSSH daemon's host keys.
90

    
91
.. vim: set textwidth=72 :