Page MenuHomeSoftware Heritage

Setup pgbouncer on prado
Closed, MigratedEdits Locked

Event Timeline

olasd changed the task status from Open to Work in Progress.
olasd raised the priority of this task from to Normal.
olasd updated the task description. (Show Details)
olasd added subscribers: zack, olasd.

pgbouncer has been setup on prado (port 6432) and should proxy all connections to postgres 9.4.

Configuration changed in ~/.pg_service.conf and ~/.pg_pass (for the port)

test

# tony at corellia in ~ [16:56:07]
$ psql "service=admin-swh"
psql (9.4.5)
Type "help" for help.

softwareheritage=> \conninfo
You are connected to database "softwareheritage" as user "swhstorage" on host "db.internal.softwareheritage.org" at port "6432".
softwareheritage=> select * from dbversion order by version desc limit 1;
 version |            release            |   description
---------+-------------------------------+------------------
      40 | 2016-01-15 15:49:27.311126+01 | Work In Progress
(1 row)

softwareheritage=>
# tony at corellia in ~ [16:56:34]
$ psql "service=swh"
psql (9.4.5)
Type "help" for help.

softwareheritage=> \conninfo
You are connected to database "softwareheritage" as user "guest" on host "db.internal.softwareheritage.org" at port "6432".
softwareheritage=> select * from dbversion order by version desc limit 1;
 version |            release            |   description
---------+-------------------------------+------------------
      40 | 2016-01-15 15:49:27.311126+01 | Work In Progress
(1 row)

softwareheritage=>

Added opportunistic TLS for client and server connections:

server_tls_sslmode = prefer

client_tls_sslmode = prefer
client_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
client_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem

With your changes regarding secure connection:

# tony at corellia in ~ [16:58:18]
$ psql "service=admin-swh"
psql (9.4.5)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128, compression: off)
Type "help" for help.

softwareheritage=> \conninfo
You are connected to database "softwareheritage" as user "swhstorage" on host "db.internal.softwareheritage.org" at port "6432".
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128, compression: off)
softwareheritage=> select * from dbversion order by version desc limit 1;
 version |            release            |   description
---------+-------------------------------+------------------
      40 | 2016-01-15 15:49:27.311126+01 | Work In Progress
(1 row)

softwareheritage=>
olasd claimed this task.

pgbouncer is now listening on port 5432, and postgres 9.4 on port 5439.

olasd changed the visibility from "All Users" to "Public (No Login Required)".May 13 2016, 5:08 PM