Skip to content

Commit 726df40

Browse files
authored
Merge branch 'develop' into pg-17-10-update
2 parents d66b195 + bfe182b commit 726df40

18 files changed

Lines changed: 22 additions & 572 deletions

ansible/files/nginx.service.j2

Lines changed: 0 additions & 25 deletions
This file was deleted.

ansible/files/permission_check.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"gotrue": [{"groupname": "gotrue", "username": "gotrue"}],
7070
"envoy": [{"groupname": "envoy", "username": "envoy"}],
7171
"kong": [{"groupname": "kong", "username": "kong"}],
72-
"nginx": [{"groupname": "nginx", "username": "nginx"}],
7372
"vector": [
7473
{"groupname": "adm", "username": "vector"},
7574
{"groupname": "postgres", "username": "vector"},
@@ -376,7 +375,6 @@ def main():
376375
"gotrue",
377376
"envoy",
378377
"kong",
379-
"nginx",
380378
"vector",
381379
"adminapi",
382380
"postgrest",

ansible/playbook.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@
7878
tags:
7979
- install-supabase-internal
8080

81-
- name: Install nginx
82-
when: not stage2
83-
import_tasks: tasks/setup-nginx.yml
84-
tags:
85-
- install-supabase-internal
86-
8781
- name: Install Supabase specific content
8882
when: not stage2
8983
import_tasks: tasks/setup-supabase-internal.yml
@@ -167,9 +161,6 @@
167161
update_cache: yes
168162
cache_valid_time: 3600
169163

170-
- name: Clean out build dependencies
171-
import_tasks: tasks/clean-build-dependencies.yml
172-
173164
- name: Run migrations
174165
when: stage2
175166
import_tasks: tasks/setup-migrations.yml

ansible/tasks/clean-build-dependencies.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

ansible/tasks/internal/supautils.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

ansible/tasks/setup-nginx.yml

Lines changed: 0 additions & 85 deletions
This file was deleted.

ansible/tasks/setup-pgbouncer.yml

Lines changed: 15 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,4 @@
11
# PgBouncer
2-
- name: PgBouncer - download & install dependencies
3-
ansible.builtin.apt:
4-
pkg:
5-
- build-essential
6-
- libevent-dev
7-
- libssl-dev
8-
- libsystemd-dev
9-
- pkg-config
10-
- pandoc
11-
- python3
12-
update_cache: true
13-
14-
- name: PgBouncer - download latest release
15-
ansible.builtin.get_url:
16-
url: "{{ pgbouncer_artifacts['url'] }}"
17-
checksum: "{{ pgbouncer_artifacts['checksum'] }}"
18-
dest: "/tmp/pgbouncer-{{ pgbouncer_release }}.tar.gz"
19-
timeout: 60
20-
register: download_result
21-
until: download_result is succeeded
22-
retries: 3
23-
delay: 2
24-
25-
- name: PgBouncer - unpack archive
26-
ansible.builtin.unarchive:
27-
dest: '/tmp'
28-
remote_src: true
29-
src: "/tmp/pgbouncer-{{ pgbouncer_release }}.tar.gz"
30-
become: true
31-
32-
- name: PgBouncer - configure
33-
ansible.builtin.command:
34-
cmd: './configure --prefix=/usr/local --with-systemd'
35-
args:
36-
chdir: "/tmp/pgbouncer-{{ pgbouncer_release }}"
37-
become: true
38-
39-
- name: PgBouncer - build and install
40-
community.general.make:
41-
chdir: "/tmp/pgbouncer-{{ pgbouncer_release }}"
42-
target: "{{ pgbouncer_make_item }}"
43-
become: true
44-
loop:
45-
- 'all'
46-
- 'install'
47-
loop_control:
48-
loop_var: 'pgbouncer_make_item'
49-
502
- name: Create pgbouncer user
513
ansible.builtin.user:
524
comment: 'PgBouncer user'
@@ -55,6 +7,21 @@
557
shell: '/usr/sbin/nolign'
568
state: 'present'
579

10+
- name: Install PgBouncer from nix binary cache
11+
when: stage2
12+
ansible.builtin.shell:
13+
cmd: sudo -u pgbouncer bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#pgbouncer"
14+
become: true
15+
16+
- name: Link PgBouncer into /usr/local/bin
17+
when: stage2
18+
ansible.builtin.file:
19+
dest: '/usr/local/bin/pgbouncer'
20+
force: true
21+
src: '/home/pgbouncer/.nix-profile/bin/pgbouncer'
22+
state: 'link'
23+
become: true
24+
5825
- name: Create PgBouncer directories if they do not exist
5926
ansible.builtin.file:
6027
group: 'pgbouncer'

ansible/vars.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ gotrue_artifacts:
118118
arm64:
119119
url: "https://github.com/supabase/gotrue/releases/download/v{{ gotrue_release }}/auth-v{{ gotrue_release }}-arm64.tar.gz"
120120
checksum: sha256:547b80c455f2bbf01a624d0e3bc98c31237ca479d4aa0d236d40678370e34a69
121-
nginx_release: 1.22.0
122-
nginx_artifacts:
123-
url: "https://nginx.org/download/nginx-{{ nginx_release }}.tar.gz"
124-
checksum: sha256:b33d569a6f11a01433a57ce17e83935e953ad4dc77cdd4d40f896c88ac26eb53
125-
pgbouncer_release: 1.25.1
126-
pgbouncer_artifacts:
127-
url: "https://www.pgbouncer.org/downloads/files/{{ pgbouncer_release }}/pgbouncer-{{ pgbouncer_release }}.tar.gz"
128-
checksum: sha256:6e566ae92fe3ef7f6a1b9e26d6049f7d7ca39c40e29e7b38f6d5500ae15d8465
129121
postgrest_release: "14.17" # keep this as an *explicit* string, otherwise gets treated as yaml float which will likely only lead to tears
130122
postgrest_artifacts:
131123
amd64:

audit-specs/baselines/ami-build/group.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ group:
3939
exists: true
4040
envoy:
4141
exists: true
42-
nginx:
43-
exists: true
4442
vector:
4543
exists: true
4644
supabase-admin-agent:

audit-specs/baselines/ami-build/user.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ user:
4343
envoy:
4444
exists: true
4545
home: /home/envoy
46-
nginx:
47-
exists: true
48-
home: /home/nginx
4946
vector:
5047
exists: true
5148
home: /var/lib/vector

0 commit comments

Comments
 (0)