~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to docs/index.rst

  • Committer: Martin Albisetti
  • Date: 2008-08-19 12:54:33 UTC
  • Revision ID: argentina@gmail.com-20080819125433-li7v1yi48747atc2
Change footer text to something sensible

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
loggerhead:  A web viewer for ``bzr`` branches
2
 
==============================================
3
 
 
4
 
Loggerhead is a web viewer for projects in bazaar. It can be used to navigate 
5
 
a branch history, annotate files, view patches, perform searches, etc.
6
 
oggerhead is heavily based on `bazaar-webserve
7
 
<https://launchpad.net/bzr-webserve>`_, which was, in turn, loosely
8
 
based on `hgweb <http://mercurial.selenic.com/wiki/HgWebDirStepByStep>`_.
9
 
 
10
 
 
11
 
Getting Started
12
 
---------------
13
 
 
14
 
Loggerhead depends on the following Python libraries.:
15
 
 
16
 
- SimpleTAL for templating.
17
 
 
18
 
- simplejson for producing JSON data.
19
 
 
20
 
- Paste for the server. (You need version 1.2 or newer of Paste.)
21
 
 
22
 
- Paste Deploy  (optional, needed when proxying through Apache)
23
 
 
24
 
- flup (optional, needed to use FastCGI, SCGI or AJP)
25
 
 
26
 
 
27
 
Installing Dependencies Using Ubuntu Packages
28
 
#############################################
29
 
 
30
 
.. code-block:: sh
31
 
 
32
 
   $ sudo apt-get install python-simpletal
33
 
   $ sudo apt-get install python-simplejson
34
 
   $ sudo apt-get install python-paste
35
 
   $ sudo apt-get install python-pastedeploy
36
 
   $ sudo apt-get install python-flup
37
 
 
38
 
Installing Dependencies Using :command:`easy_install`
39
 
#####################################################
40
 
 
41
 
.. code-block:: sh
42
 
 
43
 
   $ easy_install \
44
 
     -f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
45
 
     SimpleTAL
46
 
   $ easy_install simplejson
47
 
   $ easy_install Paste
48
 
   $ easy_install PasteDeploy
49
 
   $ easy_install flup
50
 
 
51
 
 
52
 
Running the Standalone Loggerhead Server
53
 
----------------------------------------
54
 
 
55
 
After installing all the dependencies, you should be able to run
56
 
:command:`serve-branches` with the branch you want to serve on the
57
 
command line:
58
 
 
59
 
.. code-block:: sh
60
 
 
61
 
    ./serve-branches ~/path/to/branch
62
 
 
63
 
By default, the script listens on port 8080, so head to
64
 
http://localhost:8080/ in your browser to see the branch.
65
 
 
66
 
You can also pass a directory that contains branches to the script,
67
 
and it will serve a very simple directory listing at other pages.
68
 
 
69
 
You may update the Bazaar branches being viewed at any time.
70
 
Loggerhead will notice and refresh, and Bazaar uses its own branch
71
 
locking to prevent corruption.
72
 
 
73
 
See :doc:`serve-branches` for all command line options.
74
 
 
75
 
Running Loggerhead as a Daemon
76
 
------------------------------
77
 
 
78
 
To run loggerhead as a linux daemon:
79
 
 
80
 
1) Copy the ``loggerheadd`` scipt to ``/etc/init.d``
81
 
 
82
 
.. code-block:: sh
83
 
 
84
 
   $ sudo cp ./loggerheadd /etc/init.d
85
 
 
86
 
2) Edit the file to configure where your loggerhead is installed, and which
87
 
   serve-branches options you would like.
88
 
 
89
 
.. code-block:: sh
90
 
 
91
 
   $ sudo vim /etc/init.d/loggerheadd
92
 
 
93
 
3) Register the service
94
 
 
95
 
a) on upstart based systems like Ubuntu run: 
96
 
 
97
 
