Code

Added some words to the installation doc about choosing backends.
[roundup.git] / doc / installation.txt
1 ==================
2 Installing Roundup
3 ==================
5 :Version: $Revision: 1.24 $
7 .. contents::
10 Overview
11 ========
13 Broken out separately, there are several conceptual pieces to a
14 Roundup installation:
16 Roundup support code
17  Installed into your Python install's lib directory
19 Roundup scripts
20  These include the email gateway, the roundup
21  HTTP server, the roundup administration command-line interface, etc.
23 Roundup trackers
24  Trackers consist of core support files, issues
25  (be they bug reports or otherwise), tracker configuration file(s),
26  etc.  Roundup trackers also adhere to a specific "Template" which
27  defines the fields usable/assignable on a per-issue basis.  A
28  description of the provided templates follows.
30 Classic Template
31 ----------------
33 The classic template is the one defined in the `Roundup Specification`_. It
34 holds issues which have priorities and statuses. Each issue may also have a
35 set of messages which are disseminated to the issue's list of nosy users.
38 Backends
39 --------
41 The actual storage of Roundup tracker information is handled by backends.
42 There's several to choose from, each with benefits and limitations:
44 **anydbm**
45   This backend is guaranteed to work on any system that Python runs on. It
46   will generally choose the best *dbm backend that is available on your system
47   (from the list dbhash, gdbm, dbm, dumbdbm). It is the least scaleable of all
48   backends, but performs well enough for a smallish tracker (a couple of
49   thousand issues, under fifty users, ...).
50 **bsddb**
51   This effectively the same as anydbm, but uses the bsddb backend. This allows
52   it to gain some performance and scaling benefits.
53 **bsddb3**
54   Again, this effectively the same as anydbm, but uses the bsddb3 backend.
55   This allows it to gain some performance and scaling benefits.
56 **sqlite**
57   This uses the SQLite embedded RDBMS to provide a fast, scaleable backend.
58   There are no limitations.
59 **gadfly**
60   This is a proof-of-concept relational database backend, not really intended
61   for actual production use, although it can be. It uses the Gadfly RDBMS
62   to store data. It is unable to perform string searches due to gadfly not
63   having a LIKE operation. It should scale well, assuming a client/server
64   setup is used.
65 **metakit**
66   This backend is implemented over the metakit storage system, using Mk4Py as
67   the interface. It scales much better than the *dbm backends, but has some
68   missing features:
70   - you may not unset properties once they are set
71   - journal retrieval is not implemented 
74 Prerequisites
75 =============
77 Python 2.1.1 or newer with a functioning anydbm or bsddb module. Download the
78 latest version from http://www.python.org/. It is highly recommended that
79 users install the latest patch version of python - 2.1.3 or 2.2.1 - as these
80 contain many fixes to serious bugs.
82 If you want to use Berkeley DB bsddb3 with Roundup, use version 3.3.0 or
83 later. Download the latest version from http://pybsddb.sourceforge.net/.
86 Getting Roundup
87 ===============
89 Download the latest version from http://roundup.sf.net/.
91 Testing your Python
92 -------------------
94 Once you've unpacked roundup's source, run ``python ./run_tests`` in the
95 source directory and make sure there are no errors.
96 If there are errors, please let us know!
98 If the above fails, you may be using the wrong version of python. Try
99 ``python2 ./run_tests``. If that works, you will need to substitute
100 ``python2`` for ``python`` in all further commands you use in relation to
101 Roundup -- from installation and scripts.
104 Installation
105 ============
107 Set aside 15-30 minutes. Please make sure you're using a supported version of
108 Python -- see `testing your python`_. There's three sections to this
109 installation guide:
111 1. `basic installation steps`_ that all installers must follow
112 2. `shared environment steps`_ to take if you're installing on a shared
113     UNIX machine and want to restrict local access to roundup
114 3. `internet setup`_ steps to take if your tracker is to be used by the wider
115     internet community
117 Most users will only need to follow the first step, since the environment will
118 be a trusted one.
121 Basic Installation Steps
122 ------------------------
124 1. To install the Roundup support code into your Python tree and
125    Roundup scripts into /usr/local/bin::
127        python setup.py install
129    If you would like to place the Roundup scripts in a directory other
130    than ``/usr/local/bin``, then specify the preferred location with
131    ``--install-script``. For example, to install them in
132    ``/opt/roundup/bin``::
134        python setup.py install --install-scripts=/opt/roundup/bin
136 2. To create a Roundup tracker (necessary to do before you can
137    use the software in any real fashion):
139    a. (Optional) If you intend to keep your roundup trackers
140       under one top level directory which does not exist yet,
141       you should create that directory now.  Example:
143          mkdir /opt/roundup/trackers
145    b. Either add the Roundup script location to your ``PATH``
146       environment variable or specify the full path to
147       the command in the next step.
149    c.  ``roundup-admin install``
151       You will be asked a series of questions.  A description of
152       the Roundup-provided templates can be found under the Overview_::
154           Enter tracker home: /opt/roundup/trackers/support
155           Templates: classic, extended
156           Select template [classic]: classic
157           Back ends: anydbm, bsddb
158           Select backend [anydbm]: anydbm
160       You will now be directed to edit the tracker configuration and
161       initial schema. See `Customising Roundup`_ for details on configuration
162       and schema changes. Note that you may change any of the configuration
163       after you've initialised the tracker - it's just better to have valid
164       values for this stuff now.
166    d.  ``roundup-admin initialise``
168       This step initialises the tracker database. You will need to supply
169       an admin password at this step. You will be prompted::
171           Admin Password:
172                  Confirm:
174       Once this is done, the tracker has been created.
176 3. XXX Set up the CGI interface
178 4. XXX Set up the mail gateway
181 Shared Environment Steps
182 ------------------------
184 Each tracker ideally should have its own UNIX group, so create
185 a UNIX group (edit ``/etc/group`` or your appropriate NIS map if
186 you're using NIS).  To continue with my examples so far, I would
187 create the UNIX group 'support', although the name of the UNIX
188 group does not have to be the same as the tracker name.  To this
189 'support' group I then add all of the UNIX usernames who will be
190 working with this Roundup tracker.  In addition to 'real' users,
191 the Roundup email gateway will need to have permissions to this
192 area as well, so add the user your mail service runs as to the
193 group.  The UNIX group might then look like::
195      support:*:1002:jblaine,samh,geezer,mail
197 If you intend to use the web interface (as most people do), you
198 should also add the username your web server runs as to the group.
199 My group now looks like this::
201      support:*:1002:jblaine,samh,geezer,mail,apache
203 The tracker "db" directory should be chmod'ed g+sw so that the group can
204 write to the database, and any new files created in the database will be owned
205 by the group.
207 An alternative to the above is to create a new user who has the sole
208 responsibility of running roundup. This user:
210 1. runs the CGI interface daemon
211 2. runs regular polls for email
212 3. runs regular checks (using cron) to ensure the daemon is up
213 4. optionally has no login password so that nobody but the "root" user
214    may actually login and play with the roundup setup.
216 Internet Setup
217 --------------
219 1. There are two supported ways to get emailed issues into the
220    Roundup tracker.  You should pick ONE of the following, both
221    of which will continue my example setup from above:
223    a. Set up a mail alias called "support" as::
225        "|/opt/roundup/bin/roundup-mailgw /opt/roundup/trackers/support"
227       If you use Sendmail's ``smrsh`` mechanism, please read the notes
228       under 'Platform-Specific Notes'
230    b. OR... Configure roundup-mailgw to run every 10 minutes or
231       so via ``cron``.  My cron job would be (these 2 lines all on one
232       line)::
234        10 * * * * /opt/roundup/bin/roundup-mailgw
235                 /opt/roundup/trackers/support /var/mail/support
237    If you don't want to use the email component of Roundup, then remove the
238    "``nosyreator.py``" module from your tracker "``detectors``" directory.
240 2. Test the email gateway.  Under most flavors of UNIX, this
241    can be done by::
243      echo test | mail -s '[issue] test' support@YOUR_DOMAIN_HERE
245 XXX mention HTTPS
246 XXX mention Basic vs. cookie auth
249 Upgrading
250 =========
252 Read the separate `upgrading document`_, which describes the steps needed to
253 upgrade existing tracker trackers for each version of Roundup that is
254 released.
257 ZRoundup
258 ========
260 Install roundup as usual (see installation_).
262 ZRoundup installs as a regular Zope product. Copy the ZRoundup directory to
263 your Products directory either in an TRACKER_HOME/Products or the Zope
264 code tree lib/python/Products.
266 You will need to create the tracker using the roundup-admin tool (step 2 in
267 installation_).
269 When you next (re)start up Zope, you will be able to add a ZRoundup object
270 that interfaces to your new tracker.
273 Further Reading
274 ===============
276 If you intend to use Roundup with anything other than the defualt
277 templates, if you would like to hack on Roundup, or if you would
278 like implementation details, you should read `Customising Roundup`_.
281 Platform-Specific Notes
282 =======================
284 Sendmail smrsh
285 --------------
287 If you use Sendmail's ``smrsh`` mechanism, you will need to tell
288 smrsh that roundup-mailgw is a valid/trusted mail handler
289 before it will work.
291 This is usually done via the following 2 steps:
293 1. make a symlink in ``/etc/smrsh`` called ``roundup-mailgw``
294    which points to the full path of your actual ``roundup-mailgw``
295    script.
297 2. change your alias to ``"|roundup-mailgw <tracker_home>"``
300 Linux
301 -----
303 Python 2.1.1 as shipped with SuSE7.3 might be missing module
304 ``_weakref``.
306 -------------------------------------------------------------------------------
308 Back to `Table of Contents`_
310 Next: `Getting Started`_
312 .. _`table of contents`: index.html
313 .. _`getting started`: getting_started.html
314 .. _`roundup specification`: spec.html
315 .. _`customising roundup`: customizing.html
316 .. _`upgrading document`: upgrading.html