From db407744b574588622ba4473247188b0530ceb4e Mon Sep 17 00:00:00 2001 From: Div Arora Date: Wed, 9 Apr 2025 11:16:58 +0800 Subject: [PATCH] chore: update qemu artifact to noble base Also makes the VM artifact release agnostic. --- .github/workflows/qemu-image-build.yml | 9 --------- Dockerfile-kubernetes | 2 +- Makefile | 4 ---- qemu-arm64-nix.pkr.hcl | 4 ++-- scripts/90-cleanup-qemu.sh | 3 --- 5 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/qemu-image-build.yml b/.github/workflows/qemu-image-build.yml index a2fd4b000..b484bf562 100644 --- a/.github/workflows/qemu-image-build.yml +++ b/.github/workflows/qemu-image-build.yml @@ -98,15 +98,6 @@ jobs: VERSION=$(cat common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g') echo "version=$VERSION" >> $GITHUB_OUTPUT - # - name: Create nix flake revision tarball - # run: | - # GIT_SHA=${{github.sha}} - # MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }} - - # mkdir -p "/tmp/pg_upgrade_bin/${MAJOR_VERSION}" - # echo "$GIT_SHA" >> "/tmp/pg_upgrade_bin/${MAJOR_VERSION}/nix_flake_version" - # tar -czf "/tmp/pg_binaries.tar.gz" -C "/tmp/pg_upgrade_bin" . - - name: configure aws credentials - staging uses: aws-actions/configure-aws-credentials@v4 with: diff --git a/Dockerfile-kubernetes b/Dockerfile-kubernetes index a1a39e498..5c69f6aa8 100644 --- a/Dockerfile-kubernetes +++ b/Dockerfile-kubernetes @@ -1,6 +1,6 @@ FROM alpine:3.21 -ADD ./output-cloudimg/packer-cloudimg /disk/focal.qcow2 +ADD ./output-cloudimg/packer-cloudimg /disk/image.qcow2 RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client nftables cloud-utils-localds aavmf virtiofsd # dev stuff diff --git a/Makefile b/Makefile index 5bef8a430..96a4925ef 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,6 @@ init: qemu-arm64-nix.pkr.hcl output-cloudimg/packer-cloudimg: ansible qemu-arm64-nix.pkr.hcl packer build -var "git_sha=$(UPSTREAM_NIX_GIT_SHA)" qemu-arm64-nix.pkr.hcl -disk/focal-raw.img: output-cloudimg/packer-cloudimg - mkdir -p disk - sudo qemu-img convert -O raw output-cloudimg/packer-cloudimg disk/focal-raw.img - alpine-image: output-cloudimg/packer-cloudimg sudo nerdctl build . -t supabase-postgres-test:$(GIT_SHA) -f ./Dockerfile-kubernetes diff --git a/qemu-arm64-nix.pkr.hcl b/qemu-arm64-nix.pkr.hcl index 192796205..352ae5c38 100644 --- a/qemu-arm64-nix.pkr.hcl +++ b/qemu-arm64-nix.pkr.hcl @@ -74,8 +74,8 @@ source "qemu" "cloudimg" { format = "qcow2" headless = true http_directory = "http" - iso_checksum = "file:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS" - iso_url = "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img" + iso_checksum = "file:https://cloud-images.ubuntu.com/noble/current/SHA256SUMS" + iso_url = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-arm64.img" memory = 40000 qemu_binary = "qemu-system-aarch64" qemuargs = [ diff --git a/scripts/90-cleanup-qemu.sh b/scripts/90-cleanup-qemu.sh index d6c6ade05..c70c1d246 100644 --- a/scripts/90-cleanup-qemu.sh +++ b/scripts/90-cleanup-qemu.sh @@ -24,10 +24,8 @@ elif [ -n "$(command -v apt-get)" ]; then autoconf \ autotools-dev \ cmake-data \ - cpp-8 \ cpp-9 \ cpp-10 \ - gcc-8 \ gcc-9 \ gcc-10 \ git \ @@ -43,7 +41,6 @@ elif [ -n "$(command -v apt-get)" ]; then add-apt-repository --yes --remove ppa:ansible/ansible source /etc/os-release - apt-get -y remove --purge linux-headers-5.11.0-1021-aws apt-get -y update apt-get -y upgrade