Commit Graph

61 Commits

Author SHA1 Message Date
7fb45a507d Make --tags=run-postgres-vacuum and --tags=upgrade-postgres not assume Synapse
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2211
2022-10-28 17:40:12 +03:00
ff0fc88fae Make Postgres import not break for databases with special names
We haven't encountered such a problem yet, but it doesn't hurt to
make things more robust.
2022-10-21 11:25:30 +03:00
0b44ec19b4 Do not override matrix_postgres_import_roles_to_ignore/matrix_postgres_import_databases_to_ignore in group_vars
These values that we were setting also make sense in the context of the
`matrix-postgres` role even when not used within the playbook.
2022-10-21 10:01:22 +03:00
bed9c18ab0 Pin Postgres version to 15.0
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2180

Just specifying `15` means we won't automatically re-pull `15.1` when it comes out.
2022-10-21 05:32:02 +03:00
af3a32cf6a Fix Jinja2 interpolation for some default variables
We're overriding these in the correct way in `group_vars/matrix_servers`
so this wasn't causing any problem in practice.
2022-10-20 15:46:02 +03:00
2eef6af23e Bump postgres version to newly released 15 2022-10-19 10:45:11 -04:00
62215a87fe Upgrade Postgres minor versions (14.4 -> 14.5, 13.7 -> 13.8, etc.) 2022-10-14 16:25:57 +03:00
1ea1597020 Fix some ansible-lint-reported warnings
This mostly fixes `key-order` warnings around
`block` statements.
2022-09-27 11:38:33 +03:00
c1849ae888 Fix the remaining var-spacing ansible-lint errors
Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#var-spacing
2022-07-18 15:33:41 +03:00
ddf18eadc7 More ansible-lint fixes 2022-07-18 13:01:17 +03:00
e149f33140 add/unify 'Project source code URL' link across all roles 2022-07-16 23:59:21 +03:00
5963a387f0 Upgrade Postgres (14.3 -> 14.4) 2022-06-22 14:43:55 +03:00
4109dc3bcd Update Postgres (CVE-2022-1552 + last 9.x update)
CVE: https://security-tracker.debian.org/tracker/CVE-2022-1552
Source: https://www.postgresql.org/about/news/postgresql-143-137-1211-1116-and-1021-released-2449/
Postgres 9.6 upgrade (**not a CVE fix, 9.x still vulnerable**): https://www.postgresql.org/docs/release/9.6.24/
2022-05-16 19:56:54 +00:00
d5de1e8352 Document that using an external Postgres server has serious downsides
Related to:

- https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1682
- https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1679
2022-03-08 09:30:20 +02:00
f0e30c76f3 Postgres Minor Updates (14.2, 13.6, 12.10, 11.15, 10.20) 2022-02-16 09:22:25 +00:00
7e5b88c3b7 fix: all praise the allmighty yamllinter 2022-02-05 21:32:54 +01:00
61b743f86d Postgres Minor Updates (14.1, 13.5, 12.9, 11.14, 10.19) 2021-11-14 19:10:56 +00:00
09ac950d17 Fix dump importing (backup restore) into Postgres v14
In short, the problem is that older Postgres versions store passwords
hashed as md5. When you dump such a database, the dump naturally also
contains md5-hashed passwords.
Restoring from that dump used to create users and updates their passwords
with these md5 hashes.
However, Postgres v14 prefers does not like md5-hashed passwords now (by default),
which breaks connectivity. Postgres v14 prefers `scram-sha-256` for
authentication.

