Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostgreSQL 17, deprecate PostgreSQL 11 #1119

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ versioned-images := php-8.1-fpm \
postgres-15-drupal \
postgres-16 \
postgres-16-drupal \
postgres-17 \
postgres-17-drupal \
redis-6 \
redis-6-persistent \
redis-7 \
Expand Down Expand Up @@ -246,9 +248,6 @@ versioned-images := php-8.1-fpm \

default-versioned-images := mariadb-10.4 \
mariadb-10.4-drupal \
postgres-11 \
postgres-11-ckan \
postgres-11-drupal \
mongo-4

#######
Expand Down Expand Up @@ -295,13 +294,13 @@ build/node-18 build/node-20 build/node-22: build/commons
build/node-18-builder build/node-18-cli: build/node-18
build/node-20-builder build/node-20-cli: build/node-20
build/node-22-builder build/node-22-cli: build/node-22
build/postgres-11 build/postgres-12 build/postgres-13 build/postgres-14 build/postgres-15 build/postgres-16: build/commons
build/postgres-11-ckan build/postgres-11-drupal: build/postgres-11
build/postgres-12 build/postgres-13 build/postgres-14 build/postgres-15 build/postgres-16 build/postgres-17: build/commons
build/postgres-12-drupal: build/postgres-12
build/postgres-13-drupal: build/postgres-13
build/postgres-14-drupal: build/postgres-14
build/postgres-15-drupal: build/postgres-15
build/postgres-16-drupal: build/postgres-16
build/postgres-17-drupal: build/postgres-17
build/redis-6 build/redis-7: build/commons
build/redis-6-persistent: build/redis-6
build/redis-7-persistent: build/redis-7
Expand Down
34 changes: 17 additions & 17 deletions helpers/TESTING_service_images_dockercompose.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp:/
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://mariadb-10-11:3306 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://mysql-8-0:3306 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://mysql-8-4:3306 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-11:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-12:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-13:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-14:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-15:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-16:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-17:5432 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://mongo-4:27017 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://opensearch-2:9200 -timeout 1m
docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://rabbitmq:15672 -timeout 1m
Expand All @@ -58,12 +58,12 @@ docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep mysql-8-0
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep mysql-8-4
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep mongo-4
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-11
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-12
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-13
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-14
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-15
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-16
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-17
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep rabbitmq
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep redis-6
docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep redis-7
Expand Down Expand Up @@ -252,21 +252,6 @@ docker compose exec -T mysql-8-4 sh -c "mysql -D lagoon -u lagoon --password=la
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/mariadb?service=mysql-8-4" | grep "SERVICE_HOST=8.4"
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/mariadb?service=mysql-8-4" | grep "LAGOON_TEST_VAR=all-images"

# postgres-11 should be version 11 client
docker compose exec -T postgres-11 bash -c "psql --version" | grep "psql" | grep "11."

# postgres-11 should be version 11 server
docker compose exec -T postgres-11 bash -c "echo U0VMRUNUIHZlcnNpb24oKTs= | base64 -d > /tmp/selectversion.sql"
docker compose exec -T postgres-11 bash -c "psql -U lagoon -d lagoon < /tmp/selectversion.sql" | grep "PostgreSQL" | grep "11."

# postgres-11 should have lagoon database
docker compose exec -T postgres-11 bash -c "echo XGwrIGxhZ29vbg== | base64 -d > /tmp/listlagoon.sql"
docker compose exec -T postgres-11 bash -c "psql -U lagoon -d lagoon < /tmp/listlagoon.sql" | grep "lagoon"

# postgres-11 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-11" | grep "SERVICE_HOST=PostgreSQL 11"
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-11" | grep "LAGOON_TEST_VAR=all-images"

# postgres-12 should be version 12 client
docker compose exec -T postgres-12 bash -c "psql --version" | grep "psql" | grep "12."

Expand Down Expand Up @@ -342,6 +327,21 @@ docker compose exec -T postgres-16 bash -c "psql -U lagoon -d lagoon < /tmp/list
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-16" | grep "SERVICE_HOST=PostgreSQL 16"
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-16" | grep "LAGOON_TEST_VAR=all-images"

# postgres-17 should be version 17 client
docker compose exec -T postgres-17 bash -c "psql --version" | grep "psql" | grep "17."

# postgres-17 should be version 17 server
docker compose exec -T postgres-17 bash -c "echo U0VMRUNUIHZlcnNpb24oKTs= | base64 -d > /tmp/selectversion.sql"
docker compose exec -T postgres-17 bash -c "psql -U lagoon -d lagoon < /tmp/selectversion.sql" | grep "PostgreSQL" | grep "17."

# postgres-17 should have lagoon database
docker compose exec -T postgres-17 bash -c "echo XGwrIGxhZ29vbg== | base64 -d > /tmp/listlagoon.sql"
docker compose exec -T postgres-17 bash -c "psql -U lagoon -d lagoon < /tmp/listlagoon.sql" | grep "lagoon"

# postgres-17 should be able to read/write data
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-17" | grep "SERVICE_HOST=PostgreSQL 17"
docker compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/postgres?service=postgres-17" | grep "LAGOON_TEST_VAR=all-images"

# nginx should be served by openresty
docker compose exec -T commons sh -c "curl -kL http://nginx:8080" | grep "hr" | grep "openresty"

Expand Down
12 changes: 6 additions & 6 deletions helpers/services-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ services:
- "3306"
<< : *default-user # uses the defined user from top

postgres-11:
image: uselagoon/postgres-11:latest
ports:
- "5432"
<< : *default-user # uses the defined user from top

postgres-12:
image: uselagoon/postgres-12:latest
ports:
Expand Down Expand Up @@ -92,6 +86,12 @@ services:
- "5432"
<< : *default-user # uses the defined user from top

postgres-17:
image: uselagoon/postgres-17:latest
ports:
- "5432"
<< : *default-user # uses the defined user from top

rabbitmq:
image: uselagoon/rabbitmq:latest
ports:
Expand Down
22 changes: 0 additions & 22 deletions images/postgres-ckan/11.Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions images/postgres-ckan/90-datastore-user.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/postgres-11
FROM ${IMAGE_REPO:-lagoon}/postgres-17

ARG LAGOON_VERSION
ENV LAGOON_VERSION=$LAGOON_VERSION
LABEL org.opencontainers.image.authors="The Lagoon Authors"
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images/blob/main/images/postgres-drupal/11.Dockerfile"
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images/blob/main/images/postgres-drupal/17.Dockerfile"
LABEL org.opencontainers.image.url="https://github.com/uselagoon/lagoon-images"
LABEL org.opencontainers.image.version="${LAGOON_VERSION}"
LABEL org.opencontainers.image.description="PostgreSQL 11 image optimised for Drupal workloads running in Lagoon in production and locally"
LABEL org.opencontainers.image.title="uselagoon/postgres-11-drupal"
LABEL org.opencontainers.image.base.name="docker.io/uselagoon/postgres-11"
LABEL org.opencontainers.image.description="PostgreSQL 17 image optimised for Drupal workloads running in Lagoon in production and locally"
LABEL org.opencontainers.image.title="uselagoon/postgres-17-drupal"
LABEL org.opencontainers.image.base.name="docker.io/uselagoon/postgres-17"

# change log_min_error_statement and log_min_messages from `error` to `log` as drupal is prone to cause some errors which are all logged (yes `log` is a less verbose mode than `error`)
RUN sed -i "s/#log_min_error_statement = error/log_min_error_statement = log/" /usr/local/share/postgresql/postgresql.conf.sample \
Expand Down
10 changes: 5 additions & 5 deletions images/postgres/11.Dockerfile → images/postgres/17.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/commons AS commons
FROM postgres:11.22-alpine3.19
FROM postgres:17.0-alpine3.20

ARG LAGOON_VERSION
ENV LAGOON_VERSION=$LAGOON_VERSION
LABEL org.opencontainers.image.authors="The Lagoon Authors"
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/11.Dockerfile"
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/17.Dockerfile"
LABEL org.opencontainers.image.url="https://github.com/uselagoon/lagoon-images"
LABEL org.opencontainers.image.version="${LAGOON_VERSION}"
LABEL org.opencontainers.image.description="PostgreSQL 11 image optimised for running in Lagoon in production and locally"
LABEL org.opencontainers.image.title="uselagoon/postgres-11"
LABEL org.opencontainers.image.base.name="docker.io/postgres:11-alpine3.20"
LABEL org.opencontainers.image.description="PostgreSQL 17 image optimised for running in Lagoon in production and locally"
LABEL org.opencontainers.image.title="uselagoon/postgres-17"
LABEL org.opencontainers.image.base.name="docker.io/postgres:17-alpine3.20"

ENV LAGOON=postgres

Expand Down