Skip to content

Commit 5f7c2dc

Browse files
committed
feat: supply a slightly different supabase-admin-agent configuration for qemu artifacts
1 parent dd54146 commit 5f7c2dc

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

ansible/files/supabase_admin_agent_config/supabase-admin-agent_salt.service

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ Requires=local-fs.target
66

77
[Service]
88
Type=oneshot
9+
{% if qemu_mode is defined and qemu_mode %}
10+
ExecStart=/opt/supabase-admin-agent/supabase-admin-agent --config /opt/supabase-admin-agent/config.yaml salt --apply --store-result --salt-archive configmainv3-main.tar.gz
11+
User=root
12+
Group=root
13+
{% else %}
914
ExecStart=/opt/supabase-admin-agent/supabase-admin-agent --config /opt/supabase-admin-agent/config.yaml salt --apply --store-result
1015
User=supabase-admin-agent
1116
Group=supabase-admin-agent
17+
{% endif %}
1218
StandardOutput=journal
1319
StandardError=journal
1420
StateDirectory=supabase-admin-agent

ansible/files/supabase_admin_agent_config/supabase-admin-agent_salt.timer.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@ Description=Run Supabase supabase-admin-agent salt on a schedule
33
Requires=supabase-admin-agent_salt.service
44

55
[Timer]
6+
{# We're using a significantly lower frequency for triggering this agent on qemu images for the moment. Once we've performed additional validations re: the aggregate impact of running it more frequently, the frequency can be increased. #}
7+
{% if qemu_mode is defined and qemu_mode %}
8+
OnCalendar=*-*-* 0,6,12,18:00:00
9+
RandomizedDelaySec={{ supabase_admin_agent_splay }}
10+
AccuracySec=1h
11+
OnBootSec=5m
12+
Persistent=true
13+
{% else %}
614
OnCalendar=*:0/10
7-
# Random delay up to {{ supabase_admin_agent_splay }} seconds splay
815
RandomizedDelaySec={{ supabase_admin_agent_splay }}
916
AccuracySec=1s
1017
Persistent=true
18+
{% endif %}
1119

1220
[Install]
1321
WantedBy=timers.target

ansible/qemu-vars.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
supabase_admin_agent_splay_secs: 2h

ansible/vars.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.5.1.029"
13-
postgres17: "17.6.1.008"
14-
postgres15: "15.14.1.008"
12+
postgresorioledb-17: "17.5.1.030-orioledb"
13+
postgres17: "17.6.1.009"
14+
postgres15: "15.14.1.009"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"
@@ -55,7 +55,7 @@ postgres_exporter_release_checksum:
5555
adminapi_release: 0.92.1
5656
adminmgr_release: 0.32.1
5757
supabase_admin_agent_release: 1.4.38
58-
supabase_admin_agent_splay: 30
58+
supabase_admin_agent_splay: 30s
5959

6060
vector_x86_deb: "https://packages.timber.io/vector/0.48.X/vector_0.48.0-1_amd64.deb"
6161
vector_arm_deb: "https://packages.timber.io/vector/0.48.X/vector_0.48.0-1_arm64.deb"

ebssurrogate/scripts/qemu-bootstrap-nix.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ EOF
3939
--extra-vars "postgresql_version=postgresql_${POSTGRES_MAJOR_VERSION}" \
4040
--extra-vars "postgresql_major_version=${POSTGRES_MAJOR_VERSION}" \
4141
--extra-vars "postgresql_major=${POSTGRES_MAJOR_VERSION}" \
42-
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}"
42+
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}" \
43+
--extra-vars @./ansible/qemu-vars.yml
4344
}
4445

4546
function setup_postgesql_env {
@@ -101,7 +102,8 @@ EOF
101102
--extra-vars "postgresql_version=postgresql_${POSTGRES_MAJOR_VERSION}" \
102103
--extra-vars "postgresql_major_version=${POSTGRES_MAJOR_VERSION}" \
103104
--extra-vars "postgresql_major=${POSTGRES_MAJOR_VERSION}" \
104-
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}"
105+
--extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}" \
106+
--extra-vars @./ansible/qemu-vars.yml
105107
}
106108

107109
function clean_legacy_things {

0 commit comments

Comments
 (0)