mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
puppet: Install the same version of postgres-client as the server.
We require a `pg_dump` whose version matches the version of the server
we are configured against (see 3a8b4b0205). Installing the latest
`postgresql-client` does not guarantee that we have such a binary
present.
This commit is contained in:
committed by
Tim Abbott
parent
6ad777c86f
commit
23504308fb
@@ -48,6 +48,14 @@ PostgreSQL documentation):
|
|||||||
overhead. I want to be sure that I connect to a server I trust,
|
overhead. I want to be sure that I connect to a server I trust,
|
||||||
and that it's the one I specify.
|
and that it's the one I specify.
|
||||||
|
|
||||||
|
Set the remote server's PostgreSQL version in `/etc/zulip/zulip.conf`:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
[postgresql]
|
||||||
|
# Set this to match the version running on your remote PostgreSQL server
|
||||||
|
version = 16
|
||||||
|
```
|
||||||
|
|
||||||
Then you should specify the password of the user zulip for the
|
Then you should specify the password of the user zulip for the
|
||||||
database in /etc/zulip/zulip-secrets.conf:
|
database in /etc/zulip/zulip-secrets.conf:
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class kandra::prometheus::postgresql {
|
|||||||
|
|
||||||
include zulip::postgresql_client
|
include zulip::postgresql_client
|
||||||
exec { 'create prometheus postgres user':
|
exec { 'create prometheus postgres user':
|
||||||
require => Package['postgresql-client'],
|
require => Class['zulip::postgresql_client'],
|
||||||
command => '/usr/bin/createuser -g pg_monitor prometheus',
|
command => '/usr/bin/createuser -g pg_monitor prometheus',
|
||||||
unless => 'test -f /usr/bin/psql && /usr/bin/psql -tAc "select usename from pg_user" | /bin/grep -xq prometheus',
|
unless => 'test -f /usr/bin/psql && /usr/bin/psql -tAc "select usename from pg_user" | /bin/grep -xq prometheus',
|
||||||
user => 'postgres',
|
user => 'postgres',
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
class zulip::postgresql_client {
|
class zulip::postgresql_client {
|
||||||
# This may get us a more recent client than the database server is
|
include zulip::postgresql_common
|
||||||
# configured to be, ($zulip::postgresql_common::version), but
|
package { "postgresql-client-${zulip::postgresql_common::version}":
|
||||||
# they're compatible.
|
|
||||||
package { 'postgresql-client':
|
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user