@@ -65,9 +65,6 @@ ARG ETCD_VERSION="v3.5.13"
6565ARG TWO_NODE= false
6666ARG KINE_VERSION= 0.11.4
6767
68- # MAAS Variables
69- ARG IS_MAAS= false
70-
7168# UKI Variables
7269ARG IS_UKI= false
7370ARG INCLUDE_MS_SECUREBOOT_KEYS= true
@@ -681,10 +678,6 @@ base-image:
681678 COPY cloudconfigs/80_stylus_uki.yaml /etc/kairos/80_stylus_uki.yaml
682679 END
683680
684- IF [ "$IS_MAAS" = "true" ]
685- COPY cloudconfigs/80_stylus_maas.yaml /system/oem/80_stylus_maas.yaml
686- END
687-
688681 # OS == Ubuntu
689682 IF [ "$OS_DISTRIBUTION" = "ubuntu" ] && [ "$ARCH" = "amd64" ]
690683 IF [ ! -z "$UBUNTU_PRO_KEY" ]
@@ -802,7 +795,7 @@ base-image:
802795
803796 DO +OS_RELEASE --OS_VERSION = $KAIROS_VERSION
804797
805- DO +KAIROS_RELEASE --OS_VERSION = $OS_VERSION --OS_DISTRIBUTION = $OS_DISTRIBUTION --ARCH = $ARCH --IS_MAAS = $IS_MAAS
798+ DO +KAIROS_RELEASE --OS_VERSION = $OS_VERSION --OS_DISTRIBUTION = $OS_DISTRIBUTION
806799
807800 RUN rm -rf /var/cache/* && \
808801 journalctl --vacuum-size = 1K && \
@@ -822,45 +815,15 @@ KAIROS_RELEASE:
822815 COMMAND
823816 ARG OS_VERSION
824817 ARG OS_DISTRIBUTION
825- ARG ARCH
826- ARG IS_MAAS= false
827- # Build dynamic KAIROS_IMAGE_LABEL based on OS version, arch, and MAAS flag
828- # Format: {OS_VERSION}-standard-{ARCH}-generic{MAAS_SUFFIX}
829- # For Ubuntu, OS_VERSION is the major version (e.g., "22"), so we format it as "22.04"
830- IF [ "$OS_DISTRIBUTION" = "ubuntu" ]
831- IF [ "$OS_VERSION" = "22" ] || [ "$OS_VERSION" = "20" ]
832- IF [ "$IS_MAAS" = "true" ]
833- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}.04-standard-${ARCH}-generic-maas"
834- ELSE
835- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}.04-standard-${ARCH}-generic"
836- END
837- ELSE
838- IF [ "$IS_MAAS" = "true" ]
839- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}-standard-${ARCH}-generic-maas"
840- ELSE
841- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}-standard-${ARCH}-generic"
842- END
843- END
844- ELSE
845- IF [ "$IS_MAAS" = "true" ]
846- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}-standard-${ARCH}-generic-maas"
847- ELSE
848- LET KAIROS_IMAGE_LABEL= "${OS_VERSION}-standard-${ARCH}-generic"
849- END
850- END
851818 RUN if [ -f /etc/kairos-release ]; then \
852819 sed -i 's/^KAIROS_NAME=.*/KAIROS_NAME="kairos-core-' "$OS_DISTRIBUTION" '-' "$OS_VERSION" '"/' /etc/kairos-release; \
853- sed -i '/^KAIROS_IMAGE_LABEL=/d' /etc/kairos-release; \
854- echo 'KAIROS_IMAGE_LABEL="' "$KAIROS_IMAGE_LABEL" '"' >> /etc/kairos-release; \
855820 else \
856821 echo 'KAIROS_NAME="kairos-core-' "$OS_DISTRIBUTION" '-' "$OS_VERSION" '"' >> /etc/kairos-release; \
857- echo 'KAIROS_IMAGE_LABEL="' "$KAIROS_IMAGE_LABEL" '"' >> /etc/kairos-release; \
858822 fi
859823
860824# Used to build the installer image. The installer ISO will be created from this.
861825iso-image :
862826 FROM --platform=linux/${ARCH} +base-image
863-
864827 IF [ "$IS_UKI" = "false" ]
865828 COPY --platform = linux/${ARCH } +stylus-image/ /
866829 ELSE
@@ -878,91 +841,14 @@ iso-image:
878841 RUN touch /etc/machine-id \
879842 && chmod 444 /etc/machine-id
880843
881- # Only push image if not building for MAAS (MAAS uses local image via --load)
882- IF [ "$IS_MAAS" = "false" ]
883- ARG IMAGE_TAG
884- SAVE IMAGE --push palette-installer-image:$IMAGE_TAG
885- ELSE
886- SAVE IMAGE index.docker.io/library/palette-installer-image:latest
887- END
844+ SAVE IMAGE palette-installer-image:$IMAGE_TAG
888845
889846iso-disk-image :
890847 FROM scratch
891848
892849 COPY +iso/*.iso /disk/
893850 SAVE IMAGE --push $IMAGE_REGISTRY /$IMAGE_REPO /$ISO_NAME :$IMAGE_TAG
894851
895- # Generate just the Kairos raw image from the iso-image
896- # This target converts the installer image to a raw disk image using auroraboot
897- kairos-raw-image :
898- FROM --platform=linux/amd64 --allow-privileged earthly/dind:alpine-3.19-docker-25.0.5-r0
899-
900- # Use Docker-in-Docker to convert iso-image to raw
901- WITH DOCKER \
902- --load index.docker.io/library/palette-installer-image:latest= (+iso-image )
903- RUN echo "=== Setting up workdir ===" && \
904- mkdir -p /workdir && \
905- cd /workdir && \
906- echo "=== Verifying Docker image is available ===" && \
907- docker images | grep palette-installer-image || echo "Warning: palette-installer-image not found in docker images" && \
908- if ! docker inspect index.docker.io/library/palette-installer-image:latest > /dev/null 2> &1; then \
909- echo "Error: Image index.docker.io/library/palette-installer-image:latest not found" ; \
910- echo "Available images:" ; \
911- docker images || true; \
912- exit 1; \
913- fi && \
914- echo "=== Running auroraboot to convert image ===" && \
915- echo "Using auroraboot v0.6.4 (known working version)" && \
916- docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock \
917- -v /workdir:/aurora --net host --rm quay.io/kairos/auroraboot:v0.6.4 \
918- --debug \
919- --set "disable_http_server=true" \
920- --set "disable_netboot=true" \
921- --set "disk.efi=true" \
922- --set "container_image=index.docker.io/library/palette-installer-image:latest" \
923- --set "state_dir=/aurora" 2> &1 | tee /workdir/auroraboot.log; \
924- AURORABOOT_EXIT= $?; \
925- echo "=== Auroraboot finished with exit code: $AURORABOOT_EXIT ===" && \
926- echo "=== Auroraboot log size: $(wc -l < /workdir/auroraboot.log 2>/dev/null || echo '0') lines ===" && \
927- echo "=== Full auroraboot log ===" && \
928- cat /workdir/auroraboot.log 2> /dev/null || echo "Could not read log file" && \
929- echo "" && \
930- echo "=== Checking for errors/warnings in log ===" && \
931- grep -i "error\| fail\| panic\| warn" /workdir/auroraboot.log 2> /dev/null | head -20 || echo "No errors/warnings found" && \
932- echo "" && \
933- echo "=== Checking temp-rootfs contents ===" && \
934- if [ -d /workdir/temp-rootfs ]; then \
935- echo "temp-rootfs directory size: $(du -sh /workdir/temp-rootfs 2>/dev/null || echo 'unknown')" ; \
936- echo "temp-rootfs file count: $(find /workdir/temp-rootfs -type f 2>/dev/null | wc -l || echo '0')" ; \
937- find /workdir/temp-rootfs -type f 2> /dev/null | head -10 || echo "No files found in temp-rootfs" ; \
938- fi && \
939- echo "" && \
940- echo "=== Finding raw image ===" && \
941- echo "Searching in /workdir and all subdirectories..." && \
942- find /workdir -type f \( -name "*.raw" -o -name "*.img" \) 2> /dev/null | head -20 && \
943- RAW_IMG= $(find /workdir -type f \( -name "*.raw" -o -name "*.img" \) | head -n1 ); \
944- if [ -z "$RAW_IMG" ]; then \
945- echo "❌ Error: No raw image found in /workdir" ; \
946- echo "Auroraboot exit code: $AURORABOOT_EXIT" ; \
947- echo "=== Auroraboot log (checking for errors) ===" ; \
948- grep -i "error\| fail\| panic" /workdir/auroraboot.log 2> /dev/null || echo "No obvious errors in log" ; \
949- echo "=== Contents of /workdir ===" ; \
950- ls -laR /workdir || true; \
951- echo "=== Checking auroraboot state directory ===" ; \
952- if [ -d /workdir/temp-rootfs ]; then \
953- echo "temp-rootfs directory exists, size: $(du -sh /workdir/temp-rootfs 2>/dev/null || echo 'unknown')" ; \
954- find /workdir/temp-rootfs -type f | head -10 || true; \
955- fi; \
956- exit 1; \
957- fi && \
958- echo "✅ Found raw image: $RAW_IMG" && \
959- echo "Raw image size: $(du -h " $RAW_IMG " | cut -f1)" && \
960- cp "$RAW_IMG" /kairos.raw && \
961- echo "✅ Kairos raw image created: /kairos.raw"
962- END
963-
964- SAVE ARTIFACT /kairos.raw AS LOCAL ./build/
965-
966852go-deps :
967853 FROM $SPECTRO_PUB_REPO/third-party/golang:${GOLANG_VERSION}-alpine
968854 RUN apk add libc-dev binutils-gold clang
@@ -1088,4 +974,3 @@ UPX:
1088974 COMMAND
1089975 ARG bin
1090976 RUN upx -1 $bin
1091-
0 commit comments