comparison doc/installation.txt @ 7045:ca90f7270cd4 issue2550923_computed_property

merge from main tip. This should fix test failure in Markdown2TestCase.test_string_markdown_code_block_attribute by merging html diff method used in tests.
author John Rouillard <rouilj@ieee.org>
date Mon, 07 Nov 2022 22:58:38 -0500
parents 031cdb92fa1d
children 48da482d7d93
comparison
equal deleted inserted replaced
6638:e1588ae185dc 7045:ca90f7270cd4
1 .. meta:: 1 .. meta::
2 :description language=en: 2 :description:
3 Everything about installing the Roundup issue tracker web and 3 Everything about installing the Roundup issue tracker web and
4 mail interfaces and configuring a tracker. How to download and 4 mail interfaces and configuring a tracker. How to download and
5 demonstrate Roundup using using command line or 5 demonstrate Roundup using using command line or
6 Docker. Optional software that adds functionality to Roundup. 6 Docker. Optional software that adds functionality to Roundup.
7 7
135 Roundup's responses can always be compressed with gzip from the 135 Roundup's responses can always be compressed with gzip from the
136 Python standard library. Also nginx and various wsgi server can 136 Python standard library. Also nginx and various wsgi server can
137 compress the response from roundup as they transmit/proxy it to the 137 compress the response from roundup as they transmit/proxy it to the
138 client. 138 client.
139 139
140 redis
141 Storing ephemeral data: session keys, CSRF tokens etc. can be
142 performance bottleneck. You can choose to deploy a Redis_ database
143 using the redis-py_ pypi package. See the section on
144 `Using Redis for Session Databases`_ in the `administration
145 guide`_ for details.
146
140 Windows Service 147 Windows Service
141 You can run Roundup as a Windows service if pywin32_ is installed. 148 You can run Roundup as a Windows service if pywin32_ is installed.
142 Otherwise it must be started manually. 149 Otherwise it must be started manually.
150
151 .. _Using Redis for Session Databases:
152 admin_guide.html#using-redis-for-session-databases
143 153
144 Getting Roundup 154 Getting Roundup
145 =============== 155 ===============
146 156
147 .. note:: 157 .. note::
157 For The Really Impatient 167 For The Really Impatient
158 ======================== 168 ========================
159 169
160 If you just want to give Roundup a whirl Right Now, then simply unpack 170 If you just want to give Roundup a whirl Right Now, then simply unpack
161 and run ``demo.py`` (it will be available as ``roundup-demo`` script 171 and run ``demo.py`` (it will be available as ``roundup-demo`` script
162 after installation). 172 after installation). (On systems that don't provide a ``python3``
173 program you might need to run ``python demo.py``.)
163 174
164 This will set up a simple demo tracker on your machine. [1]_ 175 This will set up a simple demo tracker on your machine. [1]_
165 When it's done, it'll print out a URL to point your web browser at 176 When it's done, it'll print out a URL to point your web browser at
166 so you may start playing. Three users will be set up: 177 so you may start playing. Three users will be set up:
167 178
172 183
173 .. [1] Demo tracker is set up to be accessed by localhost browser. 184 .. [1] Demo tracker is set up to be accessed by localhost browser.
174 If you run demo on a server host, please stop the demo when 185 If you run demo on a server host, please stop the demo when
175 it has shown startup notice, open file ``demo/config.ini`` with 186 it has shown startup notice, open file ``demo/config.ini`` with
176 your editor, change host name in the ``web`` option in section 187 your editor, change host name in the ``web`` option in section
177 ``[tracker]``, save the file, then re-run the demo program. 188 ``[tracker]``, save the file, then re-run the demo.py program.
178 189
179 Installation 190 Installation
180 ============ 191 ============
181 192
182 Set aside 15-30 minutes. There's several steps to follow in your 193 Set aside 15-30 minutes. There's several steps to follow in your
190 UNIX machine and want to restrict local access to roundup 201 UNIX machine and want to restrict local access to roundup
191 202
192 For information about how Roundup installs, see the `administration 203 For information about how Roundup installs, see the `administration
193 guide`_. 204 guide`_.
194 205
195 The following assumes that you are using the source distribution. If 206 The following assumes that you are using the source distribution.
196 you are using the Windows installer, run it with Administrator
197 privileges so it can correctly update the registry.
198 207
199 Basic Installation Steps 208 Basic Installation Steps
200 ------------------------ 209 ------------------------
201 210
202 To install the Roundup support code into your Python tree and 211 Installation of Roundup using Python3 in a virtual environment is
203 Roundup scripts into /usr/bin (substitute that path for whatever is 212 probably the path of least resistance. Use::
204 appropriate on your system). You need to have write permissions 213
205 for these locations, eg. being root on unix:: 214 python3 -m venv /path/to/environment/roundup
215
216 then proceed as below after activating (assuming a Bourne like shell)
217 the Python environment using::
218
219 . /path/to/environment/roundup/bin/activate
220
221 then use the alias ``deactivate`` to return to the normal Python
222 environment. If you create the virtual envirnment as a non-root user,
223 you can install below using the same user.
224
225 To install the Roundup support code into your Python tree and Roundup
226 scripts into /usr/bin (substitute that path for whatever is
227 appropriate on your system). You need to have write permissions for
228 these locations, so you may need to run wthese commands with ``sudo``
229 if root permission is required::
206 230
207 python setup.py install 231 python setup.py install
208 232
209 If you would like to place the Roundup scripts in a directory other 233 If you would like to place the Roundup scripts in a directory other
210 than ``/usr/bin``, then specify the preferred location with 234 than ``/usr/bin``, then specify the preferred location with
234 MySQL and Postgresql (Postgresl is untested). It also includes 258 MySQL and Postgresql (Postgresl is untested). It also includes
235 additional libraries that are listed in 259 additional libraries that are listed in
236 `scripts/Docker/requirements.txt`. 260 `scripts/Docker/requirements.txt`.
237 261
238 Email support is a work in progress. Outgoing email should work given 262 Email support is a work in progress. Outgoing email should work given
239 an external SMTP server. Reciving email should work by using a 263 an external SMTP server. Receiving email should work by using a
240 scheduled (cron) job to access email: 264 scheduled (cron) job to access email:
241 265
242 * `As a regular job using a mailbox source`_ 266 * `As a regular job using a mailbox source`_
243 * `As a regular job using a POP source`_ 267 * `As a regular job using a POP source`_
244 * `As a regular job using an IMAP source`_ 268 * `As a regular job using an IMAP source`_
263 docker build -t roundup-app --build-arg="source=pypi" \ 287 docker build -t roundup-app --build-arg="source=pypi" \
264 -f scripts/Docker/Dockerfile . 288 -f scripts/Docker/Dockerfile .
265 289
266 The docker declares a single volume mounted at 290 The docker declares a single volume mounted at
267 ``/usr/src/app/tracker`` inside the container. You will mount your 291 ``/usr/src/app/tracker`` inside the container. You will mount your
268 tracker home directory at this location. 292 tracker home directory at this location. The ``/usr/src/app`` path can
269 293 be changed by using ``--build-arg="appdir=/new/path"``.
294
295 You can also add additional modules to the docker container by using
296 `--build-arg="pip_mod=requests setproctitle"`.
297
298 Because of deficiencies in the docker program (see:
299 https://github.com/moby/moby/issues/29110#issuecomment-1100676306),
300 there is no way to determine the version of Python inside the
301 container and make that available as part of the build process. If
302 your build fails because the ``pythonversion does not match``, add the
303 suggested ``--build-arg`` to the ``docker build`` command line.
304
305 By default the container runs Roundup using UID 1000. By setting
306 `--build-arg="roundup_uid=2000"` you can change the UID.
270 307
271 Configuring Roundup in the Container 308 Configuring Roundup in the Container
272 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 309 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
273 310
274 Once the docker is created using one of the build commands above, run 311 Once the docker is created using one of the build commands above, run
276 313
277 docker run -it --rm -p 9017:8080 \ 314 docker run -it --rm -p 9017:8080 \
278 -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest 315 -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest
279 316
280 The ``-v`` option maps a directory from the host into the docker 317 The ``-v`` option maps a directory from the host into the docker
281 container. Note that uid 1000 is used by roundup. So the uid of the 318 container. Note that uid 1000 is used by roundup by default. The uid
282 directory (and all files under it) must be uid 1000. This example 319 of the directory (and all files under it) must match the uid. You can
283 assumes your tracker configs are in the tracker subdirectory. Replace 320 set the UID at image build time, see above. This
284 ``$PWD/tracker`` with the full path name to the directory where the 321 example assumes your tracker configs are in the tracker
285 tracker home(s) are to be stored. 322 subdirectory. Replace ``$PWD/tracker`` with the full path name to the
323 directory where the tracker home(s) are to be stored.
286 324
287 The ``-p`` option maps an external port (9017) to proxy the roundup 325 The ``-p`` option maps an external port (9017) to proxy the roundup
288 server running at port 8080 to the outside. 326 server running at port 8080 to the outside.
289 327
290 If the tracker directory is empty, the docker container will prompt 328 If the tracker directory is empty, the docker container will prompt
390 of the available backends can be found in `choosing your backend`_ 428 of the available backends can be found in `choosing your backend`_
391 below. The questions will be something like (you may have more 429 below. The questions will be something like (you may have more
392 templates or backends available):: 430 templates or backends available)::
393 431
394 Enter tracker home: /opt/roundup/trackers/support 432 Enter tracker home: /opt/roundup/trackers/support
395 Templates: classic 433 Templates: minimal, jinja2, classic, responsive, devel
396 Select template [classic]: classic 434 Select template [classic]: classic
397 Back ends: anydbm, mysql, sqlite 435 Back ends: anydbm, sqlite
398 Select backend [anydbm]: anydbm 436 Select backend [anydbm]: anydbm
399 437
400 Note: "Back ends" selection list depends on availability of 438 Note: "Back ends" selection list depends on availability of
401 third-party database modules. Standard python distribution 439 third-party database modules. Standard python distribution
402 includes anydbm module only. 440 includes anydbm and sqlite module only.
403 441
404 The "support" part of the tracker name can be anything you want - it 442 The "support" part of the tracker name can be anything you want - it
405 is going to be used as the directory that the tracker information 443 is going to be used as the directory that the tracker information
406 will be stored in. 444 will be stored in.
407 445
408 You will now be directed to edit the tracker configuration and 446 You will now be directed to edit the tracker configuration and
409 initial schema. At a minimum, you must set "main :: admin_email" 447 initial schema. At a minimum, you must set "tracker :: web",
410 (that's the "admin_email" option in the "main" section) "mail :: 448 "mail :: host", and "mail :: domain". You should also
411 host", "tracker :: web" and "mail :: domain". If you get stuck, 449 set "main :: admin_email" (that's the "admin_email" option in
450 the "main" section) to your local admin address to get email
451 on unusual occurances. If you get stuck,
412 and get configuration file errors, then see the `tracker 452 and get configuration file errors, then see the `tracker
413 configuration`_ section of the `customisation documentation`_. 453 configuration`_ section of the `customisation documentation`_.
414 454
415 If you just want to get set up to test things quickly (and follow 455 If you just want to get set up to test things quickly (and follow
416 the instructions in step 3 below), you can even just set the 456 the instructions in step 3 below), you can even just set the
493 ========== =========== ===== ============================== 533 ========== =========== ===== ==============================
494 Name Speed Users Support 534 Name Speed Users Support
495 ========== =========== ===== ============================== 535 ========== =========== ===== ==============================
496 anydbm Slowest Few Always available 536 anydbm Slowest Few Always available
497 sqlite Fastest(*) Few May need install (PySQLite_) 537 sqlite Fastest(*) Few May need install (PySQLite_)
498 postgresql Fast Many Needs install/admin (psycopg_) 538 postgresql Fast Many Needs install/admin (psycopg2_)
499 mysql Fast Many Needs install/admin (MySQLdb_) 539 mysql Fast Many Needs install/admin (MySQLdb_)
500 ========== =========== ===== ============================== 540 ========== =========== ===== ==============================
501 541
502 **sqlite** 542 **sqlite**
503 This uses the embedded database engine PySQLite_ to provide a very fast 543 This uses the embedded database engine PySQLite_ to provide a very fast
513 553
514 Roundup supports using sqlite's full text search capability. This 554 Roundup supports using sqlite's full text search capability. This
515 can improve searching if you are not installing another indexer like 555 can improve searching if you are not installing another indexer like
516 xapian or whoosh. It works best with English text. 556 xapian or whoosh. It works best with English text.
517 **postgresql** 557 **postgresql**
518 Backend for popular RDBMS PostgreSQL. You must read doc/postgresql.txt for 558 Backend for popular RDBMS PostgreSQL. You must read
519 additional installation steps and requirements. You must also configure 559 `doc/postgresql.txt`_ for additional installation steps and
560 requirements. You must also configure
520 the ``rdbms`` section of your tracker's ``config.ini``. It is recommended 561 the ``rdbms`` section of your tracker's ``config.ini``. It is recommended
521 that you use at least version 1.1.21 of psycopg. 562 that you use at least version 2.8 of psycopg2.
522 **mysql** 563 **mysql**
523 Backend for popular RDBMS MySQL. You must read doc/mysql.txt for additional 564 Backend for popular RDBMS MySQL. You must read `doc/mysql.txt`_ for
524 installation steps and requirements. You must also configure the ``rdbms`` 565 additional installation steps and requirements. You must also
525 section of your tracker's ``config.ini`` 566 configure the ``rdbms`` section of your tracker's ``config.ini``
526 567
527 You may defer your decision by setting your tracker up with the anydbm 568 You may defer your decision by setting your tracker up with the anydbm
528 backend (which is guaranteed to be available) and switching to one of the 569 backend (which is guaranteed to be available) and switching to one of the
529 other backends at any time using the instructions in the `administration 570 other backends at any time using the instructions in the `administration
530 guide`_. 571 guide`_.
1132 Create a user roundup-foo, group roundup-foo to run the tracker. Add 1173 Create a user roundup-foo, group roundup-foo to run the tracker. Add
1133 the following apache config to 1174 the following apache config to
1134 /etc/apache2/sites-available/roundup-foo (under debian/Ubunutu, modify 1175 /etc/apache2/sites-available/roundup-foo (under debian/Ubunutu, modify
1135 as needed): 1176 as needed):
1136 1177
1137 .. code:: xml 1178 .. code:: ApacheConf
1138 1179
1139 ServerAdmin webmaster@example.com 1180 ServerAdmin webmaster@example.com
1140 ErrorLog /var/log/apache2/error.log 1181 ErrorLog /var/log/apache2/error.log
1141 1182
1142 LogLevel notice 1183 LogLevel notice
1558 4) Choose "System" 1599 4) Choose "System"
1559 5) Choose "Advanced" 1600 5) Choose "Advanced"
1560 6) Choose "Environmental Variables" 1601 6) Choose "Environmental Variables"
1561 7) Add: "<dir>\Scripts" to the "Path" environmental variable. 1602 7) Add: "<dir>\Scripts" to the "Path" environmental variable.
1562 1603
1563 Where <dir> in 7) is the root directory (e.g., ``C:\Python22\Scripts``) 1604 Where <dir> in 7) is the root directory (e.g., ``C:\Python27\Scripts``)
1564 of your Python installation. 1605 of your Python installation.
1565 1606
1566 I understand that in XP, 2) above is not needed as "Control 1607 I understand that in XP, 2) above is not needed as "Control
1567 Panel" is directly accessible from "Start". 1608 Panel" is directly accessible from "Start".
1568 1609
1700 must have at least the rights to create and drop databases. 1741 must have at least the rights to create and drop databases.
1701 Documentation: details on `adding MySQL users`_, 1742 Documentation: details on `adding MySQL users`_,
1702 for PostgreSQL you want to call the ``createuser`` command with the 1743 for PostgreSQL you want to call the ``createuser`` command with the
1703 ``-d`` option to allow database creation. 1744 ``-d`` option to allow database creation.
1704 1745
1705 Once you've unpacked roundup's source, if you have pytest installed, 1746 This can only be done if you downloaded and unpacked the source
1706 run ``python -m pytest test`` in the source directory and make sure 1747 distrbution. It will not work if you used `pip install` as the test
1707 there are no errors. If there are errors, please let us know! 1748 suite is not installed. Once you've unpacked roundup's source, if you
1708 1749 have pytest installed, run ``python -m pytest test`` in the source
1709 .. _`table of contents`: index.html 1750 directory and make sure there are no errors. If there are errors,
1751 please let us know!
1752
1710 .. _`user guide`: user_guide.html 1753 .. _`user guide`: user_guide.html
1711 .. _`roundup specification`: spec.html 1754 .. _`roundup specification`: spec.html
1712 .. _`tracker configuration`: customizing.html#tracker-configuration 1755 .. _`tracker configuration`: customizing.html#tracker-configuration
1713 .. _`customisation documentation`: customizing.html 1756 .. _`customisation documentation`: customizing.html
1714 .. _`preventing spam`: customizing.html#preventing-spam 1757 .. _`preventing spam`: customizing.html#preventing-spam
1717 .. _`Tracking different types of issues`: 1760 .. _`Tracking different types of issues`:
1718 customizing.html#tracking-different-types-of-issues 1761 customizing.html#tracking-different-types-of-issues
1719 .. _`customising roundup`: customizing.html 1762 .. _`customising roundup`: customizing.html
1720 .. _`upgrading document`: upgrading.html 1763 .. _`upgrading document`: upgrading.html
1721 .. _`administration guide`: admin_guide.html 1764 .. _`administration guide`: admin_guide.html
1765 .. _`doc/postgresql.txt`: postgresql.html
1766 .. _`doc/mysql.txt`: mysql.html
1722 1767
1723 1768
1724 .. _External hyperlink targets: 1769 .. _External hyperlink targets:
1725 1770
1726 1771
1738 .. _mistune: https://pypi.org/project/mistune/ 1783 .. _mistune: https://pypi.org/project/mistune/
1739 .. _mod_python: https://github.com/grisha/mod_python 1784 .. _mod_python: https://github.com/grisha/mod_python
1740 .. _mod_wsgi: https://pypi.org/project/mod-wsgi/ 1785 .. _mod_wsgi: https://pypi.org/project/mod-wsgi/
1741 .. _MySQLdb: https://pypi.org/project/mysqlclient/ 1786 .. _MySQLdb: https://pypi.org/project/mysqlclient/
1742 .. _Olson tz database: https://www.iana.org/time-zones 1787 .. _Olson tz database: https://www.iana.org/time-zones
1743 .. _Psycopg: https://www.psycopg.org/ 1788 .. _Psycopg2: https://www.psycopg.org/
1744 .. _pyjwt: https://pypi.org/project/PyJWT/ 1789 .. _pyjwt: https://pypi.org/project/PyJWT/
1745 .. _pyopenssl: https://pypi.org/project/pyOpenSSL/ 1790 .. _pyopenssl: https://pypi.org/project/pyOpenSSL/
1746 .. _pysqlite: https://pysqlite.org/ 1791 .. _pysqlite: https://pysqlite.org/
1747 .. _pytz: https://pypi.org/project/pytz/ 1792 .. _pytz: https://pypi.org/project/pytz/
1748 .. _pywin32: https://pypi.org/project/pywin32/ 1793 .. _pywin32: https://pypi.org/project/pywin32/
1794 .. _Redis: https://redis.io
1795 .. _redis-py: https://pypi.org/project/redis/
1749 .. _Whoosh: https://whoosh.readthedocs.org/en/latest 1796 .. _Whoosh: https://whoosh.readthedocs.org/en/latest
1750 .. _Xapian: https://xapian.org/ 1797 .. _Xapian: https://xapian.org/
1751 .. _zstd: https://pypi.org/project/zstd/ 1798 .. _zstd: https://pypi.org/project/zstd/

Roundup Issue Tracker: http://roundup-tracker.org/