.. code-block:: sh
98
 
 
99
 
   $ sudo update-rc.d loggerheadd defaults
100
 
 
101
 
b) on Sysvinit based systems like Centos or SuSE run:
102
 
 
103
 
.. code-block:: sh
104
 
 
105
 
   $ sudo chkconfig --add loggerheadd
106
 
 
107
 
 
108
 
Using Loggerhead as a Bazaar Plugin
109
 
------------------------------------
110
 
 
111
 
This branch contains experimental support for using Loggerhead as a Bazaar
112
 
plugin.  To use it, place the top-level Loggerhead directory (the one
113
 
containing this file) at ``~/.bazaar/plugins/loggerhead``.  E.g.:
114
 
 
115
 
.. code-block:: sh
116
 
 
117
 
   $ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
118
 
   $ cd ~/myproject
119
 
   $ bzr serve --http
120
 
 
121
 
 
122
 
Using a Config File
123
 
-------------------
124
 
 
125
 
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
126
 
under the branch's section:
127
 
 
128
 
.. code-block:: ini
129
 
 
130
 
    [/path/to/branch]
131
 
    http_serve = False
132
 
 
133
 
More configuration options to come soon.
134
 
 
135
 
 
136
 
Serving Loggerhead from Behind Apache
137
 
-------------------------------------
138
 
 
139
 
If you want to view Bazaar branches from your existing Apache
140
 
installation, you'll need to configure Apache to proxy certain
141
 
requests to Loggerhead.  Adding lines like this to you Apache
142
 
configuration is one way to do this:
143
 
 
144
 
.. code-block:: apache
145
 
 
146
 
    <Location "/branches/">
147
 
        ProxyPass http://127.0.0.1:8080/branches/
148
 
        ProxyPassReverse http://127.0.0.1:8080/branches/
149
 
    </Location>
150
 
 
151
 
If Paste Deploy is installed, the :command:`serve-branches` script can be
152
 
run behind a proxy at the root of a site, but if you're running it at
153
 
some path into the site, you'll need to specify is using
154
 
``--prefix=/some_path``.
155
 
 
156
 
 
157
 
Search
158
 
------
159
 
 
160
 
Search is currently supported by using the bzr-search plugin (available
161
 
at: https://launchpad.net/bzr-search ).
162
 
 
163
 
You need to have the plugin installed and each branch indexed to allow
164
 
searching on branches.
165
 
 
166
 
Command-Line Reference
167
 
----------------------
168
 
 
169
 
.. toctree::
170
 
   :maxdepth: 2
171
 
 
172
 
   serve-branches
173
 
   start-loggerhead
174
 
   stop-loggerhead
175
 
 
176
 
 
177
 
Support
178
 
-------
179
 
 
180
 
Discussion should take place on the bazaar-dev mailing list at
181
 
mailto:bazaar@lists.canonical.com.  You can join the list at
182
 
<https://lists.ubuntu.com/mailman/listinfo/bazaar>.  You don't need to
183
 
subscribe to post, but your first post will be held briefly for manual
184
 
moderation.
185
 
 
186
 
Bugs are tracked on Launchpad; start at:
187
 
 
188
 
    https://bugs.launchpad.net/loggerhead
189
 
 
190
 
 
191
 
Hacking
192
 
-------
193
 
 
194
 
To run loggerhead tests, you will need to install the package ``python-nose``,
195
 
and run its :command:`nosetests` script in the loggerhead directory:
196
 
 
197
 
.. code-block:: sh
198
 
 
199
 
    nosetests
200
 
 
201
 
 
202
 
License
203
 
-------
204
 
 
205
 
GNU GPLv2 or later.
206
 
 
207
 
See Also
208
 
--------
209
 
 
210
 
https://launchpad.net/loggerhead
211
 
 
212
 
Index
213
 
=====
214
 
 
215
 
- :ref:`genindex`