Code

help for winzip users
[roundup.git] / doc / installation.txt
1 ==================
2 Installing Roundup
3 ==================
5 :Version: $Revision: 1.74 $
7 .. contents::
10 Overview
11 ========
13 Broken out separately, there are several conceptual pieces to a
14 Roundup installation:
16 Roundup trackers
17  Trackers consist of issues (be they bug reports or otherwise), tracker
18  configuration file(s), web HTML files etc. Roundup trackers are initialised
19  with a "Template" which defines the fields usable/assignable on a
20  per-issue basis.  Descriptions of the provided templates are given in
21  `choosing your template`_.
23 Roundup support code
24  Installed into your Python install's lib directory
26 Roundup scripts
27  These include the email gateway, the roundup
28  HTTP server, the roundup administration command-line interface, etc.
31 Prerequisites
32 =============
34 Roundup requires Python 2.1.3 or newer with a functioning anydbm or
35 bsddb module. Download the latest version from http://www.python.org/.
36 It is highly recommended that users install the latest patch version
37 of python as these contain many fixes to serious bugs.
39 If you want to use Berkeley DB bsddb3 with Roundup, use version 3.3.0 or
40 later. Download the latest version from http://pybsddb.sourceforge.net/.
42 If you're on windows, you will either need to be using the ActiveState python
43 distribution (at http://www.activestate.com/Products/ActivePython/), or you'll
44 have to install the win32all package separately (get it from
45 http://starship.python.net/crew/mhammond/win32/).
47 Non-Python2.3 users may need to `install the "CSV" module`_.
49 Install the "CSV" module
50 ------------------------
52 Note: CSV stands for Comma-Separated-Value. These files are used by all
53       manner of programs (eg. spreadsheets) to exchange data.
55 The "CSV" module is required if you wish to import or export data in the
56 tracker, or if you wish to use the online generic class editing facility.
58 If you're using a version of Python older than 2.3, then you will need to
59 install the "CSV" module from `Object Craft`_. Users of Python2.3 and later
60 don't need to. If you have a C compiler installed, then download the source
61 and follow their installation instructions (simply ``python setup.py
62 install``.)
64 If you're on Windows and don't have a C compiler, then you'll need to
65 download the pre-compiled ``csv.pyd`` file and install it. To install, just
66 copy it to your Python installation in the ``lib\site-packages`` directory.
67 For Python 2.2, this would be::
69    c:\python22\lib\site-packages
71 Once the CSV module is installed, you *must* restart roundup-server if it
72 is already running, or the new module won't be detected.
74 If you're on some other platform and don't have a C compiler, you'll need
75 to ask for help on the roundup-users mailing list.
77 .. _`Object Craft`: http://object-craft.com.au/
80 Getting Roundup
81 ===============
83 Download the latest version from http://roundup.sf.net/.
85 If you're using WinZIP's "classic" interface, make sure the "Use
86 folder names" check box is checked before you extract the files.
88 Testing your Python
89 -------------------
91 Once you've unpacked roundup's source, run ``python run_tests.py`` in the
92 source directory and make sure there are no errors. If there are errors,
93 please let us know!
95 If the above fails, you may be using the wrong version of python. Try
96 ``python2 run_tests.py``. If that works, you will need to substitute
97 ``python2`` for ``python`` in all further commands you use in relation to
98 Roundup -- from installation and scripts.
101 For The Really Impatient
102 ========================
104 If you just want to give Roundup a whirl Right Now, then simply run
105 ``python demo.py``. This will set up a simple demo tracker on your
106 machine. When it's done, it'll print out a URL to point your web browser
107 at so you may start playing. Three users will be set up:
109 1. anonymous - the "default" user with permission to do very little
110 2. demo (password "demo") - a normal user who may create issues
111 3. admin (password "admin") - an administrative user who has complete
112    access to the tracker
115 Installation
116 ============
118 :Note: Some systems, such as Debian and NetBSD, already have Roundup
119        installed. Try running the command "roundup-admin" with no arguments,
120        and if it runs you may skip the `Basic Installation Steps`_
121        below and go straight to `configuring your first tracker`_.
123 Set aside 15-30 minutes. Please make sure you're using a supported version of
124 Python -- see `testing your python`_. There's several steps to follow in your
125 installation:
127 1. `basic installation steps`_ if Roundup is not installed on your system
128 2. `configuring your first tracker`_ that all installers must follow
129 3. then optionally `configure a web interface`_
130 4. and optionally `configure an email interface`_
131 5. `UNIX environment steps`_ to take if you're installing on a shared
132    UNIX machine and want to restrict local access to roundup
133 6. `additional language codecs`_
135 For information about how Roundup installs, see the `administration
136 guide`_.
139 Basic Installation Steps
140 ------------------------
142 To install the Roundup support code into your Python tree and
143 Roundup scripts into /usr/local/bin (substitute that path for whatever is
144 appropriate on your system). You need to have write permissions
145 for these locations, eg. being root on unix::
147     python setup.py install
149 If you would like to place the Roundup scripts in a directory other
150 than ``/usr/local/bin``, then specify the preferred location with
151 ``--install-script``. For example, to install them in
152 ``/opt/roundup/bin``::
154     python setup.py install --install-scripts=/opt/roundup/bin
156 You can also use the ``--prefix`` option to use a completely different
157 base directory, if you do not want to use administrator rights. If you
158 choose to do this, take note of the message at the end of installation
159 and modify the python path accordingly.
162 Configuring your first tracker
163 ------------------------------
165 1. To create a Roundup tracker (necessary to do before you can
166    use the software in any real fashion), you need to set up a "tracker
167    home":
169    a. (Optional) If you intend to keep your roundup trackers
170       under one top level directory which does not exist yet,
171       you should create that directory now.  Example::
173          mkdir /opt/roundup/trackers
175    b. Either add the Roundup script location to your ``PATH``
176       environment variable or specify the full path to
177       the command in the next step.
179    c. Install a new tracker with the command ``roundup-admin install``.
180       You will be asked a series of questions.  Descriptions of the provided
181       templates can be found in `choosing your template`_ below.  Descriptions
182       of the available backends can be found in `choosing your backend`_
183       below.  The questions will be something like (you may have more
184       templates or backends available)::
186           Enter tracker home: /opt/roundup/trackers/support
187           Templates: classic
188           Select template [classic]: classic
189           Back ends: anydbm, bsddb
190           Select backend [anydbm]: anydbm
192       The "support" part of the tracker name can be anything you want - it
193       is going to be used as the directory that the tracker information
194       will be stored in.
196       You will now be directed to edit the tracker configuration and
197       initial schema.  At a minimum, you must set ``MAILHOST``,
198       ``TRACKER_WEB``, ``MAIL_DOMAIN`` and ``ADMIN_EMAIL``. Note that the
199       configuration file uses Python syntax, so almost every value must be
200       ``'quoted'`` using single or double quotes. If you get stuck, and get
201       configuration file errors, then see the `tracker configuration`_ section
202       of the `customisation documentation`_.
204       If you just want to get set up to test things quickly (and follow
205       the instructions in step 3 below), you can even just set the
206       TRACKER_WEB variable to::
208          TRACKER_WEB = 'http://localhost:8080/support/'
210       The URL *must* end in a '/', or your web interface *will not work*.
211       See `Customising Roundup`_ for details on configuration and schema
212       changes. Note that you may change any of the configuration after
213       you've initialised the tracker - it's just better to have valid values
214       for this stuff now.
216    d. Initialise the tracker database with ``roundup-admin initialise``.
217       You will need to supply an admin password at this step. You will be
218       prompted::
220           Admin Password:
221                  Confirm:
223       Once this is done, the tracker has been created.
225 2. At this point, your tracker is set up, but doesn't have a nice user
226    interface. To set that up, we need to `configure a web interface`_ and
227    optionally `configure an email interface`_. If you want to try your
228    new tracker out, assuming ``TRACKER_WEB`` is set to
229    ``'http://localhost:8080/support/'``, run::
231      roundup-server support=/opt/roundup/trackers/support
233    then direct your web browser at:
235      http://localhost:8080/support/
237    and you should see the tracker interface.
240 Choosing Your Template
241 ----------------------
243 Classic Template
244 ~~~~~~~~~~~~~~~~
246 The classic template is the one defined in the `Roundup Specification`_. It
247 holds issues which have priorities and statuses. Each issue may also have a
248 set of messages which are disseminated to the issue's list of nosy users.
250 Minimal Template
251 ~~~~~~~~~~~~~~~~
253 The minimal template has the minimum setup required for a tracker
254 installation. That is, it has the configuration files, defines a user database
255 and the basic HTML interface to that. It's a completely clean slate for you to
256 create your tracker on.
259 Choosing Your Backend
260 ---------------------
262 The actual storage of Roundup tracker information is handled by backends.
263 There's several to choose from, each with benefits and limitations:
265 ========== =========== ===== ==============================
266 Name       Speed       Users   Support
267 ========== =========== ===== ==============================
268 anydbm     Slowest     Few   Always available
269 bsddb      Slow        Few   Usually available
270 sqlite     Fastest(*)  Few   Needs install (SQLite_)
271 metakit    Fastest(*)  Few   Needs install (metakit_)
272 postgresql Fast        Many  Needs install/admin (psycopg_)
273 mysql      Fast        Many  Needs install/admin (MySQLdb_)
274 ========== =========== ===== ==============================
276 **sqlite** and **metakit**
277   These use the embedded database engines SQLite_ and metakit_ to provide
278   very fast backends. They are not suitable for trackers which will have
279   many simultaneous users.
280 **postgresql**
281   Backend for popular RDBMS PostgreSQL. You must read doc/postgresql.txt for
282   additional installation steps and requirements.
283 **mysql**
284   Backend for popular RDBMS MySQL. You must read doc/mysql.txt for additional
285   installation steps and requirements.
287 You may defer your decision by setting your tracker up with the anydbm
288 backend (which is guaranteed to be available) and switching to one of the
289 other backends at any time using the instructions in the `administration
290 guide`_.
293 Configure a Web Interface
294 -------------------------
296 There are three web interfaces to choose from:
298 1. `web server cgi-bin`_
299 2. `stand-alone web server`_
300 3. `Zope product - ZRoundup`_
302 You may need to give the web server user permission to access the tracker home
303 - see the `UNIX environment steps`_ for information. You may also need to
304 configure your system in some way - see `platform-specific notes`_.
307 Web Server cgi-bin
308 ~~~~~~~~~~~~~~~~~~
310 A benefit of using the cgi-bin approach is that it's the easiest way to
311 restrict access to your tracker to only use HTTPS. Access will be slower
312 than through the `stand-alone web server`_ though.
314 Note that if your Python isn't install as "python" then you'll need to edit
315 the ``roundup.cgi`` script to fix the first line.
317 If you're using IIS on a Windows platform, you'll need to run this command
318 for the cgi to work (it turns on the PATH_INFO cgi variable)::
320     adsutil.vbs set w3svc/AllowPathInfoForScriptMappings TRUE
322 The ``adsutil.vbs`` file can be found in either ``c:\inetpub\adminscripts`` 
323 or ``c:\winnt\system32\inetsrv\adminsamples\`` or
324 ``c:\winnt\system32\inetsrv\adminscripts\`` depending on your installation.
326 Copy the ``cgi-bin/roundup.cgi`` file to your web server's ``cgi-bin``
327 directory. You will need to configure it to tell it where your tracker home
328 is. You can do this either:
330 through an environment variable
331  set the variable TRACKER_HOMES to be a colon (":") separated list of
332  name=home pairs (if you're using apache, the SetEnv directive can do this)
333 directly in the ``roundup.cgi`` file itself
334  add your instance to the TRACKER_HOMES variable as ``'name': 'home'``
336 The "name" part of the configuration will appear in the URL and identifies the
337 tracker (so you may have more than one tracker per cgi-bin script). Make sure
338 there are no spaces or other illegal characters in it (to be safe, stick to
339 letters and numbers). The "name" forms part of the URL that appears in the
340 tracker config TRACKER_WEB variable, so make sure they match. The "home"
341 part of the configuration is the tracker home directory.
343 Stand-alone Web Server
344 ~~~~~~~~~~~~~~~~~~~~~~
346 This approach will give you the fastest of the three web interfaces. You may
347 investigate using ProxyPass or similar configuration in apache to have your
348 tracker accessed through the same URL as other systems.
350 The stand-alone web server is started with the command ``roundup-server``. It
351 has several options - display them with ``roundup-server -h``.
353 The tracker home configuration is similar to the cgi-bin - you may either edit
354 the script to change the TRACKER_HOMES variable or you may supply the
355 name=home values on the command-line after all the other options.
357 To make the server run in the background, use the "-d" option, specifying the
358 name of a file to write the server process id (pid) to.
361 Zope Product - ZRoundup
362 ~~~~~~~~~~~~~~~~~~~~~~~
364 ZRoundup installs as a regular Zope product. Copy the ZRoundup directory to
365 your Products directory either in INSTANCE_HOME/Products or the Zope
366 code tree lib/python/Products.
368 When you next (re)start up Zope, you will be able to add a ZRoundup object
369 that interfaces to your new tracker.
372 Configure an Email Interface
373 ----------------------------
375 If you don't want to use the email component of Roundup, then remove the
376 "``nosyreaction.py``" module from your tracker "``detectors``" directory.
378 See `platform-specific notes`_ for steps that may be needed on your system.
380 There are three supported ways to get emailed issues into the
381 Roundup tracker.  You should pick ONE of the following, all
382 of which will continue my example setup from above:
384 As a mail alias pipe process 
385 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
387 Set up a mail alias called "issue_tracker" as (include the quote marks):
388 "``|/usr/bin/python /usr/local/bin/roundup-mailgw <tracker_home>``"
390 In some installations (e.g. RedHat 6.2 I think) you'll need to set up smrsh so
391 sendmail will accept the pipe command. In that case, symlink
392 ``/etc/smrsh/roundup-mailgw`` to "``/usr/local/bin/roundup-mailgw``" and change
393 the command to::
395     |roundup-mailgw /opt/roundup/trackers/support
396  
397 To test the mail gateway on unix systems, try::
399     echo test |mail -s '[issue] test' support@YOUR_DOMAIN_HERE
401 As a regular job using a mailbox source
402 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 Set ``roundup-mailgw`` up to run every 10 minutes or so. For example::
406   0,10,20,30,40,50 * * * * /usr/local/bin/roundup-mailgw /opt/roundup/trackers/support mailbox <mail_spool_file>
408 Where the ``mail_spool_file`` argument is the location of the roundup submission
409 user's mail spool. On most systems, the spool for a user "issue_tracker"
410 will be "``/var/mail/issue_tracker``".
412 As a regular job using a POP source
413 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
415 To retrieve from a POP mailbox, use a *cron* entry similar to the mailbox one::
417   0,10,20,30,40,50 * * * * /usr/local/bin/roundup-mailgw /opt/roundup/trackers/support pop <pop_spec>
419 where pop_spec is "``username:password@server``" that specifies the roundup
420 submission user's POP account name, password and server.
422 On windows, you would set up the command using the windows scheduler.
424 As a regular job using an IMAP source
425 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
427 To retrieve from an IMAP mailbox, use a *cron* entry similar to the
428 POP one::
430   0,10,20,30,40,50 * * * * /usr/local/bin/roundup-mailgw /opt/roundup/trackers/support imap <imap_spec>
432 where imap_spec is "``username:password@server``" that specifies the roundup
433 submission user's IMAP account name, password and server. You may
434 optionally include a mailbox to use other than the default ``INBOX`` with
435 "``imap username:password@server mailbox``".
437 If you have a secure (ie. HTTPS) IMAP server then you may use ``imaps``
438 in place of ``imap`` in the command to use a secure connection.
440 As with the POP job, on windows, you would set up the command using the
441 windows scheduler.
444 UNIX Environment Steps
445 ----------------------
447 Each tracker ideally should have its own UNIX group, so create
448 a UNIX group (edit ``/etc/group`` or your appropriate NIS map if
449 you're using NIS).  To continue with my examples so far, I would
450 create the UNIX group 'support', although the name of the UNIX
451 group does not have to be the same as the tracker name.  To this
452 'support' group I then add all of the UNIX usernames who will be
453 working with this Roundup tracker.  In addition to 'real' users,
454 the Roundup email gateway will need to have permissions to this
455 area as well, so add the user your mail service runs as to the
456 group (typically "mail" or "daemon").  The UNIX group might then
457 look like::
459      support:*:1002:jblaine,samh,geezer,mail
461 If you intend to use the web interface (as most people do), you
462 should also add the username your web server runs as to the group.
463 My group now looks like this::
465      support:*:1002:jblaine,samh,geezer,mail,apache
467 The tracker "db" directory should be chmod'ed g+sw so that the group can
468 write to the database, and any new files created in the database will be owned
469 by the group.
471 An alternative to the above is to create a new user who has the sole
472 responsibility of running roundup. This user:
474 1. runs the CGI interface daemon
475 2. runs regular polls for email
476 3. runs regular checks (using cron) to ensure the daemon is up
477 4. optionally has no login password so that nobody but the "root" user
478    may actually login and play with the roundup setup.
481 Additional Language Codecs
482 --------------------------
484 If you intend to send messages to Roundup that use Chinese, Japanese or
485 Korean encodings the you'll need to obtain CJKCodecs from
486 http://cjkpython.berlios.de/
490 Maintenance
491 ===========
493 Read the separate `administration guide`_ for information about how to
494 perform common maintenance tasks with Roundup.
497 Upgrading
498 =========
500 Read the separate `upgrading document`_, which describes the steps needed to
501 upgrade existing tracker trackers for each version of Roundup that is
502 released.
505 Further Reading
506 ===============
508 If you intend to use Roundup with anything other than the defualt
509 templates, if you would like to hack on Roundup, or if you would
510 like implementation details, you should read `Customising Roundup`_.
513 Running Multiple Trackers
514 =========================
516 Things to think about before you jump off the deep end and install
517 multiple trackers, which involve additional URLs, user databases, email
518 addresses, databases to back up, etc.
520 1. Do you want a tracker per product you sell/support? You can just add
521    a new property to your issues called Product, and filter by that. See
522    the customisation example `adding a new field to the classic schema`_.
523 2. Do you want to track internal software development issues and customer
524    support issues separately? You can just set up an additional "issue"
525    class called "cust_issues" in the same tracker, mimicing the normal
526    "issue" class, but with different properties. See the customisation
527    example `tracking different types of issues`_.
530 Platform-Specific Notes
531 =======================
533 Windows command-line tools
534 --------------------------
536 To make the command-line tools accessible in Windows, you need to update
537 the "Path" environment variable in the Registry via a dialog box.
539 On Windows 2000 and later:
541 1) Press the "Start" button.
542 2) Choose "Settings"
543 3) Choose "Control Panel"
544 4) Choose "System"
545 5) Choose "Advanced"
546 6) Choose "Environmental Variables"
547 7) Add: "<dir>\Scripts" to the "Path" environmental variable.
549 Where <dir> in 7) is the root directory (e.g., ``C:\Python22\Scripts``)
550 of your Python installation.
552 I understand that in XP, 2) above is not needed as "Control
553 Panel" is directly accessible from "Start".
555 I do not believe this is possible to do in previous versions of Windows.
558 Windows Server
559 --------------
561 To have the Roundup web server start up when your machine boots up, set the
562 following up in Scheduled Tasks (note, the following is for a cygwin setup):
564 Run
565  ``c:\cygwin\bin\bash.exe -c "roundup-server TheProject=/opt/roundup/trackers/support"``
566 Start In
567  ``C:\cygwin\opt\roundup\bin``
568 Schedule
569  At System Startup
571 To have the Roundup mail gateway run periodically to poll a POP email address,
572 set the following up in Scheduled Tasks:
574 Run
575  ``c:\cygwin\bin\bash.exe -c "roundup-mailgw /opt/roundup/trackers/support pop roundup:roundup@mail-server"``
576 Start In
577  ``C:\cygwin\opt\roundup\bin``
578 Schedule
579  Every 10 minutes from 5:00AM for 24 hours every day
580  Stop the task if it runs for 8 minutes
583 Sendmail smrsh
584 --------------
586 If you use Sendmail's ``smrsh`` mechanism, you will need to tell
587 smrsh that roundup-mailgw is a valid/trusted mail handler
588 before it will work.
590 This is usually done via the following 2 steps:
592 1. make a symlink in ``/etc/smrsh`` called ``roundup-mailgw``
593    which points to the full path of your actual ``roundup-mailgw``
594    script.
596 2. change your alias to ``"|roundup-mailgw <tracker_home>"``
599 Linux
600 -----
602 Make sure you read the instructions under `UNIX environment steps`_.
604 Python 2.1.1 as shipped with SuSE7.3 might be missing module
605 ``_weakref``.
608 Solaris
609 -------
611 You'll need to build Python.
613 Make sure you read the instructions under `UNIX environment steps`_.
616 -------------------------------------------------------------------------------
618 Back to `Table of Contents`_
620 Next: `User Guide`_
622 .. _`table of contents`: index.html
623 .. _`user guide`: user_guide.html
624 .. _`roundup specification`: spec.html
625 .. _`tracker configuration`: customizing.html#tracker-configuration
626 .. _`customisation documentation`: customizing.html
627 .. _`Adding a new field to the classic schema`:
628    customizing.html#adding-a-new-field-to-the-classic-schema
629 .. _`Tracking different types of issues`:
630    customizing.html#tracking-different-types-of-issues
631 .. _`customising roundup`: customizing.html
632 .. _`upgrading document`: upgrading.html
633 .. _`administration guide`: admin_guide.html
634 .. _sqlite: http://www.hwaci.com/sw/sqlite/
635 .. _metakit: http://www.equi4.com/metakit/
636 .. _Psycopg: http://initd.org/software/initd/psycopg
637 .. _MySQLdb: http://sourceforge.net/projects/mysql-python