Skip to content

chore: strip out unnecessary dependencies from QEMU builds #1584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/qemu-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'qemu-arm64-nix.pkr.hcl'
- 'common-nix.vars.pkr.hcl'
- 'ansible/vars.yml'
- 'scripts/*'
workflow_dispatch:

permissions:
Expand Down
11 changes: 7 additions & 4 deletions Dockerfile-kubernetes
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM alpine:3.21
FROM alpine:3.22

ADD ./output-cloudimg/packer-cloudimg /disk/focal.qcow2

RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client nftables cloud-utils-localds aavmf virtiofsd
# dev stuff
# RUN apk add --no-cache iproute2
RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client aavmf virtiofsd \
&& truncate -s 64M /root/varstore.img \
&& truncate -s 64M /root/efi.img \
&& dd if=/usr/share/AAVMF/QEMU_EFI.fd of=/root/efi.img conv=notrunc \
&& qemu-img create -f qcow2 /tmp/disk.qcow2 -b /disk/focal.qcow2 -F qcow2 \
&& apk del --no-cache aavmf qemu-img

CMD exec /bin/sh -c "trap : TERM INT; sleep 9999999999d & wait"
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.0.1.094-orioledb"
postgres17: "17.4.1.044"
postgres15: "15.8.1.101"
postgresorioledb-17: "17.0.1.095-orioledb"
postgres17: "17.4.1.45"
postgres15: "15.8.1.102"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
2 changes: 1 addition & 1 deletion ebssurrogate/scripts/qemu-bootstrap-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ execute_stage2_playbook
# we do not want to ship an initialized DB as this is performed as needed
mkdir -p /db/template
mv /data/pgdata /db/template
cloud-init clean --logs
clean_legacy_things
clean_system
cloud-init clean --logs
5 changes: 4 additions & 1 deletion scripts/90-cleanup-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ 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-mark manual libevent-2.1-7 # required for pgbouncer
apt-get -y remove --purge ansible-core apport appstream bash-completion bcache-tools bind9-dnsutils bind9-host bind9-libs bolt btrfs-progs byobu command-not-found console-setup distro-info eject fonts-ubuntu-console friendly-recovery ftp fwupd gawk gdisk keyboard-configuration libvolume-key1 libicu66 libssl-dev lvm2 lxd-agent-loader man-db mdadm modemmanager mtd-utils nano netcat-openbsd nfs-common ntfs-3g parted pastebinit screen strace thin-provisioning-tools tmux usb-modeswitch vim vim-runtime wget whiptail xfsprogs
apt remove -y --purge libc6-dev linux-libc-dev libevent-dev libpcre3-dev libsystemd-dev

apt-get -y update
apt-get -y upgrade
Expand Down