Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/testinfra-ami-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,18 @@ jobs:
echo "" >> common-nix.vars.pkr.hcl

- name: Build AMI stage 1
env:
AWS_MAX_ATTEMPTS: 10
AWS_RETRY_MODE: adaptive
run: |
GIT_SHA=${{github.sha}}
nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl

- name: Build AMI stage 2
env:
AWS_MAX_ATTEMPTS: 10
AWS_RETRY_MODE: adaptive
run: |
GIT_SHA=${{github.sha}}
nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
Expand Down
6 changes: 6 additions & 0 deletions amazon-arm64-nix.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ source "amazon-ebssurrogate" "source" {
#secret_key = "${var.aws_secret_key}"
force_deregister = var.force-deregister

# Increase timeout for instance stop operations to handle large instances
aws_polling {
delay_seconds = 15
max_attempts = 120 # 120 * 15s = 30 minutes max wait
}

# Use latest official ubuntu noble ami owned by Canonical.
source_ami_filter {
filters = {
Expand Down
5 changes: 5 additions & 0 deletions stage2-nix-psql.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ source "amazon-ebs" "ubuntu" {

associate_public_ip_address = true

# Increase timeout for instance stop operations to handle large instances
aws_polling {
delay_seconds = 15
max_attempts = 120 # 120 * 15s = 30 minutes max wait
}

ena_support = true

Expand Down