Skip to content

Commit

Permalink
fix: reduce installer image
Browse files Browse the repository at this point in the history
This still allows running install on 1 GiB hardware.

Fixes siderolabs#10024

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Dec 24, 2024
1 parent 78b3e7f commit 82ea44a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 23 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-12-18T13:55:17Z by kres b9507d6.
# Generated on 2024-12-24T15:00:58Z by kres fcff05e.

name: default
concurrency:
Expand Down Expand Up @@ -2190,6 +2190,16 @@ jobs:
VIA_MAINTENANCE_MODE: "true"
run: |
sudo -E make e2e-qemu
- name: e2e-min-requirements
env:
GITHUB_STEP_NAME: ${{ github.job}}-e2e-min-requirements
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_MEMORY_CONTROLPLANES: "2048"
QEMU_MEMORY_WORKERS: "1024"
QEMU_SYSTEM_DISK_SIZE: "10240"
SHORT_INTEGRATION_TEST: "yes"
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/integration-misc-1-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-28T13:53:18Z by kres 232fe63.
# Generated on 2024-12-24T15:00:58Z by kres fcff05e.

name: integration-misc-1-cron
concurrency:
Expand Down Expand Up @@ -104,6 +104,16 @@ jobs:
VIA_MAINTENANCE_MODE: "true"
run: |
sudo -E make e2e-qemu
- name: e2e-min-requirements
env:
GITHUB_STEP_NAME: ${{ github.job}}-e2e-min-requirements
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_MEMORY_CONTROLPLANES: "2048"
QEMU_MEMORY_WORKERS: "1024"
QEMU_SYSTEM_DISK_SIZE: "10240"
SHORT_INTEGRATION_TEST: "yes"
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,16 @@ spec:
VIA_MAINTENANCE_MODE: true
DISABLE_DHCP_HOSTNAME: true
IMAGE_REGISTRY: registry.dev.siderolabs.io
- name: e2e-min-requirements
command: e2e-qemu
withSudo: true
environment:
GITHUB_STEP_NAME: ${{ github.job}}-e2e-min-requirements
SHORT_INTEGRATION_TEST: yes
QEMU_MEMORY_WORKERS: 1024
QEMU_MEMORY_CONTROLPLANES: 2048
QEMU_SYSTEM_DISK_SIZE: 10240
IMAGE_REGISTRY: registry.dev.siderolabs.io
- name: save-talos-logs
conditions:
- always
Expand Down
20 changes: 2 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -942,25 +942,9 @@ FROM install-artifacts-${INSTALLER_ARCH} AS install-artifacts
FROM alpine:3.20.3 AS installer-image
ARG SOURCE_DATE_EPOCH
ENV SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}
ARG INSTALLER_PKGS
RUN apk add --no-cache --update --no-scripts \
bash \
binutils-aarch64 \
binutils-x86_64 \
cpio \
dosfstools \
e2fsprogs \
efibootmgr \
kmod \
mtools \
pigz \
qemu-img \
squashfs-tools \
tar \
util-linux \
xfsprogs \
xorriso \
xz \
zstd
${INSTALLER_PKGS}
ARG TARGETARCH
ENV TARGETARCH=${TARGETARCH}
COPY --from=installer-build /installer /bin/installer
Expand Down
27 changes: 26 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,32 @@ TESTPKGS ?= github.com/siderolabs/talos/...
RELEASES ?= v1.8.4 v1.9.0
SHORT_INTEGRATION_TEST ?=
CUSTOM_CNI_URL ?=

INSTALLER_ARCH ?= all
INSTALLER_ONLY_PKGS ?= \
bash \
cpio \
efibootmgr \
kmod \
squashfs-tools \
xfsprogs \
xz \
zstd

IMAGER_EXTRA_PKGS ?= \
binutils-aarch64 \
binutils-x86_64 \
dosfstools \
e2fsprogs \
mtools \
pigz \
qemu-img \
tar \
xorriso

INSTALLER_PKGS ?= $(INSTALLER_ONLY_PKGS) $(IMAGER_EXTRA_PKGS)
IMAGER_ARGS ?=

MORE_IMAGES ?=

CGO_ENABLED ?= 0
Expand Down Expand Up @@ -195,6 +219,7 @@ COMMON_ARGS += --build-arg=SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)
COMMON_ARGS += --build-arg=ARTIFACTS=$(ARTIFACTS)
COMMON_ARGS += --build-arg=TESTPKGS=$(TESTPKGS)
COMMON_ARGS += --build-arg=INSTALLER_ARCH=$(INSTALLER_ARCH)
COMMON_ARGS += --build-arg=INSTALLER_PKGS="$(INSTALLER_PKGS)"
COMMON_ARGS += --build-arg=CGO_ENABLED=$(CGO_ENABLED)
COMMON_ARGS += --build-arg=GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
COMMON_ARGS += --build-arg=GO_BUILDFLAGS_TALOSCTL="$(GO_BUILDFLAGS_TALOSCTL)"
Expand Down Expand Up @@ -369,7 +394,7 @@ sd-stub: ## Outputs the systemd-stub to the artifact directory.

.PHONY: installer
installer: ## Builds the container image for the installer and outputs it to the registry.
@INSTALLER_ARCH=targetarch \
@INSTALLER_ARCH=targetarch INSTALLER_PKGS="$(INSTALLER_ONLY_PKGS)" \
$(MAKE) registry-$@

.PHONY: imager
Expand Down
4 changes: 2 additions & 2 deletions hack/test/e2e-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ function create_cluster {
--kubernetes-version="${KUBERNETES_VERSION}" \
--controlplanes=3 \
--workers="${QEMU_WORKERS:-2}" \
--disk=15360 \
--disk="${QEMU_SYSTEM_DISK_SIZE:-15360}" \
--extra-disks="${QEMU_EXTRA_DISKS:-0}" \
--extra-disks-size="${QEMU_EXTRA_DISKS_SIZE:-5120}" \
--extra-disks-drivers="${QEMU_EXTRA_DISKS_DRIVERS:-}" \
--mtu=1430 \
--memory=2048 \
--memory="${QEMU_MEMORY_CONTROLPLANES:-2048}" \
--memory-workers="${QEMU_MEMORY_WORKERS:-2048}" \
--cpus="${QEMU_CPUS:-2}" \
--cpus-workers="${QEMU_CPUS_WORKERS:-2}" \
Expand Down

0 comments on commit 82ea44a

Please sign in to comment.