Code

svn repository setup
[roundup.git] / doc / installation.txt
1 ==================
2 Installing Roundup
3 ==================
5 :Version: $Revision: 1.130 $
7 .. contents::
8    :depth: 2
11 Overview
12 ========
14 Broken out separately, there are several conceptual pieces to a
15 Roundup installation:
17 Roundup trackers
18  Trackers consist of issues (be they bug reports or otherwise), tracker
19  configuration file(s), web HTML files etc. Roundup trackers are initialised
20  with a "Template" which defines the fields usable/assignable on a
21  per-issue basis.  Descriptions of the provided templates are given in
22  `choosing your template`_.
24 Roundup support code
25  Installed into your Python install's lib directory.
27 Roundup scripts
28  These include the email gateway, the roundup
29  HTTP server, the roundup administration command-line interface, etc.
32 Prerequisites
33 =============
35 Roundup requires Python 2.3 or newer with a functioning anydbm
36 module. Download the latest version from http://www.python.org/.
37 It is highly recommended that users install the latest patch version
38 of python as these contain many fixes to serious bugs.
40 Some variants of Linux will need an additional "python dev" package
41 installed for Roundup installation to work. Debian and derivatives, are
42 known to require this.
44 If you're on windows, you will either need to be using the ActiveState python
45 distribution (at http://www.activestate.com/Products/ActivePython/), or you'll
46 have to install the win32all package separately (get it from
47 http://starship.python.net/crew/mhammond/win32/).
50 Optional Components
51 ===================
53 You may optionally install and use:
55 Timezone Definitions
56   Full timezone support requires pytz_ module (version 2005i or later)
57   which brings the `Olson tz database`_ into Python.  If pytz_ is not
58   installed, timezones may be specified as numeric hour offsets only.
60 An RDBMS
61   Sqlite, MySQL and Postgresql are all supported by Roundup and will be
62   used if available. One of these is recommended if you are anticipating a
63   large user base (see `choosing your backend`_ below).
65 Xapian full-text indexer
66   The Xapian_ full-text indexer is also supported and will be used by
67   default if it is available. This is strongly recommended if you are
68   anticipating a large number of issues (> 5000).
70   You may install Xapian at any time, even after a tracker has been
71   installed and used. You will need to run the "roundup-admin reindex"
72   command if the tracker has existing data.
74   Roundup requires Xapian *newer* than 0.9.2 - it may be necessary for
75   you to install a snapshot. Snapshot "0.9.2_svn6532" has been tried
76   successfully.
78 pyopenssl
79   If pyopenssl_ is installed the roundup-server can be configured
80   to serve trackers over SSL. If you are going to serve roundup via
81   proxy through a server with SSL support (e.g. apache) then this is
82   unnecessary.
84 pyme
85   If pyme_ is installed you can configure the mail gateway to perform
86   verification or decryption of incoming OpenPGP MIME messages. When
87   configured, you can require email to be cryptographically signed
88   before roundup will allow it to make modifications to issues.
90 .. _Xapian: http://www.xapian.org/
91 .. _pytz: http://www.python.org/pypi/pytz
92 .. _Olson tz database: http://www.twinsun.com/tz/tz-link.htm
93 .. _pyopenssl: http://pyopenssl.sourceforge.net
94 .. _pyme: http://pyme.sourceforge.net
97 Getting Roundup
98 ===============
100 .. note::
101     Some systems, such as Debian and NetBSD, already have Roundup
102     installed. Try running the command "roundup-admin" with no arguments,
103     and if it runs you may skip the `Basic Installation Steps`_
104     below and go straight to `configuring your first tracker`_.
106 Download the latest version from http://roundup.sf.net/.
108 If you're using WinZIP's "classic" interface, make sure the "Use
109 folder names" check box is checked before you extract the files.
112 For The Really Impatient
113 ========================
115 If you just want to give Roundup a whirl Right Now, then simply run
116 ``roundup-demo``.
118 This will set up a simple demo tracker on your machine. [1]_
119 When it's done, it'll print out a URL to point your web browser at
120 so you may start playing. Three users will be set up:
122 1. anonymous - the "default" user with permission to do very little
123 2. demo (password "demo") - a normal user who may create issues
124 3. admin (password "admin") - an administrative user who has complete
125    access to the tracker
127 .. [1] Demo tracker is set up to be accessed by localhost browser.
128        If you run demo on a server host, please stop the demo when
129        it has shown startup notice, open file ``demo/config.ini`` with
130        your editor, change host name in the ``web`` option in section
131        ``[tracker]``, save the file, then re-run the demo program.
133 Installation
134 ============
136 Set aside 15-30 minutes. There's several steps to follow in your
137 installation:
139 1. `basic installation steps`_ if Roundup is not installed on your system
140 2. `configuring your first tracker`_ that all installers must follow
141 3. then optionally `configure a web interface`_
142 4. and optionally `configure an email interface`_
143 5. `UNIX environment steps`_ to take if you're installing on a shared
144    UNIX machine and want to restrict local access to roundup
145 6. `additional language codecs`_
147 For information about how Roundup installs, see the `administration
148 guide`_.
151 Basic Installation Steps
152 ------------------------
154 To install the Roundup support code into your Python tree and
155 Roundup scripts into /usr/bin (substitute that path for whatever is
156 appropriate on your system). You need to have write permissions
157 for these locations, eg. being root on unix::
159     python setup.py install
161 If you would like to place the Roundup scripts in a directory other
162 than ``/usr/bin``, then specify the preferred location with
163 ``--install-scripts``. For example, to install them in
164 ``/opt/roundup/bin``::
166     python setup.py install --install-scripts=/opt/roundup/bin
168 You can also use the ``--prefix`` option to use a completely different
169 base directory, if you do not want to use administrator rights. If you
170 choose to do this, you may have to change Python's search path (sys.path)
171 yourself.
174 Configuring your first tracker
175 ------------------------------
177 1. To create a Roundup tracker (necessary to do before you can
178    use the software in any real fashion), you need to set up a "tracker
179    home":
181    a. (Optional) If you intend to keep your roundup trackers
182       under one top level directory which does not exist yet,
183       you should create that directory now.  Example::
185          mkdir /opt/roundup/trackers
187    b. Either add the Roundup script location to your ``PATH``
188       environment variable or specify the full path to
189       the command in the next step.
191    c. Install a new tracker with the command ``roundup-admin install``.
192       You will be asked a series of questions.  Descriptions of the provided
193       templates can be found in `choosing your template`_ below.  Descriptions
194       of the available backends can be found in `choosing your backend`_
195       below.  The questions will be something like (you may have more
196       templates or backends available)::
198           Enter tracker home: /opt/roundup/trackers/support
199           Templates: classic
200           Select template [classic]: classic
201           Back ends: anydbm, mysql, sqlite
202           Select backend [anydbm]: anydbm
204       Note: "Back ends" selection list depends on availability of
205       third-party database modules.  Standard python distribution
206       includes anydbm module only.
208       The "support" part of the tracker name can be anything you want - it
209       is going to be used as the directory that the tracker information
210       will be stored in.
212       You will now be directed to edit the tracker configuration and
213       initial schema.  At a minimum, you must set "main :: admin_email"
214       (that's the "admin_email" option in the "main" section) "mail ::
215       host", "tracker :: web" and "mail :: domain".  If you get stuck,
216       and get configuration file errors, then see the `tracker
217       configuration`_ section of the `customisation documentation`_.
219       If you just want to get set up to test things quickly (and follow
220       the instructions in step 3 below), you can even just set the
221       "tracker :: web" variable to::
223          web = http://localhost:8080/support/
225       The URL *must* end in a '/', or your web interface *will not work*.
226       See `Customising Roundup`_ for details on configuration and schema
227       changes. You may change any of the configuration after
228       you've initialised the tracker - it's just better to have valid values
229       for this stuff now.
231    d. Initialise the tracker database with ``roundup-admin initialise``.
232       You will need to supply an admin password at this step. You will be
233       prompted::
235           Admin Password:
236                  Confirm:
238       Note: running this command will *destroy any existing data in the
239       database*. In the case of MySQL and PostgreSQL, any exsting database
240       will be dropped and re-created.
242       Once this is done, the tracker has been created.
244 2. At this point, your tracker is set up, but doesn't have a nice user
245    interface. To set that up, we need to `configure a web interface`_ and
246    optionally `configure an email interface`_. If you want to try your
247    new tracker out, assuming "tracker :: web" is set to
248    ``'http://localhost:8080/support/'``, run::
250      roundup-server support=/opt/roundup/trackers/support
252    then direct your web browser at:
254      http://localhost:8080/support/
256    and you should see the tracker interface.
259 Choosing Your Template
260 ----------------------
262 Classic Template
263 ~~~~~~~~~~~~~~~~
265 The classic template is the one defined in the `Roundup Specification`_. It
266 holds issues which have priorities and statuses. Each issue may also have a
267 set of messages which are disseminated to the issue's list of nosy users.
269 Minimal Template
270 ~~~~~~~~~~~~~~~~
272 The minimal template has the minimum setup required for a tracker
273 installation. That is, it has the configuration files, defines a user database
274 and the basic HTML interface to that. It's a completely clean slate for you to
275 create your tracker on.
278 Choosing Your Backend
279 ---------------------
281 The actual storage of Roundup tracker information is handled by backends.
282 There's several to choose from, each with benefits and limitations:
284 ========== =========== ===== ==============================
285 Name       Speed       Users   Support
286 ========== =========== ===== ==============================
287 anydbm     Slowest     Few   Always available
288 sqlite     Fastest(*)  Few   May need install (PySQLite_)
289 postgresql Fast        Many  Needs install/admin (psycopg_)
290 mysql      Fast        Many  Needs install/admin (MySQLdb_)
291 ========== =========== ===== ==============================
293 **sqlite**
294   This uses the embedded database engine PySQLite_ to provide a very fast
295   backend. This is not suitable for trackers which will have many
296   simultaneous users, but requires much less installation and maintenance
297   effort than more scalable postgresql and mysql backends.
299   SQLite is supported via PySQLite versions 1.1.7, 2.1.0 and sqlite3 (the last
300   being bundled with Python 2.5+)
302   Installed SQLite should be the latest version available (3.3.8 is known
303   to work, 3.1.3 is known to have problems).
304 **postgresql**
305   Backend for popular RDBMS PostgreSQL. You must read doc/postgresql.txt for
306   additional installation steps and requirements. You must also configure
307   the ``rdbms`` section of your tracker's ``config.ini``.  It is recommended
308   that you use at least version 1.1.21 of psycopg.
309 **mysql**
310   Backend for popular RDBMS MySQL. You must read doc/mysql.txt for additional
311   installation steps and requirements. You must also configure the ``rdbms``
312   section of your tracker's ``config.ini``
314 You may defer your decision by setting your tracker up with the anydbm
315 backend (which is guaranteed to be available) and switching to one of the
316 other backends at any time using the instructions in the `administration
317 guide`_.
319 Regardless of which backend you choose, Roundup will attempt to initialise
320 a new database for you when you run the roundup-admin "initialise" command.
321 In the case of MySQL and PostgreSQL you will need to have the appropriate
322 privileges to create databases.
325 Configure a Web Interface
326 -------------------------
328 There are five web interfaces to choose from:
330 1. `web server cgi-bin`_
331 2. `stand-alone web server`_
332 3. `Zope product - ZRoundup`_
333 4. `Apache HTTP Server with mod_python`_
334 5. `WSGI handler`_
336 You may need to give the web server user permission to access the tracker home
337 - see the `UNIX environment steps`_ for information. You may also need to
338 configure your system in some way - see `platform-specific notes`_.
341 Web Server cgi-bin
342 ~~~~~~~~~~~~~~~~~~
344 A benefit of using the cgi-bin approach is that it's the easiest way to
345 restrict access to your tracker to only use HTTPS. Access will be slower
346 than through the `stand-alone web server`_ though.
348 If your Python isn't installed as "python" then you'll need to edit
349 the ``roundup.cgi`` script to fix the first line.
351 If you're using IIS on a Windows platform, you'll need to run this command
352 for the cgi to work (it turns on the PATH_INFO cgi variable)::
354     adsutil.vbs set w3svc/AllowPathInfoForScriptMappings TRUE
356 The ``adsutil.vbs`` file can be found in either ``c:\inetpub\adminscripts``
357 or ``c:\winnt\system32\inetsrv\adminsamples\`` or
358 ``c:\winnt\system32\inetsrv\adminscripts\`` depending on your installation.
360 More information about ISS setup may be found at:
362    http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494
364 Copy the ``frontends/roundup.cgi`` file to your web server's ``cgi-bin``
365 directory. You will need to configure it to tell it where your tracker home
366 is. You can do this either:
368 Through an environment variable
369   Set the variable TRACKER_HOMES to be a colon (":") separated list of
370   name=home pairs (if you're using apache, the SetEnv directive can do this)
372 Directly in the ``roundup.cgi`` file itself
373   Add your instance to the TRACKER_HOMES variable as ``'name': 'home'``
375 The "name" part of the configuration will appear in the URL and identifies the
376 tracker (so you may have more than one tracker per cgi-bin script). Make sure
377 there are no spaces or other illegal characters in it (to be safe, stick to
378 letters and numbers). The "name" forms part of the URL that appears in the
379 tracker config "tracker :: web" variable, so make sure they match. The "home"
380 part of the configuration is the tracker home directory.
382 If you're using Apache, you can use an additional trick to hide the
383 ``.cgi`` extension of the cgi script. Place the ``roundup.cgi`` script
384 wherever you want it to be, rename it to just ``roundup``, and add a
385 couple lines to your Apache configuration::
387  <Location /path/to/roundup>
388    SetHandler cgi-script
389  </Location>
392 Stand-alone Web Server
393 ~~~~~~~~~~~~~~~~~~~~~~
395 This approach will give you faster response than cgi-bin. You may
396 investigate using ProxyPass or similar configuration in apache to have your
397 tracker accessed through the same URL as other systems.
399 The stand-alone web server is started with the command ``roundup-server``. It
400 has several options - display them with ``roundup-server -h``.
402 The tracker home configuration is similar to the cgi-bin - you may either edit
403 the script to change the TRACKER_HOMES variable or you may supply the
404 name=home values on the command-line after all the other options.
406 To make the server run in the background, use the "-d" option, specifying the
407 name of a file to write the server process id (pid) to.
410 Zope Product - ZRoundup
411 ~~~~~~~~~~~~~~~~~~~~~~~
413 ZRoundup installs as a regular Zope product. Copy the ZRoundup directory to
414 your Products directory either in INSTANCE_HOME/Products or the Zope
415 code tree lib/python/Products.
417 When you next (re)start up Zope, you will be able to add a ZRoundup object
418 that interfaces to your new tracker.
420 Apache HTTP Server with mod_python
421 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
423 `Mod_python`_ is an `Apache`_ module that embeds the Python interpreter
424 within the server.  Running Roundup this way is much faster than all
425 above options and, like `web server cgi-bin`_, allows you to use HTTPS
426 protocol.  The drawback is that this setup is more complicated.
428 The following instructions were tested on apache 2.0 with mod_python 3.1.
429 If you are using older versions, your mileage may vary.
431 Mod_python uses OS threads.  If your apache was built without threads
432 (quite commonly), you must load the threading library to run mod_python.
433 This is done by setting ``LD_PRELOAD`` to your threading library path
434 in apache ``envvars`` file.  Example for gentoo linux (``envvars`` file
435 is located in ``/usr/lib/apache2/build/``)::
437   LD_PRELOAD=/lib/libpthread.so.0
438   export LD_PRELOAD
440 Example for FreeBSD (``envvars`` is in ``/usr/local/sbin/``)::
442   LD_PRELOAD=/usr/lib/libc_r.so
443   export LD_PRELOAD
445 Next, you have to add Roundup trackers configuration to apache config.
446 Roundup apache interface uses two options specified with ``PythonOption``
447 directives:
449   TrackerHome:
450     defines the tracker home directory - the directory that was specified
451     when you did ``roundup-admin init``.  This option is required.
453   TrackerLaguage:
454     defines web user interface language.  mod_python applications do not
455     receive OS environment variables in the same way as command-line
456     programs, so the language cannot be selected by setting commonly
457     used variables like ``LANG`` or ``LC_ALL``.  ``TrackerLanguage``
458     value has the same syntax as values of these environment variables.
459     This option may be omitted.
461   TrackerDebug:
462     run the tracker in debug mode.  Setting this option to ``yes`` or
463     ``true`` has the same effect as running ``roundup-server -t debug``:
464     the database schema and used html templates are rebuilt for each
465     HTTP request.  Values ``no`` or ``false`` mean that all html
466     templates for the tracker are compiled and the database schema is
467     checked once at startup.  This is the default behaviour.
469   TrackerTiming:
470     has nearly the same effect as environment variable ``CGI_SHOW_TIMING``
471     for standalone roundup server.  The difference is that setting this
472     option to ``no`` or ``false`` disables timings display.  Value
473     ``comment`` writes request handling times in html comment, and
474     any other non-empty value makes timing report visible.  By default,
475     timing display is disabled.
477 In the following example we have two trackers set up in
478 ``/var/db/roundup/support`` and ``/var/db/roundup/devel`` and accessed
479 as ``https://my.host/roundup/support/`` and ``https://my.host/roundup/devel/``
480 respectively (provided Apache has been set up for SSL of course).
481 Having them share same parent directory allows us to
482 reduce the number of configuration directives.  Support tracker has
483 russian user interface.  The other tracker (devel) has english user
484 interface (default).
486 Static files from ``html`` directory are served by apache itself - this
487 is quickier and generally more robust than doing that from python.
488 Everything else is aliased to dummy (non-existing) ``py`` file,
489 which is handled by mod_python and our roundup module.
491 Example mod_python configuration::
493     #################################################
494     # Roundup Issue tracker
495     #################################################
496     # enable Python optimizations (like 'python -O')
497     PythonOptimize On
498     # let apache handle static files from 'html' directories
499     AliasMatch /roundup/(.+)/@@file/(.*) /var/db/roundup/$1/html/$2
500     # everything else is handled by roundup web UI
501     AliasMatch /roundup/([^/]+)/(?!@@file/)(.*) /var/db/roundup/$1/dummy.py/$2
502     # roundup requires a slash after tracker name - add it if missing
503     RedirectMatch permanent ^/roundup/([^/]+)$ /roundup/$1/
504     # common settings for all roundup trackers
505     <Directory /var/db/roundup/*>
506       Order allow,deny
507       Allow from all
508       AllowOverride None
509       Options None
510       AddHandler python-program .py
511       PythonHandler roundup.cgi.apache
512       # uncomment the following line to see tracebacks in the browser
513       # (note that *some* tracebacks will be displayed anyway)
514       #PythonDebug On
515     </Directory>
516     # roundup tracker homes
517     <Directory /var/db/roundup/support>
518       PythonOption TrackerHome /var/db/roundup/support
519       PythonOption TrackerLanguage ru
520     </Directory>
521     <Directory /var/db/roundup/devel>
522       PythonOption TrackerHome /var/db/roundup/devel
523     </Directory>
525 Notice that the ``/var/db/roundup`` path shown above refers to the directory
526 in which the tracker homes are stored. The actual value will thus depend on
527 your system.
529 On Windows the corresponding lines will look similar to these::
531     AliasMatch /roundup/(.+)/@@file/(.*) C:/DATA/roundup/$1/html/$2
532     AliasMatch /roundup/([^/]+)/(?!@@file/)(.*) C:/DATA/roundup/$1/dummy.py/$2
533     <Directory C:/DATA/roundup/*>
534     <Directory C:/DATA/roundup/support>
535     <Directory C:/DATA/roundup/devel>
537 In this example the directory hosting all of the tracker homes is
538 ``C:\DATA\roundup``. (Notice that you must use forward slashes in paths
539 inside the httpd.conf file!)
541 The URL for accessing these trackers then become:
542 `http://<roundupserver>/roundup/support/`` and
543 ``http://<roundupserver>/roundup/devel/``
545 Note that in order to use https connections you must set up Apache for secure
546 serving with SSL.
548 WSGI Handler
549 ~~~~~~~~~~~~
551 The WSGI handler is quite simple. The following sample code shows how
552 to use it::
554     from wsgiref.simple_server import make_server
556     # obtain the WSGI request dispatcher
557     from roundup.cgi.wsgi_handler import RequestDispatcher
558     tracker_home = 'demo'
559     app = RequestDispatcher(tracker_home)
561     httpd = make_server('', 8917, app)
562     httpd.serve_forever()
564 To test the above you should create a demo tracker with ``python demo.py``.
565 Edit the ``config.ini`` to change the web URL to "http://localhost:8917/".
568 Configure an Email Interface
569 ----------------------------
571 If you don't want to use the email component of Roundup, then remove the
572 "``nosyreaction.py``" module from your tracker "``detectors``" directory.
574 See `platform-specific notes`_ for steps that may be needed on your system.
576 There are five supported ways to get emailed issues into the
577 Roundup tracker.  You should pick ONE of the following, all
578 of which will continue my example setup from above:
580 As a mail alias pipe process
581 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583 Set up a mail alias called "issue_tracker" as (include the quote marks):
584 "``|/usr/bin/python /usr/bin/roundup-mailgw <tracker_home>``"
585 (substitute ``/usr/bin`` for wherever roundup-mailgw is installed).
587 In some installations (e.g. RedHat Linux and Fedora Core) you'll need to
588 set up smrsh so sendmail will accept the pipe command. In that case,
589 symlink ``/etc/smrsh/roundup-mailgw`` to "``/usr/bin/roundup-mailgw``"
590 and change the command to::
592     |roundup-mailgw /opt/roundup/trackers/support
594 To test the mail gateway on unix systems, try::
596     echo test |mail -s '[issue] test' support@YOUR_DOMAIN_HERE
598 Be careful that some mail systems (postfix for example) will impost a
599 limits on processes they spawn. In particular postfix can set a file size
600 limit. *This can cause your Roundup database to become corrupted.*
603 As a custom router/transport using a pipe process (Exim4 specific)
604 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
606 The following configuration snippets for `Exim 4`_ configuration
607 implement a custom router & transport to accomplish mail delivery to
608 roundup-mailgw. A configuration for Exim3 is similar but not
609 included, since Exim3 is considered obsolete.
611 .. _Exim 4: http://www.exim.org/
613 This configuration is similar to the previous section, in that it uses
614 a pipe process. However, there are advantages to using a custom
615 router/transport process, if you are using Exim.
617 * This avoids privilege escalation, since otherwise the pipe process
618   will run as the mail user, typically mail. The transport can be
619   configured to run as the user appropriate for the task at hand. In the
620   transport described in this section, Exim4 runs as the unprivileged
621   user ``roundup``.
623 * Separate configuration is not required for each tracker
624   instance. When a email arrives at the server, Exim passes it through
625   the defined routers. The roundup_router looks for a match with one of
626   the roundup directories, and if there is one it is passed to the
627   roundup_transport, which uses the pipe process described in the
628   previous section (`As a mail alias pipe process`_).
630 The matching is done in the line::
632   require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
634 The following configuration has been tested on Debian Sarge with
635 Exim4.
637 .. note::
638   Note that the Debian Exim4 packages don't allow pipes in alias files
639   by default, so the method described in the section `As a mail alias
640   pipe process`_ will not work with the default configuration. However,
641   the method described in this section does. See the discussion in
642   ``/usr/share/doc/exim4-config/README.system_aliases`` on any Debian
643   system with Exim4 installed.
645   For more Debian-specific information, see suggested addition to
646   README.Debian in
647   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343283, which will
648   hopefully be merged into the Debian package eventually.
650 This config makes a few assumptions:
652 * That the mail address corresponding to the tracker instance has the
653   same name as the directory of the tracker instance, i.e. the mail
654   interface address corresponding to a Roundup instance called
655   ``/var/lib/roundup/trackers/mytracker`` is ``mytracker@your.host``.
657 * That (at least) all the db subdirectories of all the tracker
658   instances (ie. ``/var/lib/roundup/trackers/*/db``) are owned by the same
659   user, in this case, 'roundup'.
661 * That if the ``schema.py`` file exists, then the tracker is ready for
662   use. Another option is to use the ``config.ini`` file (this changed
663   in 0.8 from ``config.py``).
665 Macros for Roundup router/transport. Should be placed in the macros
666 section of the Exim4 config::
668   # Home dir for your Roundup installation
669   ROUNDUP_HOME=/var/lib/roundup/trackers
671   # User and group for Roundup.
672   ROUNDUP_USER=roundup
673   ROUNDUP_GROUP=roundup
675 Custom router for Roundup. This will (probably) work if placed at the
676 beginning of the router section of the Exim4 config::
678   roundup_router:
679       driver = accept
680       # The config file config.ini seems like a more natural choice, but the
681       # file config.py was replaced by config.ini in 0.8, and schema.py needs
682       # to be present too.
683       require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
684       transport = roundup_transport
686 Custom transport for Roundup. This will (probably) work if placed at
687 the beginning of the router section of the Exim4 config::
689   roundup_transport:
690       driver = pipe
691       command = /usr/bin/python /usr/bin/roundup-mailgw ROUNDUP_HOME/$local_part/
692       current_directory = ROUNDUP_HOME
693       home_directory = ROUNDUP_HOME
694       user = ROUNDUP_USER
695       group = ROUNDUP_GROUP
697 As a regular job using a mailbox source
698 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
700 Set ``roundup-mailgw`` up to run every 10 minutes or so. For example
701 (substitute ``/usr/bin`` for wherever roundup-mailgw is installed)::
703   0,10,20,30,40,50 * * * * /usr/bin/roundup-mailgw /opt/roundup/trackers/support mailbox <mail_spool_file>
705 Where the ``mail_spool_file`` argument is the location of the roundup submission
706 user's mail spool. On most systems, the spool for a user "issue_tracker"
707 will be "``/var/mail/issue_tracker``".
709 As a regular job using a POP source
710 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
712 To retrieve from a POP mailbox, use a *cron* entry similar to the mailbox
713 one (substitute ``/usr/bin`` for wherever roundup-mailgw is
714 installed)::
716   0,10,20,30,40,50 * * * * /usr/bin/roundup-mailgw /opt/roundup/trackers/support pop <pop_spec>
718 where pop_spec is "``username:password@server``" that specifies the roundup
719 submission user's POP account name, password and server.
721 On windows, you would set up the command using the windows scheduler.
723 As a regular job using an IMAP source
724 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
726 To retrieve from an IMAP mailbox, use a *cron* entry similar to the
727 POP one (substitute ``/usr/bin`` for wherever roundup-mailgw is
728 installed)::
730   0,10,20,30,40,50 * * * * /usr/bin/roundup-mailgw /opt/roundup/trackers/support imap <imap_spec>
732 where imap_spec is "``username:password@server``" that specifies the roundup
733 submission user's IMAP account name, password and server. You may
734 optionally include a mailbox to use other than the default ``INBOX`` with
735 "``imap username:password@server mailbox``".
737 If you have a secure (ie. HTTPS) IMAP server then you may use ``imaps``
738 in place of ``imap`` in the command to use a secure connection.
740 As with the POP job, on windows, you would set up the command using the
741 windows scheduler.
744 UNIX Environment Steps
745 ----------------------
747 Each tracker ideally should have its own UNIX group, so create
748 a UNIX group (edit ``/etc/group`` or your appropriate NIS map if
749 you're using NIS).  To continue with my examples so far, I would
750 create the UNIX group 'support', although the name of the UNIX
751 group does not have to be the same as the tracker name.  To this
752 'support' group I then add all of the UNIX usernames who will be
753 working with this Roundup tracker.  In addition to 'real' users,
754 the Roundup email gateway will need to have permissions to this
755 area as well, so add the user your mail service runs as to the
756 group (typically "mail" or "daemon").  The UNIX group might then
757 look like::
759      support:*:1002:jblaine,samh,geezer,mail
761 If you intend to use the web interface (as most people do), you
762 should also add the username your web server runs as to the group.
763 My group now looks like this::
765      support:*:1002:jblaine,samh,geezer,mail,apache
767 The tracker "db" directory should be chmod'ed g+sw so that the group can
768 write to the database, and any new files created in the database will be owned
769 by the group.
771 If you're using the mysql or postgresql backend then you'll need to ensure
772 that the tracker user has appropriate permissions to create/modify the
773 database. If you're using roundup.cgi, the apache user needs permissions
774 to modify the database.  Alternatively, explicitly specify a database login
775 in ``rdbms`` -> ``user`` and ``password`` in ``config.ini``.
777 An alternative to the above is to create a new user who has the sole
778 responsibility of running roundup. This user:
780 1. runs the CGI interface daemon
781 2. runs regular polls for email
782 3. runs regular checks (using cron) to ensure the daemon is up
783 4. optionally has no login password so that nobody but the "root" user
784    may actually login and play with the roundup setup.
786 If you're using a Linux system (e.g. Fedora Core) with SELinux enabled,
787 you will need to ensure that the db directory has a context that
788 permits the web server to modify and create files. If you're using the
789 mysql or postgresql backend you may also need to update your policy to
790 allow the web server to access the database socket.
793 Additional Language Codecs
794 --------------------------
796 If you intend to send messages to Roundup that use Chinese, Japanese or
797 Korean encodings the you'll need to obtain CJKCodecs from
798 http://cjkpython.berlios.de/
801 Public Tracker Considerations
802 -----------------------------
804 If you run a public tracker, you will eventually have to think about
805 dealing with spam entered through both the web and mail interfaces.
807 The `customisation documentation`_ has a simple detector that will block
808 a lot of spam attempts. Look for the example "Preventing SPAM".
811 Maintenance
812 ===========
814 Read the separate `administration guide`_ for information about how to
815 perform common maintenance tasks with Roundup.
818 Upgrading
819 =========
821 Read the separate `upgrading document`_, which describes the steps needed to
822 upgrade existing tracker trackers for each version of Roundup that is
823 released.
826 Further Reading
827 ===============
829 If you intend to use Roundup with anything other than the default
830 templates, if you would like to hack on Roundup, or if you would
831 like implementation details, you should read `Customising Roundup`_.
834 Running Multiple Trackers
835 =========================
837 Things to think about before you jump off the deep end and install
838 multiple trackers, which involve additional URLs, user databases, email
839 addresses, databases to back up, etc.
841 1. Do you want a tracker per product you sell/support? You can just add
842    a new property to your issues called Product, and filter by that. See
843    the customisation example `adding a new field to the classic schema`_.
844 2. Do you want to track internal software development issues and customer
845    support issues separately? You can just set up an additional "issue"
846    class called "cust_issues" in the same tracker, mimicing the normal
847    "issue" class, but with different properties. See the customisation
848    example `tracking different types of issues`_.
851 Platform-Specific Notes
852 =======================
854 Windows command-line tools
855 --------------------------
857 To make the command-line tools accessible in Windows, you need to update
858 the "Path" environment variable in the Registry via a dialog box.
860 On Windows 2000 and later:
862 1) Press the "Start" button.
863 2) Choose "Settings"
864 3) Choose "Control Panel"
865 4) Choose "System"
866 5) Choose "Advanced"
867 6) Choose "Environmental Variables"
868 7) Add: "<dir>\Scripts" to the "Path" environmental variable.
870 Where <dir> in 7) is the root directory (e.g., ``C:\Python22\Scripts``)
871 of your Python installation.
873 I understand that in XP, 2) above is not needed as "Control
874 Panel" is directly accessible from "Start".
876 I do not believe this is possible to do in previous versions of Windows.
879 Windows Server
880 --------------
882 To have the Roundup web server start up when your machine boots up, there
883 are two different methods, the scheduler and installing the service.
886 1. Using the Windows scheduler
887 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
889 Set up the following in Scheduled Tasks (note, the following is for a
890 cygwin setup):
892 **Run**
894     ``c:\cygwin\bin\bash.exe -c "roundup-server TheProject=/opt/roundup/trackers/support"``
896 **Start In**
898     ``C:\cygwin\opt\roundup\bin``
900 **Schedule**
902     At System Startup
904 To have the Roundup mail gateway run periodically to poll a POP email address,
905 set up the following in Scheduled Tasks:
907 **Run**
909     ``c:\cygwin\bin\bash.exe -c "roundup-mailgw /opt/roundup/trackers/support pop roundup:roundup@mail-server"``
911 **Start In**
913     ``C:\cygwin\opt\roundup\bin``
915 **Schedule**
917     Every 10 minutes from 5:00AM for 24 hours every day
919     Stop the task if it runs for 8 minutes
922 2. Installing the roundup server as a Windows service
923 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
925 This is more Windows oriented and will make the Roundup server run as
926 soon as the PC starts up without any need for a login or such. It will
927 also be available in the normal Windows Administrative Tools.
929 For this you need first to create a service ini file containing the
930 relevant settings.
932 1. It is created if you execute the following command from within the
933    scripts directory (notice the use of backslashes)::
935      roundup-server -S -C <trackersdir>\server.ini -n <servername> -p 8080 -l <trackersdir>\trackerlog.log software=<trackersdir>\Software
937    where the item ``<trackersdir>`` is replaced with the physical directory
938    that hosts all of your trackers. The ``<servername>`` item is the name
939    of your roundup server PC, such as w2003srv or similar.
941 2. Next open the now created file ``C:\DATA\roundup\server.ini`` file
942    (if your ``<trackersdir>`` is ``C:\DATA\roundup``).
943    Check the entries for correctness, especially this one::
945     [trackers]
946     software = C:\DATA\Roundup\Software
948    (this is an example where the tracker is named software and its home is
949    ``C:\DATA\Roundup\Software``)
951 3. Next give the commands that actually installs and starts the service::
953     roundup-server -C C:\DATA\Roundup\server.ini -c install
954     roundup-server -c start
956 4. Finally open the AdministrativeTools/Services applet and locate the
957    Roundup service entry. Open its properties and change it to start
958    automatically instead of manually.
960 If you are using Apache as the webserver you might want to use it with
961 mod_python instead to serve out Roundup. In that case see the mod_python
962 instructions above for details.
965 Sendmail smrsh
966 --------------
968 If you use Sendmail's ``smrsh`` mechanism, you will need to tell
969 smrsh that roundup-mailgw is a valid/trusted mail handler
970 before it will work.
972 This is usually done via the following 2 steps:
974 1. make a symlink in ``/etc/smrsh`` called ``roundup-mailgw``
975    which points to the full path of your actual ``roundup-mailgw``
976    script.
978 2. change your alias to ``"|roundup-mailgw <tracker_home>"``
981 Linux
982 -----
984 Make sure you read the instructions under `UNIX environment steps`_.
987 Solaris
988 -------
990 You'll need to build Python.
992 Make sure you read the instructions under `UNIX environment steps`_.
995 Problems? Testing your Python...
996 ================================
998 .. note::
999    The ``run_tests.py`` script is packaged in Roundup's source distribution
1000    - users of the Windows installer, other binary distributions or
1001    pre-installed Roundup will need to download the source to use it.
1003 Once you've unpacked roundup's source, run ``python run_tests.py`` in the
1004 source directory and make sure there are no errors. If there are errors,
1005 please let us know!
1007 If the above fails, you may be using the wrong version of python. Try
1008 ``python2 run_tests.py``. If that works, you will need to substitute
1009 ``python2`` for ``python`` in all further commands you use in relation to
1010 Roundup -- from installation and scripts.
1013 -------------------------------------------------------------------------------
1015 Back to `Table of Contents`_
1017 Next: `User Guide`_
1019 .. _`table of contents`: index.html
1020 .. _`user guide`: user_guide.html
1021 .. _`roundup specification`: spec.html
1022 .. _`tracker configuration`: customizing.html#tracker-configuration
1023 .. _`customisation documentation`: customizing.html
1024 .. _`Adding a new field to the classic schema`:
1025    customizing.html#adding-a-new-field-to-the-classic-schema
1026 .. _`Tracking different types of issues`:
1027    customizing.html#tracking-different-types-of-issues
1028 .. _`customising roundup`: customizing.html
1029 .. _`upgrading document`: upgrading.html
1030 .. _`administration guide`: admin_guide.html
1033 .. _External hyperlink targets:
1035 .. _apache: http://httpd.apache.org/
1036 .. _mod_python: http://www.modpython.org/
1037 .. _MySQLdb: http://sourceforge.net/projects/mysql-python
1038 .. _Psycopg: http://initd.org/software/initd/psycopg
1039 .. _pysqlite: http://pysqlite.org/