Our solution is to just ignore setting passwords (`ALTER ROLE ..`
statements) when restoring dumps. We don't need to set passwords as
defined in the dump anyway, because the playbook creates users
and manages their passwords by itself.

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1340
2021-10-21 16:38:56 +03:00
096c960b84 Add support for Postgres v14 2021-10-01 11:27:40 +03:00
48548eb561 Postgres Minor Updates 2021-08-22 18:45:25 +05:30
d338090f00 postgres minor updates 2021-06-30 10:00:52 +05:30
e335f3fc77 rename matrix_global_registry to matrix_container_global_registry_prefix related to #990
Signed-off-by: Ahmad Haghighi <haghighi@fedoraproject.org>
2021-04-12 17:23:55 +04:30
f52a8b6484 use custom docker registry 2021-04-12 17:23:55 +04:30
5cfeae806b Merge branch 'master' into synapse-workers 2021-02-14 13:00:57 +02:00
7d39e5153a Upgrade Postgres minor versions 2021-02-14 09:12:29 +02:00
183adec3d8 Merge remote-tracking branch 'origin/master' into synapse-workers 2021-01-23 15:04:11 +01:00
bef0702fea Wait some more when starting Postgres during setup on ARM 2021-01-22 16:21:30 +02:00
f9c1d62435 Fix Postgres database (-alpine) failing to start on ARM32 2021-01-22 13:52:55 +02:00
95346f3117 Reorganize Postgres access (breaking change)
In short, this makes Synapse a 2nd class citizen,
preparing for a future where it's just one-of-many homeserver software
options.

We also no longer have a default Postgres superuser password,
which improves security.

The changelog explains more as to why this was done
and how to proceed from here.
2021-01-22 13:26:12 +02:00
cd8100544b Merge remote-tracking branch 'origin/master' into synapse-workers
Sync with upstream
2021-01-08 20:58:50 +01:00
ad1425eee4 Add pgloader self-building support (for ARM) 2020-12-23 09:08:54 +02:00
dd797ba6a7 Fix Postgres database importing/upgrading conflicts
We were running into conflicts, because having initialized
the roles (users) and databases, trying to import leads to
errors (role XXX already exists, etc.).

We were previously ignoring the Synapse database (`homeserver`)
when upgrading/importing, because that one gets created by default
whenever the container starts.

For our additional databases, it's a similar situation now.
It's not created by default as soon as Postgres starts with an empty
database, but rather we create it as part of running the playbook.

So we either need to skip those role/database creation statements
while upgrading/importing, or to avoid creating the additional database
and rely on the import for that. I've gone for the former, because
it's already similar to what we were doing and it's simpler
(it lets `setup_postgres.yml` be the same in all scenarios).
2020-12-14 22:28:20 +02:00
cb969c6ca2 Add --tags=import-generic-sqlite-db (pgloader import)
This can be used by various bridges, etc., to import an SQLite
(or some other supported) database into Postgres.
2020-12-14 02:23:29 +02:00
183d2a10db Ensure matrix-postgres.service is started before creating additional users/databases 2020-12-14 00:59:59 +02:00
46a4034d3e Use "password" for additional Postgres databases, not "pass"
Being more explicit sounds better.
2020-12-14 00:43:03 +02:00
0641106370 Allow username of additional Postgres databases to be different
We'll most likely use one that matches the database name, but
it's better to have it configurable.
2020-12-13 22:37:04 +02:00
dac0d3a682 Add default matrix_postgres_additional_databases 2020-12-13 21:07:16 +02:00
47613e5a27 Remove synapse-janitor support
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/746
2020-12-11 23:24:42 +02:00
b73ac965ac Merge remote-tracking branch 'origin/master' into synapse-workers 2020-12-01 21:24:26 +01:00
3e2355282b Upgrade Postgres minor versions
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/727
2020-11-24 09:06:19 +02:00
ccabc82d4c Use more fully-qualified container images
This is both for consistency with 93cc71cb69976c
and for making things more obvious.
2020-11-14 23:01:11 +02:00
93a8ea7e4a Merge remote-tracking branch 'master' into feature/add-worker-support 2020-10-11 20:59:05 +02:00
3a3383fada Add support for postgres 13 2020-09-30 16:50:59 -05:00
1e68d8b2e5 allow to pass arguments to the postgres process 2020-09-11 14:29:10 +02:00
20eea648a5 Update postgres versions (12.3 -> 12.4, etc) 2020-08-16 14:41:40 -05:00
ee3944bcdb Update postgres (12.2 -> 12.3, etc) 2020-05-21 11:40:40 -05:00
e36de7e627 Update postgres (12.1 -> 12.2, etc) 2020-03-18 06:50:51 -05:00
c55682d099 Update synapse-janitor to support current synapse database schema 2020-03-06 17:48:16 +01:00
4a60f385d1 Update postgres versions (12.0 -> 12.1, etc) 2019-11-21 09:38:37 -06:00
9c438a3870 Add support for Postgres v12 2019-10-04 08:51:36 +03:00