~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to docs/index.rst

  • Committer: John Arbash Meinel
  • Date: 2011-03-16 11:39:27 UTC
  • mto: This revision was merged to the branch mainline in revision 435.
  • Revision ID: john@arbash-meinel.com-20110316113927-t2e1h8n1tsal9zpi
When logging to stderr, we don't really need the timestamp and branch name.
It is nice in a long-term log file, but to stderr it tends to just cause
the output to wrap, which is ugly.

Show diffs side-by-side

added added

removed removed

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