From 54297071063ff23e10068a4ec7d22eae87d64946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20=C4=B0ndibay?= Date: Thu, 21 Sep 2023 16:53:29 +0300 Subject: [PATCH] Updates repo with PG 16 changes (#345) * Adds pg 16 * Fixes version problem * Fixes alpine version * Updates tools tags --- .../workflows/publish_docker_images_cron.yml | 2 +- .../publish_docker_images_on_manual.yml | 2 +- .../publish_docker_images_on_push.yml | 3 +- .../publish_docker_images_on_tag.yml | 2 +- .github/workflows/update_version.yml | 2 +- Dockerfile | 10 ++--- alpine/Dockerfile | 4 +- postgres-14/Dockerfile | 10 ++--- postgres-15/Dockerfile | 42 +++++++++++++++++++ 9 files changed, 60 insertions(+), 17 deletions(-) create mode 100644 postgres-15/Dockerfile diff --git a/.github/workflows/publish_docker_images_cron.yml b/.github/workflows/publish_docker_images_cron.yml index 5513beb..a232be5 100644 --- a/.github/workflows/publish_docker_images_cron.yml +++ b/.github/workflows/publish_docker_images_cron.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v3 - name: Clone tools branch - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources diff --git a/.github/workflows/publish_docker_images_on_manual.yml b/.github/workflows/publish_docker_images_on_manual.yml index d81998c..dda5506 100644 --- a/.github/workflows/publish_docker_images_on_manual.yml +++ b/.github/workflows/publish_docker_images_on_manual.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v3 - name: Clone tools branch - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources diff --git a/.github/workflows/publish_docker_images_on_push.yml b/.github/workflows/publish_docker_images_on_push.yml index 50aaab2..eda3620 100644 --- a/.github/workflows/publish_docker_images_on_push.yml +++ b/.github/workflows/publish_docker_images_on_push.yml @@ -17,6 +17,7 @@ jobs: image_type: - latest - alpine + - postgres_15 - postgres_14 - nightly steps: @@ -24,7 +25,7 @@ jobs: uses: actions/checkout@v3 - name: Clone tools branch - run: git clone -b v0.8.24 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources diff --git a/.github/workflows/publish_docker_images_on_tag.yml b/.github/workflows/publish_docker_images_on_tag.yml index 9d0ba06..f141744 100644 --- a/.github/workflows/publish_docker_images_on_tag.yml +++ b/.github/workflows/publish_docker_images_on_tag.yml @@ -27,7 +27,7 @@ jobs: ref: master - name: Clone tools branch - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 9f6d1eb..ebdb8f4 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -27,7 +27,7 @@ jobs: run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources - name: Clone tools branch - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.30 --depth=1 https://github.com/citusdata/tools.git tools - name: Set git name and email run: | diff --git a/Dockerfile b/Dockerfile index ee0c6d2..54e1dd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This file is auto generated from it's template, # see citusdata/tools/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile. -FROM postgres:15.3 -ARG VERSION=12.0.0 +FROM postgres:16.0 +ARG VERSION=12.1.0 LABEL maintainer="Citus Data https://citusdata.com" \ org.label-schema.name="Citus" \ org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ @@ -19,9 +19,9 @@ RUN apt-get update \ ca-certificates \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus-12.0=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.17.citus-1 \ - postgresql-$PG_MAJOR-topn=2.5.0.citus-1 \ + && apt-get install -y postgresql-$PG_MAJOR-citus-12.1=$CITUS_VERSION \ + postgresql-$PG_MAJOR-hll=2.18.citus-1 \ + postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 850a66c..9700ce8 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,7 +1,7 @@ # This file is auto generated from it's template, # see citusdata/tools/packaging_automation/templates/docker/alpine/alpine.tmpl.dockerfile. -FROM postgres:15.3-alpine -ARG VERSION=12.0.0 +FROM postgres:16.0-alpine +ARG VERSION=12.1.0 LABEL maintainer="Citus Data https://citusdata.com" \ org.label-schema.name="Citus" \ org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ diff --git a/postgres-14/Dockerfile b/postgres-14/Dockerfile index e888948..9306813 100644 --- a/postgres-14/Dockerfile +++ b/postgres-14/Dockerfile @@ -1,7 +1,7 @@ # This file is auto generated from it's template, # see citusdata/tools/packaging_automation/templates/docker/postgres-14/postgres-14.tmpl.dockerfile. -FROM postgres:14.8 -ARG VERSION=12.0.0 +FROM postgres:14.9 +ARG VERSION=12.1.0 LABEL maintainer="Citus Data https://citusdata.com" \ org.label-schema.name="Citus" \ org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ @@ -19,9 +19,9 @@ RUN apt-get update \ ca-certificates \ curl \ && curl -s https://install.citusdata.com/community/deb.sh | bash \ - && apt-get install -y postgresql-$PG_MAJOR-citus-12.0=$CITUS_VERSION \ - postgresql-$PG_MAJOR-hll=2.17.citus-1 \ - postgresql-$PG_MAJOR-topn=2.5.0.citus-1 \ + && apt-get install -y postgresql-$PG_MAJOR-citus-12.1=$CITUS_VERSION \ + postgresql-$PG_MAJOR-hll=2.18.citus-1 \ + postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ && apt-get purge -y --auto-remove curl \ && rm -rf /var/lib/apt/lists/* diff --git a/postgres-15/Dockerfile b/postgres-15/Dockerfile new file mode 100644 index 0000000..11b405c --- /dev/null +++ b/postgres-15/Dockerfile @@ -0,0 +1,42 @@ +# This file is auto generated from it's template, +# see citusdata/tools/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile. +FROM postgres:15.4 +ARG VERSION=12.1.0 +LABEL maintainer="Citus Data https://citusdata.com" \ + org.label-schema.name="Citus" \ + org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \ + org.label-schema.url="https://www.citusdata.com" \ + org.label-schema.vcs-url="https://github.com/citusdata/citus" \ + org.label-schema.vendor="Citus Data, Inc." \ + org.label-schema.version=${VERSION} \ + org.label-schema.schema-version="1.0" + +ENV CITUS_VERSION ${VERSION}.citus-1 + +# install Citus +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + && curl -s https://install.citusdata.com/community/deb.sh | bash \ + && apt-get install -y postgresql-$PG_MAJOR-citus-12.1=$CITUS_VERSION \ + postgresql-$PG_MAJOR-hll=2.18.citus-1 \ + postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \ + && apt-get purge -y --auto-remove curl \ + && rm -rf /var/lib/apt/lists/* + +# add citus to default PostgreSQL config +RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample + +# add scripts to run after initdb +COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/ + +# add health check script +COPY pg_healthcheck wait-for-manager.sh / +RUN chmod +x /wait-for-manager.sh + +# entry point unsets PGPASSWORD, but we need it to connect to workers +# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303 +RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh + +HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck