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

feat: wip advance to ubuntu 24.04 #1416

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
8 changes: 4 additions & 4 deletions .github/workflows/ami-release-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
include:
- runner: arm-runner
arch: arm64
ubuntu_release: focal
ubuntu_version: 20.04
ubuntu_release: noble
ubuntu_version: 24.04
mcpu: neoverse-n1
runs-on: ${{ matrix.runner }}
timeout-minutes: 150
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

- name: Upload nix flake revision to s3 staging
run: |
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/24.04.tar.gz

- name: configure aws credentials - prod
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -140,7 +140,7 @@ jobs:

- name: Upload nix flake revision to s3 prod
run: |
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/24.04.tar.gz

- name: Create release
uses: softprops/action-gh-release@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Upload pg_upgrade scripts to s3 staging
run: |
aws s3 cp /tmp/pg_upgrade_bin.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
aws s3 cp /tmp/pg_upgrade_bin.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/24.04.tar.gz

- name: Slack Notification on Failure
if: ${{ failure() }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:

- name: Upload pg_upgrade scripts to s3 prod
run: |
aws s3 cp /tmp/pg_upgrade_bin.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz
aws s3 cp /tmp/pg_upgrade_bin.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/24.04.tar.gz

- name: Slack Notification on Failure
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pg-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Download pg_upgrade_scripts and binaries
run: |
aws s3 cp s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/pg_upgrade_scripts.tar.gz scripts/pg_upgrade_scripts.tar.gz
aws s3 cp s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz scripts/pg_upgrade_bin.tar.gz
aws s3 cp s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/24.04.tar.gz scripts/pg_upgrade_bin.tar.gz

- run: docker context create builders
- uses: docker/setup-buildx-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testinfra-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
include:
- runner: arm-runner
arch: arm64
ubuntu_release: focal
ubuntu_version: 20.04
ubuntu_release: noble
ubuntu_version: 24.04
mcpu: neoverse-n1
runs-on: ${{ matrix.runner }}
timeout-minutes: 150
Expand Down
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ARG wal_g_release=2.0.1
####################
# Setup Postgres PPA
####################
FROM ubuntu:focal as ppa
FROM ubuntu:noble as ppa
# Redeclare args for use in subsequent stages
ARG postgresql_major
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -55,7 +55,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# gpg --export --armor $NEW_POSTGRESQL_GPG_KEY > postgresql.gpg.key
COPY postgresql.gpg.key /tmp/postgresql.gpg.key
RUN apt-key add /tmp/postgresql.gpg.key && \
echo "deb https://apt-archive.postgresql.org/pub/repos/apt focal-pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt noble-pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list

####################
# Download pre-built postgres
Expand All @@ -64,22 +64,22 @@ FROM ppa as pg
ARG postgresql_release
# Download .deb packages
RUN apt-get update && apt-get install -y --no-install-recommends --download-only \
postgresql-${postgresql_major}=${postgresql_release}-1.pgdg20.04+1 \
postgresql-${postgresql_major}=${postgresql_release}-1.pgdg24.04+1 \
&& rm -rf /var/lib/apt/lists/*
RUN mv /var/cache/apt/archives/*.deb /tmp/

FROM ppa as pg-dev
ARG postgresql_release
# Download .deb packages
RUN apt-get update && apt-get install -y --no-install-recommends --download-only \
postgresql-server-dev-${postgresql_major}=${postgresql_release}-1.pgdg20.04+1 \
postgresql-server-dev-${postgresql_major}=${postgresql_release}-1.pgdg24.04+1 \
&& rm -rf /var/lib/apt/lists/*
RUN mv /var/cache/apt/archives/*.deb /tmp/

####################
# Install postgres
####################
FROM ubuntu:focal as base
FROM ubuntu:noble as base
# Redeclare args for use in subsequent stages
ARG TARGETARCH
ARG postgresql_major
Expand Down Expand Up @@ -188,7 +188,7 @@ FROM ppa as postgis
ARG postgis_release
# Download pre-built packages
RUN apt-get update && apt-get install -y --no-install-recommends --download-only \
postgresql-${postgresql_major}-postgis-3=${postgis_release}+dfsg-1.pgdg20.04+1 \
postgresql-${postgresql_major}-postgis-3=${postgis_release}+dfsg-1.pgdg24.04+1 \
&& rm -rf /var/lib/apt/lists/*
RUN mv /var/cache/apt/archives/*.deb /tmp/

Expand Down Expand Up @@ -220,7 +220,7 @@ FROM ppa as pgrouting
ARG pgrouting_release
# Download pre-built packages
RUN apt-get update && apt-get install -y --no-install-recommends --download-only \
postgresql-${postgresql_major}-pgrouting=${pgrouting_release}-1.pgdg20.04+1 \
postgresql-${postgresql_major}-pgrouting=${pgrouting_release}-1.pgdg24.04+1 \
&& rm -rf /var/lib/apt/lists/*
RUN mv /var/cache/apt/archives/*.deb /tmp/

Expand Down Expand Up @@ -695,7 +695,7 @@ FROM base as pgroonga
# Latest available is 3.0.3
ARG pgroonga_release
# Download pre-built packages
ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-focal.deb" /tmp/source.deb
ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-noble.deb" /tmp/source.deb
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
/tmp/source.deb \
Expand Down Expand Up @@ -857,13 +857,13 @@ RUN /tmp/download_supautils.sh && rm /tmp/download_supautils.sh
####################
FROM base as walg
ARG wal_g_release
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-24.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \
apt-get update && apt-get install -y --no-install-recommends curl && \
curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-${arch}.tar.gz" -o /tmp/wal-g.tar.gz && \
curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-24.04-${arch}.tar.gz" -o /tmp/wal-g.tar.gz && \
tar -xvf /tmp/wal-g.tar.gz -C /tmp && \
rm -rf /tmp/wal-g.tar.gz && \
mv /tmp/wal-g-pg-ubuntu*20.04-$arch /tmp/wal-g
mv /tmp/wal-g-pg-ubuntu*24.04-$arch /tmp/wal-g

####################
# Collect extension packages
Expand Down Expand Up @@ -903,7 +903,7 @@ COPY --from=supautils /tmp/*.deb /tmp/
####################
# Download gosu for easy step-down from root
####################
FROM ubuntu:focal as gosu
FROM ubuntu:noble as gosu
ARG TARGETARCH
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ARG index_advisor_release=0.2.0
ARG supautils_release=2.2.0
ARG wal_g_release=2.0.1

FROM ubuntu:focal as base
FROM ubuntu:noble as base

RUN apt update -y && apt install -y \
curl \
Expand Down Expand Up @@ -119,7 +119,7 @@ ENV PGDATA=/var/lib/postgresql/data
####################
FROM base as walg
ARG wal_g_release
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-24.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \
apt-get update && apt-get install -y --no-install-recommends curl && \
curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-aarch64.tar.gz" -o /tmp/wal-g.tar.gz && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-158
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ARG index_advisor_release=0.2.0
ARG supautils_release=2.2.0
ARG wal_g_release=2.0.1

FROM ubuntu:focal as base
FROM ubuntu:noble as base

RUN apt update -y && apt install -y \
curl \
Expand Down Expand Up @@ -119,7 +119,7 @@ ENV PGDATA=/var/lib/postgresql/data
####################
FROM base as walg
ARG wal_g_release
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-24.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \
apt-get update && apt-get install -y --no-install-recommends curl && \
curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-aarch64.tar.gz" -o /tmp/wal-g.tar.gz && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ARG index_advisor_release=0.2.0
ARG supautils_release=2.2.0
ARG wal_g_release=2.0.1

FROM ubuntu:focal as base
FROM ubuntu:noble as base

RUN apt update -y && apt install -y \
curl \
Expand Down Expand Up @@ -118,7 +118,7 @@ ENV PGDATA=/var/lib/postgresql/data
####################
FROM base as walg
ARG wal_g_release
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
# ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-24.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \
apt-get update && apt-get install -y --no-install-recommends curl && \
curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-20.04-aarch64.tar.gz" -o /tmp/wal-g.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to

## Primary Features
- ✅ Postgres [15](https://www.postgresql.org/about/news/postgresql-15-released-2526/).
- ✅ Ubuntu 20.04 (Focal Fossa).
- ✅ Ubuntu 24.04 (noble Fossa).
- ✅ [wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) = logical and [max_replication_slots](https://www.postgresql.org/docs/current/runtime-config-replication.html) = 5. Ready for replication.
- ✅ [Large Systems Extensions](https://github.com/aws/aws-graviton-getting-started#building-for-graviton-and-graviton2). Enabled for ARM images.

Expand Down
4 changes: 2 additions & 2 deletions amazon-arm64-nix.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variable "ami" {
type = string
default = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-arm64-server-*"
default = "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-arm64-server-*"
}

variable "profile" {
Expand Down Expand Up @@ -115,7 +115,7 @@ source "amazon-ebssurrogate" "source" {
#secret_key = "${var.aws_secret_key}"
force_deregister = var.force-deregister

# Use latest official ubuntu focal ami owned by Canonical.
# Use latest official ubuntu noble ami owned by Canonical.
source_ami_filter {
filters = {
virtualization-type = "hvm"
Expand Down
4 changes: 2 additions & 2 deletions amazon-arm64.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variable "ami" {
type = string
default = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-arm64-server-*"
default = "ubuntu/images/hvm-ssd/ubuntu-noble-24.04-arm64-server-*"
}

variable "profile" {
Expand Down Expand Up @@ -115,7 +115,7 @@ source "amazon-ebssurrogate" "source" {
#secret_key = "${var.aws_secret_key}"
force_deregister = var.force-deregister

# Use latest official ubuntu focal ami owned by Canonical.
# Use latest official ubuntu noble ami owned by Canonical.
source_ami_filter {
filters = {
virtualization-type = "hvm"
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

- name: Install WAL-G
import_tasks: tasks/setup-wal-g.yml
when: debpkg_mode or nixpkg_mode
when: debpkg_mode or stage2_nix

- name: Install Gotrue
import_tasks: tasks/setup-gotrue.yml
Expand Down
2 changes: 1 addition & 1 deletion ansible/tasks/setup-kong.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Kong - download deb package
get_url:
url: "https://packages.konghq.com/public/gateway-28/deb/ubuntu/pool/{{ kong_release_target }}/main/k/ko/kong_2.8.1/{{ kong_deb }}"
url: "https://packages.konghq.com/public/gateway-39/deb/ubuntu/pool/{{ kong_release_target }}/main/k/ko/kong_3.9.0/{{ kong_deb }}"
dest: /tmp/kong.deb
checksum: "{{ kong_deb_checksum }}"

Expand Down
2 changes: 1 addition & 1 deletion ansible/tasks/setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

- name: Postgres - install server
apt:
name: postgresql-{{ postgresql_major }}={{ postgresql_release }}-1.pgdg20.04+1
name: postgresql-{{ postgresql_major }}={{ postgresql_release }}-1.pgdg24.04+1
install_recommends: no
when: debpkg_mode

Expand Down
4 changes: 2 additions & 2 deletions ansible/tasks/setup-postgrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- name: PostgREST - add Postgres PPA
apt_repository:
repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg {{ postgresql_major }}"
repo: "deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg {{ postgresql_major }}"
state: present

- name: PostgREST - update apt cache
Expand All @@ -30,7 +30,7 @@

- name: PostgREST - remove Postgres PPA
apt_repository:
repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg {{ postgresql_major }}"
repo: "deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg {{ postgresql_major }}"
state: absent

- name: postgis - ensure dependencies do not get autoremoved
Expand Down
Loading
Loading