Commit graph

70 commits

Author SHA1 Message Date
Kevin Fenzi
79e99af9ce postgresql_server: Do not run the timescaledb setup on all the staging db servers.
We only want to run this on db-datanommer02, not that and all the other
staging postgresql servers. :)

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-09-30 15:49:33 -07:00
Aurélien Bompard
530d4672de
Syntax fix
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:47:06 +02:00
Aurélien Bompard
bd3a1b3912
Datanommer: enable the timescaledb extension on the DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:45:52 +02:00
Aurélien Bompard
4b4f1b99d8
datanommer: create the database and users
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:26:00 +02:00
Aurélien Bompard
4cf50fdad2
datanommer02: deploy timescaledb
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 09:55:32 +02:00
Aurélien Bompard
73f19b84e3
Use import instead of include
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-08-10 10:54:18 +02:00
Aurélien Bompard
76d3ead677
Deploy TimescaleDB on staging datanommer DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-08-10 10:37:24 +02:00
Kevin Fenzi
e25775ed59 postgresql: fix db-fas01.stg breakage from playbook runs
In prod db-fas01 is rhel7 and uses postgresql 9.6.
In staging db-fas01.stg is rhel8, and should also use postgresql 9.6,
but we were blanket making rhel8 hosts use postgresql 12.
We could drop this by reinstalling db-fas01.stg with rhel7, or waiting
until we finally kill fas2 and just setting them both to use postgresql
12.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-07-26 13:53:56 -07:00
Kevin Fenzi
2379b465ab postgres / server / koji sessions script: remove
Turns out copy module doesn't actually have a 'absent' state.
So, just remove this (we no longer need it as there's a timer on koji
hub that does this from there).

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-08-26 13:50:33 -07:00
Kevin Fenzi
8530a1c075 postgresql_server: new shiny template .conf file for postgresql 12
I took the default postgresql.conf from postgresql 12 and then added in
various changes we already manually made and variable substitions we
already had setup back in the postgresq 9.2 days.

