Skip to content

Commit c198de4

Browse files
committed
Merge remote-tracking branch 'origin/develop' into INDATA-152
* origin/develop: chore: prevent loopback ssh connections (#1959) chore: rename infra repo (#1958) chore: [ansible/vars] bumping admin-api version (#1960) fix: reserve the port for postgres_exporter with sysctl (#1953) chore: Update PostgREST setup and versions (#1955) Bump PostgREST to 14.1 (#1909)
2 parents 7b7d5c7 + 64105d9 commit c198de4

File tree

6 files changed

+38
-17
lines changed

6 files changed

+38
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This is the same PostgreSQL build that powers [Supabase](https://supabase.io), b
294294
| Goodie | Version | Description |
295295
| ------------- | :-------------: | ------------- |
296296
| [PgBouncer](https://www.pgbouncer.org/) | [1.19.0](http://www.pgbouncer.org/changelog.html#pgbouncer-119x) | Set up Connection Pooling. |
297-
| [PostgREST](https://postgrest.org/en/stable/) | [v13.0.4](https://github.com/PostgREST/postgrest/releases/tag/v13.0.4) | Instantly transform your database into an RESTful API. |
297+
| [PostgREST](https://postgrest.org/en/stable/) | [v14.1](https://github.com/PostgREST/postgrest/releases/tag/v14.1) | Instantly transform your database into an RESTful API. |
298298
| [WAL-G](https://github.com/wal-g/wal-g#wal-g) | [v2.0.1](https://github.com/wal-g/wal-g/releases/tag/v2.0.1) | Tool for physical database backup and recovery. | -->
299299

300300

ansible/tasks/setup-postgrest.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
state: 'present'
55

66
- name: PostgREST - add Postgres PPA gpg key
7-
ansible.builtin.apt_key:
7+
ansible.builtin.get_url:
8+
dest: /etc/apt/trusted.gpg.d/ppdg.asc
9+
force: true
10+
mode: '0644'
811
url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
9-
state: 'present'
1012

1113
- name: PostgREST - add Postgres PPA main
1214
ansible.builtin.apt_repository:
@@ -30,9 +32,9 @@
3032
msg: "Installed libpq5 version: {{ ansible_facts['packages']['libpq5'][0]['version'] }}"
3133

3234
- name: PostgREST - remove Postgres PPA gpg key
33-
ansible.builtin.apt_key:
35+
ansible.builtin.file:
36+
path: /etc/apt/trusted.gpg.d/ppdg.asc
3437
state: 'absent'
35-
url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
3638

3739
- name: PostgREST - remove Postgres PPA
3840
ansible.builtin.apt_repository:
@@ -58,7 +60,7 @@
5860
{%- if platform == "arm64" -%}
5961
ubuntu-aarch64
6062
{%- elif platform == "amd64" -%}
61-
inux-static-x86-64
63+
linux-static-x86-64
6264
{%- endif -%}
6365
6466
- name: PostgREST - unpack archive in /opt

ansible/tasks/setup-system.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@
6464
dest: '/etc/apt/apt.conf.d/10periodic'
6565
src: 'files/apt_periodic'
6666

67+
- name: Set local ssh policy
68+
ansible.builtin.copy:
69+
content: |
70+
Match Address 127.0.0.1,::1
71+
ForceCommand /bin/false
72+
DisableForwarding yes
73+
PermitTunnel no
74+
dest: /etc/ssh/sshd_config.d/local.conf
75+
mode: '0644'
76+
owner: 'root'
77+
group: 'root'
78+
6779
- name: Install other useful tools
6880
ansible.builtin.apt:
6981
pkg:
@@ -154,6 +166,13 @@
154166
value: 60
155167
state: 'present'
156168

169+
# postgres_exporter runs on port 9187 and postgresT occasionlly chooses it as random srcport
170+
- name: Set net.ipv4.ip_local_reserved_ports=9187
171+
ansible.builtin.sysctl:
172+
name: 'net.ipv4.ip_local_reserved_ports'
173+
value: 9187
174+
state: 'present'
175+
157176
- name: Execute tasks when (debpkg_mode or nixpkg_mode)
158177
when:
159178
- (debpkg_mode or nixpkg_mode)

ansible/vars.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ postgres_major:
1010

1111
# Full version strings for each major version
1212
postgres_release:
13-
postgresorioledb-17: "17.6.0.014-orioledb"
14-
postgres17: "17.6.1.057"
15-
postgres15: "15.14.1.057"
13+
postgresorioledb-17: "17.6.0.017-orioledb"
14+
postgres17: "17.6.1.060"
15+
postgres15: "15.14.1.060"
1616

1717
# Non Postgres Extensions
1818
pgbouncer_release: 1.19.0
@@ -21,9 +21,9 @@ pgbouncer_release_checksum: sha256:af0b05e97d0e1fd9ad45fe00ea6d2a934c63075f67f7e
2121
# The checksum can be found under "Assets", in the GitHub release page for each version.
2222
# The binaries used are: ubuntu-aarch64 and linux-static.
2323
# https://github.com/PostgREST/postgrest/releases
24-
postgrest_release: 13.0.5
25-
postgrest_arm_release_checksum: sha256:7b4eafdaf76bc43b57f603109d460a838f89f949adccd02f452ca339f9a0a0d4
26-
postgrest_x86_release_checksum: sha256:05be2bd48abee6c1691fc7c5d005023466c6989e41a4fc7d1302b8212adb88b5
24+
postgrest_release: 14.1
25+
postgrest_arm_release_checksum: sha256:68885d936873059b946afadaae697467daedacd7d8e697a80b7f0f6881c9c92f
26+
postgrest_x86_release_checksum: sha256:bdab6ab3389ca0d6c1f3b8363491674dbca71875c3f30261d92d8fecdde35277
2727

2828
gotrue_release: 2.182.1
2929
gotrue_release_checksum: sha1:38a12109ad62df32460d88e4c7b2a475b88e7865
@@ -53,7 +53,7 @@ postgres_exporter_release_checksum:
5353
arm64: sha256:29ba62d538b92d39952afe12ee2e1f4401250d678ff4b354ff2752f4321c87a0
5454
amd64: sha256:cb89fc5bf4485fb554e0d640d9684fae143a4b2d5fa443009bd29c59f9129e84
5555

56-
adminapi_release: "0.93.0"
56+
adminapi_release: "0.93.1"
5757
adminmgr_release: "0.32.3"
5858
supabase_admin_agent_release: 1.6.0
5959
supabase_admin_agent_splay: 30s

migrations/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nix run github:supabase/postgres/mybranch#dbmate-tool -- --version 15
3838
- supabase/postgres
3939
- supabase/supabase
4040
- supabase/cli
41-
- supabase/infrastructure (internal)
41+
- supabase/platform (internal)
4242

4343
aiming to provide a single source of truth for migrations on the platform that can be depended upon by those components. For more information on goals see [the RFC](https://www.notion.so/supabase/Centralize-SQL-Migrations-cd3847ae027d4f2bba9defb2cc82f69a)
4444

@@ -48,8 +48,8 @@ aiming to provide a single source of truth for migrations on the platform that c
4848

4949
Migrations were pulled (in order) from:
5050

51-
1. [init-scripts/postgres](https://github.com/supabase/infrastructure/tree/develop/init-scripts/postgres) => [db/init-scripts](db/init-scripts)
52-
2. [init-scripts/migrations](https://github.com/supabase/infrastructure/tree/develop/init-scripts/migrations) => [db/migrations](db/migrations)
51+
1. [init-scripts/postgres](https://github.com/supabase/platform/tree/develop/init-scripts/postgres) => [db/init-scripts](db/init-scripts)
52+
2. [init-scripts/migrations](https://github.com/supabase/platform/tree/develop/init-scripts/migrations) => [db/migrations](db/migrations)
5353

5454
For compatibility with hosted projects, we include [migrate.sh](migrate.sh) that executes migrations in the same order as ami build:
5555

migrations/db/migrations/20220317095840_pg_graphql.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- migrate:up
22
create schema if not exists graphql_public;
33

4-
-- obsolete signature: https://github.com/supabase/infrastructure/pull/5524/files
4+
-- obsolete signature: https://github.com/supabase/platform/pull/5524/files
55
drop function if exists graphql_public.graphql(text, text, jsonb);
66
-- GraphQL Placeholder Entrypoint
77
create or replace function graphql_public.graphql(

0 commit comments

Comments
 (0)