Skip to content

Commit

Permalink
chore: bump adminapi and admin-mgr binaries (#792)
Browse files Browse the repository at this point in the history
* chore: bump admin-api and admin-mgr

* chore: init read-replica.conf
* and ensure it's accounted for everywhere

* chore: bump version

* chore: remove rc versioning

* chore: use admin-api v0.54.0 instead

* chore: include read-replica.conf from start
  • Loading branch information
dragarcia authored and pcnc committed Nov 20, 2023
1 parent 54d1010 commit f55dc97
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-u18
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down
5 changes: 5 additions & 0 deletions ansible/files/postgresql_config/custom_read_replica.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# hot_standby = on
# restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1'
# recovery_target_timeline = 'latest'

# primary_conninfo = 'host=localhost port=6543 user=replication'
3 changes: 3 additions & 0 deletions ansible/files/postgresql_config/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ jit_provider = 'llvmjit' # JIT library to use
# WAL-G specific configurations
#include = '/etc/postgresql-custom/wal-g.conf'

# read replica specific configurations
include = '/etc/postgresql-custom/read-replica.conf'

# supautils specific configurations
#include = '/etc/postgresql-custom/supautils.conf'

Expand Down
9 changes: 9 additions & 0 deletions ansible/tasks/setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@
dest: /etc/postgresql/pg_ident.conf
group: postgres

# Add custom config for read replicas set up
- name: Move custom read-replica.conf file to /etc/postgresql-custom/read-replica.conf
template:
src: "files/postgresql_config/custom_read_replica.conf.j2"
dest: /etc/postgresql-custom/read-replica.conf
mode: 0664
owner: postgres
group: postgres

# Install extensions before init
- name: Install Postgres extensions
import_tasks: tasks/setup-docker.yml
Expand Down
4 changes: 2 additions & 2 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ postgres_exporter_release_checksum:
arm64: sha256:29ba62d538b92d39952afe12ee2e1f4401250d678ff4b354ff2752f4321c87a0
amd64: sha256:cb89fc5bf4485fb554e0d640d9684fae143a4b2d5fa443009bd29c59f9129e84

adminapi_release: 0.51.0
adminmgr_release: 0.10.2
adminapi_release: 0.54.0
adminmgr_release: 0.13.1

# Postgres Extensions
postgis_release: "3.3.2"
Expand Down
1 change: 1 addition & 0 deletions docker/orioledb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down

0 comments on commit f55dc97

Please sign in to comment.