This will apply to db-koji01, db-qa01, db-datanommer01 at least.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-22 15:08:23 -07:00
Kevin Fenzi
d92ff41412 postgresql: do NOT put a recovery.conf file on db-koji01 anymore
In phx2 we had a warm standby database host (db-koji02), but we no
longer have that host in iad2, so we shouldn't try and make db-koji01
handle that. Also, this was just changed mistakenly as it's the warm
standby host that should get the recovery.conf file.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-21 09:20:12 -07:00
Kevin Fenzi
f2a1a3f203 postgresql_server: make sure db-koji01 gets the right backup script.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-18 18:54:12 -07:00
Stephen Smoogen
12c486cda3 remove some hosts in inventory file which do not exist in IAD2. 2020-06-14 19:51:27 -04:00
Kevin Fenzi
ab7d661781 koji hub: re-enable gc jobs, disable session cleanup on db-koji01
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-11 12:08:59 -07:00
Kevin Fenzi
2fe67cd8c1 postgresql-server: fix indent
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-10 11:55:55 -07:00
Stephen Smoogen
7ed926aafc backup-database needs to be installed on all postgres boxes 2020-06-09 15:04:43 -04:00
Stephen Smoogen
b0c389b2dc make backups on all systems 2020-06-09 15:01:30 -04:00
Stephen Smoogen
e76b85ec2d and this will unfix my fix by fixing the other fix for postgres 2020-06-09 14:51:04 -04:00
Stephen Smoogen
422265dc0b RHEL-8 postgres boxes needed pxz and other items spelled out 2020-06-09 14:47:38 -04:00
Stephen Smoogen
3015b75976 remove db-koji02 as it is now db-koji01 2020-06-09 14:29:28 -04:00
Kevin Fenzi
b9eed95b04 db-fas01.iad2: move back to rhel7, fas is not happy with new postgres
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-05-20 14:40:29 -07:00
Kevin Fenzi
c034afc53c postgresql server: fix indent
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-05-19 12:20:58 -07:00
Kevin Fenzi
e918a3b08f postgresql / server: enable the postgresql 12 module on rhel8 hosts
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-05-19 12:16:45 -07:00
Pierre-Yves Chibon
13ad0cea66 postgresql_server: do not install our current postgresql.conf on RHEL8
Our postgresql.conf is from postgresql 9.2 while RHEL8 ships 10.x which
leads to postgresql no longer wanting to start (as seen on pagure-stg01).

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-04-24 21:34:29 +02:00
Pierre-Yves Chibon
e7673a2538 postgresql_server: adjust the name of the packages for RHEL8
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-04-24 21:34:29 +02:00
Pierre-Yves Chibon
56cf212d1f postgresql_server: there is no python2-psycopg on RHEL8, so use python3
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-04-24 21:34:29 +02:00
Kevin Fenzi
7242a1a583 db-koji02: actually deploy the right backup script
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:28 +02:00
Kevin Fenzi
bd50c6e4bc db-koji02: make sure backup uses all cpus
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:28 +02:00
Kevin Fenzi
0a5cb2c51c postgresql_server: Fix spelling mistake
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
9747e55c72 db-koji02: create vm and config files for hot standby kojidb.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:12 +02:00
Kevin Fenzi
81fb4582e7 ansible: change when conditions to use == instead of is when checking strings.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Karsten Hopp
c9ed62ac32 update ansible_distribution_major_version conditionals
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2020-04-24 21:34:10 +02:00
Karsten Hopp
65fc4a4ecc postgresql_server: dnf -> package, with_item changes 2019-06-11 17:15:27 +02:00
Kevin Fenzi
c96327ccfe anitya/release-monitoring: db backup cron has to be mode 644, not 755.
https://pagure.io/fedora-infrastructure/issue/7479

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-01-07 18:27:03 +00:00
Kevin Fenzi
f0c596c427 Try and make a public anitya dump with the right tables. 2018-10-08 17:41:07 +00:00
Kevin Fenzi
84bd8c1c4a Also install pxz on fedora 2018-06-30 04:04:17 +00:00
Pierre-Yves Chibon
e4055e1d87 Add SAR script for datagrepper/datanommer
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-05-16 12:15:37 +02:00
Mikolaj Izdebski
928cc3f0de Fix postgresql_server initdb
Empty /var/lib/pgsql/ directory is created during postgresql-server
package installation.  We need another file to detect whether DB has
already been initialized.
2018-03-03 01:46:46 +00:00
Patrick Uiterwijk
adcbf72f03 Packageize this, packageize that, packageize the world
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 22:25:52 +00:00
Kevin Fenzi
6b0faf84c0 use pxz for database dumps, might make them a good deal faster 2017-10-04 20:06:40 +00:00
f872d71b3f actually change the directive to dnf instead of copy-pasting 2016-08-10 12:41:55 +00:00
f19c5ff77d adding dnf support to the postgresql_server role 2016-08-10 12:39:24 +00:00
Kevin Fenzi
04a52b8667 Death to all trailing whitespace. 2016-08-08 19:36:31 +00:00
Kevin Fenzi
0c983d9fd9 Fix the cron so it runs correctly. 2016-04-13 18:22:49 +00:00
Kevin Fenzi
f0d34369c5 Add script from jberkus to kill idle/locked transactions and log information about them on db-koji01 2016-04-13 17:46:41 +00:00
Kevin Fenzi
3b67f74b90 Fix script to be executable 2015-04-27 18:25:55 +00:00
Kevin Fenzi
28b402ded1 Add missing fasdb cleanup sessions cron job. 2015-04-27 16:24:27 +00:00
Patrick Uiterwijk
229669ec6b Updating postgresql config requires postgres restart 2014-12-18 03:53:33 +00:00
Kevin Fenzi
bb408a1c1f Fix postgresql role for smaller memory machines. 2014-12-08 14:47:06 +00:00
Praveen Kumar
4b1e5162d7 Update state from installed/removed to present/absent for yum module as per latest documents -> http://docs.ansible.com/yum_module.html 2014-11-05 15:32:11 +00:00