~jelmer/loggerhead/breezy-compat

« back to all changes in this revision

Viewing changes to docs/index.rst

  • Committer: Colin Watson
  • Date: 2019-09-19 08:10:36 UTC
  • mfrom: (491.2.62 breezy)
  • Revision ID: cjwatson@canonical.com-20190919081036-q1symc2h2iedtlh3
[r=cjwatson] Switch loggerhead over to using the Breezy rather than Bazaar APIs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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 Breezy. It can be used to navigate
5
5
a branch history, annotate files, view patches, perform searches, etc.
6
6
Loggerhead is heavily based on `bazaar-webserve
7
7
<https://launchpad.net/bzr-webserve>`_, which was, in turn, loosely
53
53
----------------------------------------
54
54
 
55
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
 
56
:command:`loggerhead-serve` with the branch you want to serve on the
57
57
command line:
58
58
 
59
59
.. code-block:: sh
60
60
 
61
 
    ./serve-branches ~/path/to/branch
 
61
    ./loggerhead-serve ~/path/to/branch
62
62
 
63
63
By default, the script listens on port 8080, so head to
64
64
http://localhost:8080/ in your browser to see the branch.
70
70
Loggerhead will notice and refresh, and Bazaar uses its own branch
71
71
locking to prevent corruption.
72
72
 
73
 
See :doc:`serve-branches` for all command line options.
 
73
See :doc:`loggerhead-serve` for all command line options.
74
74
 
75
75
Running Loggerhead as a Daemon
76
76
------------------------------
84
84
   $ sudo cp ./loggerheadd /etc/init.d
85
85
 
86
86
2) Edit the file to configure where your Loggerhead is installed, and which
87
 
   serve-branches options you would like.
 
87
   loggerhead-serve options you would like.
88
88
 
89
89
.. code-block:: sh
90
90
 
101
101
   $ sudo chkconfig --add loggerheadd
102
102
 
103
103
 
104
 
Using Loggerhead as a Bazaar Plugin
105
 
------------------------------------
 
104
Using Loggerhead as a Breezy Plugin
 
105
-----------------------------------
106
106
 
107
 
This branch contains experimental support for using Loggerhead as a Bazaar
 
107
This branch contains experimental support for using Loggerhead as a Breezy
108
108
plugin.  To use it, place the top-level Loggerhead directory (the one
109
 
containing COPYING.txt) at ``~/.bazaar/plugins/loggerhead``.  E.g.:
 
109
containing COPYING.txt) at ``~/.config/breezy/plugins/loggerhead``.  E.g.:
110
110
 
111
111
.. code-block:: sh
112
112
 
113
 
   $ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
 
113
   $ bzr branch lp:loggerhead ~/.config/breezy/plugins/loggerhead
114
114
   $ cd ~/myproject
115
115
   $ bzr serve --http
116
116
 
118
118
Using a Config File
119
119
-------------------
120
120
 
121
 
To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
 
121
To hide branches from being displayed, add to ``~/.config/breezy/locations.conf``,
122
122
under the branch's section:
123
123
 
124
124
.. code-block:: ini
132
132
Serving Loggerhead behind Apache
133
133
--------------------------------
134
134
 
135
 
If you want to view Bazaar branches from your existing Apache
 
135
If you want to view Breezy branches from your existing Apache
136
136
installation, you'll need to configure Apache to proxy certain
137
137
requests to Loggerhead.  Adding lines like this to your Apache
138
138
configuration is one way to do this:
144
144
        ProxyPassReverse http://127.0.0.1:8080/branches/
145
145
    </Location>
146
146
 
147
 
If Paste Deploy is installed, the :command:`serve-branches` script can be
 
147
If Paste Deploy is installed, the :command:`loggerhead-serve` script can be
148
148
run behind a proxy at the root of a site, but if you're running it at
149
149
some path into the site, you'll need to specify it using
150
150
``--prefix=/some_path``.
154
154
 
155
155
A second method for using Loggerhead with apache is to have apache itself
156
156
execute Loggerhead via mod_wsgi.  You need to add configuration for apache and
157
 
for bazaar to make this work.  Example config files are in the Loggerhead doc
158
 
directory as apache-loggerhead.conf and bazaar.conf.  You can copy them into
 
157
for breezy to make this work.  Example config files are in the Loggerhead doc
 
158
directory as apache-loggerhead.conf and breezy.conf.  You can copy them into
159
159
place and use them as a starting point following these directions:
160
160
 
161
161
1) Install mod_wsgi.  On Ubuntu and other Debian derived distros::
166
166
 
167
167
    su -c yum install mod_wsgi
168
168
 
169
 
2) Copy the bazaar.conf file where apache will find it (May be done for you if
 
169
2) Copy the breezy.conf file where apache will find it (May be done for you if
170
170
   you installed Loggerhead from a distribution package)::
171
171
 
172
172
    # install -d -o apache -g apache -m 0755 /etc/loggerhead
173
 
    # cp -p /usr/share/doc/loggerhead*/bazaar.conf /etc/loggerhead/
174
 
    # ln -s /etc/loggerhead /var/www/.bazaar
 
173
    # cp -p /usr/share/doc/loggerhead*/breezy.conf /etc/loggerhead/
 
174
    # mkdir -p /var/www/.config
 
175
    # ln -s /etc/loggerhead /var/www/.config/breezy
175
176
 
176
177
3) Create the cache directory (May be done for you if you installed Loggerhead
177
178
   from a distribution package)::
178
179
 
179
180
    # install -d -o apache -g apache -m 0700 /var/cache/loggerhead/
180
181
 
181
 
4) Edit /etc/loggerhead/bazaar.conf.  You need to set http_root_dir to the filesystem
 
182
4) Edit /etc/loggerhead/breezy.conf.  You need to set http_root_dir to the filesystem
182
183
   path that you will find your bzr branches under.  Note that normal
183
184
   directories under that path will also be visible in Loggerhead.
184
185
 
188
189
 
189
190
6) Edit /etc/httpd/conf.d/loggerhead.conf to point to the url you desire to
190
191
   serve Loggerhead on.  This should match with the setting for
191
 
   http_user_prefix in bazaar.conf
 
192
   http_user_prefix in breezy.conf
192
193
 
193
194
7) Restart apache and you should be able to start browsing
194
195
 
220
221
.. toctree::
221
222
   :maxdepth: 2
222
223
 
223
 
   serve-branches
 
224
   loggerhead-serve
224
225
 
225
226
 
226
227
Support