Mercurial > p > roundup > code
annotate doc/postgresql.txt @ 7441:e7df82ae137d
Cleanup docker before 2.3.0b1 release
scripts/Docker/Dockerfile
Document/implement pip_sdist source mode for testing the source
distribution. Change from multiple if's to case statement.
Disable verbose tracing of shells script. Use
--build-arg="VERBOSE=1" to enable set -xv.
scripts/Docker/roundup_start
Report error if demo mode is used with 2.2.0. This catches the
easiest case where build is done using pypi before 2.3.0 final is
released.
Indent demo mode PORT_8080 doc block so it's not lost in a wall of
text.
doc/installation.txt
Document all source --build-args including how to build from pypi
using a version specifier. Break out other uses of --build-arg into
code blocks.
Reference docker compose section rather than referencing
docker-compose.yml.
Clarify docker hub tagging for devel releases.
Minor formatting fixes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 31 May 2023 19:14:56 -0400 |
| parents | b21ebabeb2ef |
| children | 3071db43bfb6 |
| rev | line source |
|---|---|
| 6167 | 1 .. index:: postgres; deployment notes |
| 6163 | 2 |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
3 ========================== |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
4 PostgreSQL/psycopg Backend |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
5 ========================== |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
3059
213468d6e7c9
Add installation documentation for tsearch2.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
2860
diff
changeset
|
7 This are notes about PostqreSQL backend based on the psycopg adapter for |
|
213468d6e7c9
Add installation documentation for tsearch2.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
2860
diff
changeset
|
8 Roundup issue tracker. |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
9 |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
10 Prerequisites |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
11 ============= |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
13 To use PostgreSQL as backend for storing roundup data, you should |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
14 additionally install: |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
15 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
16 1. PostgreSQL_ 8.x or higher |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
17 |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
18 2. The psycopg_ python interface to PostgreSQL_ |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
20 Note that you currently need at least version 2.8 of psycopg_ -- the |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
21 postgresql backend will work with 2.7 but if you're using the native |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
22 postgresql indexer you need at least 2.8. Also if you want to run the |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
23 tests, these also need 2.8. If your distribution has an older version we |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
24 suggest that you install into a python virtual environment. |
|
3666
8304a1c1cc98
encourage use of latest psycopg
Richard Jones <richard@users.sourceforge.net>
parents:
3500
diff
changeset
|
25 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
26 .. _psycopg: https://www.psycopg.org/ |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
27 .. _PostgreSQL: https://www.postgresql.org/ |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
28 |
|
3666
8304a1c1cc98
encourage use of latest psycopg
Richard Jones <richard@users.sourceforge.net>
parents:
3500
diff
changeset
|
29 |
|
1906
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
30 Running the PostgreSQL unit tests |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
31 ================================= |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
32 |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
33 The user that you're running the tests as will need to be able to access |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
34 the postgresql database on the local machine and create and drop |
|
4513
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
4512
diff
changeset
|
35 databases. See the config values in 'test/db_test_base.py' |
|
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
4512
diff
changeset
|
36 about which database connection, name and user will be used. |
|
1906
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
37 |
|
7409
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
38 At this time the following command will setup the user:: |
|
1906
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
39 |
|
7409
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
40 sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
41 |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
42 Note ``rounduptest`` is a well known account, so you should |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
43 remove/disable the account after testing and set up a suitable |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
44 production account. You need to remove any database owned by |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
45 ``rounduptest`` first. So something like this should work:: |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
46 |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
47 |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
48 sudo -u postgres psql -c "DROP DATABASE rounduptest;" -U postgres |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
49 sudo -u postgres psql -c "DROP ROLE rounduptest;" -U postgres |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
50 |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
51 If the ``rounduptest`` database is left in a broken state |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
52 (e.g. because of a crash during testing) dropping the database and |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
53 restarting the tests should fix it. |
|
b21ebabeb2ef
Add warning rounduptest user: pg;mysql; add db account creation pg
John Rouillard <rouilj@ieee.org>
parents:
6662
diff
changeset
|
54 |
|
2594
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
55 Credit |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
56 ====== |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
57 |
|
2594
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
58 The postgresql backend was originally submitted by Federico Di Gregorio |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
59 <fog@initd.org> |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
60 |
