From 5b862b8c1af0f7b76cb99822e4d2319eeb316ce4 Mon Sep 17 00:00:00 2001 From: matthias Date: Fri, 29 Nov 2024 12:22:08 +0100 Subject: [PATCH 1/4] add no_Leader to True for automatic restore via pgbackrest --- scripts/configure_spilo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/configure_spilo.py b/scripts/configure_spilo.py index bea2e1c..1f8675a 100755 --- a/scripts/configure_spilo.py +++ b/scripts/configure_spilo.py @@ -384,6 +384,7 @@ def deep_update(a, b): command: pgbackrest --stanza=db --delta restore keep_data: True no_params: True + no_leader: True {{/USE_PGBACKREST}} {{#USE_WALE}} wal_e: From 08e588c7954dd5a3fa82282ee506c673ae326bcf Mon Sep 17 00:00:00 2001 From: matthias Date: Fri, 6 Dec 2024 08:53:57 +0100 Subject: [PATCH 2/4] postgres & postgres-gis modified --- docker/postgres-gis/Dockerfile | 7 ++++--- docker/postgres/Dockerfile | 2 +- tatus | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 tatus diff --git a/docker/postgres-gis/Dockerfile b/docker/postgres-gis/Dockerfile index 88739e7..d721c8f 100644 --- a/docker/postgres-gis/Dockerfile +++ b/docker/postgres-gis/Dockerfile @@ -18,7 +18,7 @@ ARG ETCD_VERSION ARG ARCH # Spilo-specific -ENV SET_USER=REL4_0_1 \ +ENV SET_USER=REL4_1_0 \ PAM_OAUTH2=v1.0.1 \ PG_PERMISSIONS=REL_1_3 \ PLANTUNER_COMMIT=800d81bc85da64ff3ef66e12aed1d4e1e54fc006 \ @@ -126,8 +126,9 @@ RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python && cd admin/runit-2.1.2 && package/install \ && ln -s /usr/local/bin/runsvdir /usr/bin/runsvdir \ && rm -rf /pg_permissions /pgextwlist /pg_stat_kcache /pgnodemx /timescaledb /set_user /pam-oauth2 \ - && rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest \ - && ${PACKAGER} -y remove $(rpm -qa "*devel*") python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel \ + && rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest; + + RUN ${PACKAGER} -y remove $(rpm -qa "*devel*") python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel --exclude libgeotiff17-devel --exclude libtiff-devel --exclude libspatialite50-devel \ && ${PACKAGER} -y autoremove \ && ${PACKAGER} -y clean dbcache \ && ${PACKAGER} -y clean all; diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile index 21f988a..13f242a 100644 --- a/docker/postgres/Dockerfile +++ b/docker/postgres/Dockerfile @@ -17,7 +17,7 @@ ARG ETCD_VERSION ARG ARCH # Spilo-specific -ENV SET_USER=REL4_0_1 \ +ENV SET_USER=REL4_1_0 \ PAM_OAUTH2=v1.0.1 \ PG_PERMISSIONS=REL_1_3 \ PLANTUNER_COMMIT=800d81bc85da64ff3ef66e12aed1d4e1e54fc006 \ diff --git a/tatus b/tatus new file mode 100644 index 0000000..633c0a4 --- /dev/null +++ b/tatus @@ -0,0 +1,26 @@ + CON-878 + action_check_packages + build_workflow + etcd3 + exporter_fix + fixICU + fixUpgrade + fixUpgradeError + fixpgbackrest + main +* noLeaderpgBackRest + pgnodemx-fix-template + post_script + postgis-fix + postgresql17_public_beta + removeMergeConflicts + stanzaUpgradeFix + timescaledb_via_packages + updateDockerfilepgBackRest + updateDockerfiles + updateExtensions + updateReadme + update_components + update_dockerfiles-postgis + upgrade_fixes + wal_dir From f46bd61312f9ec1eacb1e569e4f2ee7fb6fdbca6 Mon Sep 17 00:00:00 2001 From: matthias Date: Fri, 6 Dec 2024 08:54:41 +0100 Subject: [PATCH 3/4] base-dockerfile cleanup --- docker/base/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index f51e633..c66aaf6 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -2,18 +2,13 @@ ARG BASE_IMAGE ARG IMAGE_REPOSITORY ARG PATH FROM $BASE_IMAGE -#FROM ${IMAGE_REPOSITORY}${PATH}${BASE_IMAGE} -# Arg for distinguish between ubi and rocky and other stuff -#ARG BASEOS ARG PACKAGER MAINTAINER CYBERTEC PostgreSQL International GmbH LABEL vendor="CYBERTEC PostgreSQL International GmbH" url="https://www.cybertec-postgresql.com" LABEL maintainer="Matthias Groemmer " -#RUN microdnf -y --nodocs --noplugins --setopt=install_weak_deps=0 install ${PACKAGER} - RUN ${PACKAGER} -y install --nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm vim && ${PACKAGER} -y upgrade RUN ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 \ @@ -28,7 +23,6 @@ RUN ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 \ glibc-langpack-en \ openssh-clients \ openssh-server \ - #dnf-command(config-manager) \ && ${PACKAGER} -y clean all ; #Enable CRB-Repo (Powertools) @@ -37,7 +31,6 @@ RUN ${PACKAGER} -y config-manager --set-enabled crb RUN ${PACKAGER} --nodocs --noplugins --setopt=install_weak_deps=0 install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-$(uname -i)/pgdg-redhat-repo-latest.noarch.rpm && ${PACKAGER} -y update && ${PACKAGER} -y clean all RUN dnf -qy module disable postgresql -#Cleanup From 44bc2534d72fa1721590dbc3b32e8ad0b2528391 Mon Sep 17 00:00:00 2001 From: matthias Date: Fri, 6 Dec 2024 08:59:35 +0100 Subject: [PATCH 4/4] Readme updated --- Readme.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index 3182de1..7a5a6f2 100644 --- a/Readme.md +++ b/Readme.md @@ -23,22 +23,31 @@ On Kubernetes and Kubernetes-based environments, the image uses the k8-etcd, oth export BASEOS=rocky9 export PACKAGER=dnf export CONTAINERSUITE=cybertec-pg-container - export PGBACKREST_VERSION=2.51 + export PGBACKREST_VERSION=2.54.0 export CCPROOT=$GOPATH/src/github.com/cybertec/cybertec-pg-container - export PATRONI_VERSION=3.3.1 + export PATRONI_VERSION=3.3.2 export POSTGIS_VERSION=34 - export PGVERSION=16 - export PGVERSION_FULL=16.3 - export OLD_PG_VERSIONS="13 14 15" + export PGVERSION=17 + export PGVERSION_FULL=17.2 + export OLD_PG_VERSIONS="13 14 15 16" export BUILD=1 export ARCH=amd64 + # Also use the ENV ROOTPATH to refer to the CYBERTEC-pg-container repo on your system. Otherwise the Dockerfiles cannot be found + export ROOTPATH=$(GOPATH)/src/github.com/cybertec/cybertec-pg-container +

You can build all images with make - make all -- make base/postgres/pgbackrest

+- make postgres +- make postgres-gis +- make pgbackrest +- make pgbouncer +- make exporter +

Run Images locally:

docker run -it IMAGEPATH:IMAGETAG +

Take a look inside:

docker exec -it CONTAINERID /bin/bash