Skip to content

Commit

Permalink
⚠️ Add pure alpine flavor (#1465)
Browse files Browse the repository at this point in the history
* Add pure alpine flavor

Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka authored Oct 18, 2023
1 parent 750b0d1 commit 541dea6
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/flavors.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"standard": "true"
},
{
"flavor": "alpine-ubuntu",
"flavor": "alpine",
"standard": "true"
},
{
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/image-arm-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
docker:
uses: ./.github/workflows/reusable-docker-arm-build.yaml
with:
flavor: opensuse-leap-arm-rpi
flavor: ubuntu
model: rpi4
worker: fast
docker-alpine:
uses: ./.github/workflows/reusable-docker-arm-build.yaml
with:
flavor: alpine-arm-rpi
model: rpi4
worker: fast
67 changes: 66 additions & 1 deletion .github/workflows/image-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@ jobs:
with:
flavor: ubuntu

core-alpine:
uses: ./.github/workflows/reusable-build-flavor.yaml
with:
flavor: alpine

install:
uses: ./.github/workflows/reusable-install-test.yaml
with:
flavor: ubuntu
needs:
- core

install-alpine:
uses: ./.github/workflows/reusable-install-test.yaml
with:
flavor: alpine
needs:
- core-alpine

zfs:
uses: ./.github/workflows/reusable-zfs-test.yaml
with:
Expand All @@ -36,6 +48,13 @@ jobs:
needs:
- core

acceptance-alpine:
uses: ./.github/workflows/reusable-qemu-acceptance-test.yaml
with:
flavor: alpine
needs:
- core-alpine

bundles:
uses: ./.github/workflows/reusable-qemu-bundles-test.yaml
with:
Expand All @@ -50,26 +69,55 @@ jobs:
needs:
- core

reset-alpine:
uses: ./.github/workflows/reusable-qemu-reset-test.yaml
with:
flavor: alpine
needs:
- core-alpine

netboot:
uses: ./.github/workflows/reusable-qemu-netboot-test.yaml
with:
flavor: ubuntu
needs:
- core

netboot-alpine:
uses: ./.github/workflows/reusable-qemu-netboot-test.yaml
with:
flavor: alpine
needs:
- core-alpine

upgrade:
uses: ./.github/workflows/reusable-upgrade-with-cli-test.yaml
with:
flavor: ubuntu
needs:
- core

upgrade-alpine:
uses: ./.github/workflows/reusable-upgrade-with-cli-test.yaml
with:
flavor: alpine
needs:
- core-alpine

upgrade-latest:
uses: ./.github/workflows/reusable-upgrade-latest-test.yaml
with:
flavor: ubuntu
needs:
- core
- core

# enable once the first alpine only release is out as it currently cannot find the latest alpine release properly
#upgrade-latest-alpine:
# uses: ./.github/workflows/reusable-upgrade-latest-test.yaml
# with:
# flavor: alpine
# needs:
# - core-alpine

encryption:
uses: ./.github/workflows/reusable-encryption-test.yaml
Expand All @@ -87,3 +135,20 @@ jobs:
- "remote-static"
- "remote-https-pinned"
- "remote-https-bad-cert"

encryption-alpine:
uses: ./.github/workflows/reusable-encryption-test.yaml
with:
flavor: alpine
label: ${{ matrix.label }}
needs:
- core-alpine
strategy:
fail-fast: true
matrix:
label:
- "local-encryption"
- "remote-auto"
- "remote-static"
- "remote-https-pinned"
- "remote-https-bad-cert"
11 changes: 6 additions & 5 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
fail-fast: false
matrix:
include:
- flavor: "alpine-opensuse-leap"
- flavor: "alpine"
- flavor: "opensuse-leap"
- flavor: "opensuse-tumbleweed"
- flavor: "ubuntu"
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
fail-fast: false
matrix:
include:
- flavor: alpine-opensuse-leap
- flavor: alpine
- flavor: opensuse-leap
netboot:
uses: ./.github/workflows/reusable-qemu-netboot-test.yaml
Expand All @@ -145,20 +145,21 @@ jobs:
fail-fast: false
matrix:
include:
- flavor: alpine-opensuse-leap
- flavor: alpine
- flavor: opensuse-leap
- flavor: ubuntu
upgrade:
uses: ./.github/workflows/reusable-upgrade-with-cli-test.yaml
with:
flavor: ${{ matrix.flavor }}

needs:
- core
strategy:
fail-fast: false
matrix:
include:
- flavor: alpine-opensuse-leap
- flavor: alpine
- flavor: opensuse-leap
upgrade-latest:
uses: ./.github/workflows/reusable-upgrade-latest-test.yaml
Expand All @@ -170,7 +171,7 @@ jobs:
fail-fast: false
matrix:
include:
- flavor: alpine-opensuse-leap
- flavor: alpine
- flavor: opensuse-leap
# - flavor: "ubuntu"
# - flavor: "ubuntu"
Expand Down
File renamed without changes.
17 changes: 16 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ framework:
WORKDIR /build

COPY ./profile-build /build
COPY framework-profile.yaml /build
COPY +luet/luet /usr/bin/luet

RUN go mod download
COPY framework-profile.yaml /build
RUN go run main.go ${FLAVOR} framework-profile.yaml /framework

RUN mkdir -p /framework/etc/kairos/
Expand Down Expand Up @@ -443,7 +444,21 @@ base-image:
RUN rm -rf /boot/initramfs-*
END

# Cleanup for alpine as this gets installed as a side-effect
# we already provide a /boot/initrd with the luet package
IF [ -e "/boot/initramfs-lts" ]
RUN rm /boot/initramfs-lts
END

IF [ ! -e "/boot/vmlinuz" ]
IF [ -e "/boot/vmlinuz-lts" ]
# Alpine provides the kernel under this name
RUN ln -sf /boot/vmlinuz-lts /boot/vmlinuz
END
IF [ -e "/boot/vmlinuz-rpi4" ]
# Alpine-rpi provides the kernel under this name
RUN ln -sf /boot/vmlinuz-rpi4 /boot/vmlinuz
END
# If it's an ARM flavor, we want a symlink here from zImage/Image
# Check that its not a symlink already or grub will fail!
IF [ -e "/boot/Image" ] && [ ! -L "/boot/Image" ]
Expand Down
50 changes: 12 additions & 38 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,119 +11,96 @@ flavors:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
debian-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy
ubuntu-20-lts-arm-nvidia-jetson-agx-orin:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-20-lts-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-22-lts-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-22-lts:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
ubuntu-20-lts:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
fips-systemd:
- common-packages
- kairos-toolchain-fips
- systemd-base
- dracut-network-legacy-compat
fedora:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
rockylinux:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
almalinux:
- common-packages
- kairos-toolchain
- systemd-base
- dracut-network-legacy-compat
opensuse-tumbleweed:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-tumbleweed-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
opensuse-leap-arm-rpi:
- common-packages
- kairos-toolchain
- systemd-base
- systemd-latest
- dracut-network-legacy
alpine-arm-rpi:
alpine:
- common-packages
- kairos-toolchain
- opensuse-leap-kernel
- openrc
alpine-opensuse-leap:
- common-packages
- kairos-toolchain
- openrc
- opensuse-leap-kernel
alpine-ubuntu:
- alpine-init
alpine-arm-rpi:
- common-packages
- kairos-toolchain
- ubuntu-kernel
- openrc
- alpine-init-rpi
# See https://github.com/kairos-io/packages/pull/67 for rationale
dracut-network-legacy:
alpine-init:
packages:
- dracut/network-legacy
dracut-network-legacy-compat:
- distro-kernel/alpine
alpine-init-rpi:
packages:
- dracut/network-legacy-compat
- distro-kernel/alpine-rpi
openrc:
packages:
- init-svc/openrc
systemd-base:
packages:
- init-svc/systemd
- dracut/kairos-network
- dracut/kairos-sysext
opensuse-leap-kernel:
packages:
- distro-kernels/opensuse-leap
Expand Down Expand Up @@ -159,9 +136,6 @@ ubuntu-kernel:
packages:
- distro-kernels/ubuntu
- distro-initrd/ubuntu
systemd-latest:
packages:
- dracut/sysext
repositories:
- &kairos
name: "kairos"
Expand All @@ -173,9 +147,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20231009132401-repository.yaml
reference: 20231018075943-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20231009133042-repository.yaml
reference: 20231018075844-repository.yaml
1 change: 1 addition & 0 deletions images/Dockerfile.almalinux
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN dnf install -y \
dracut-live \
dracut-network \
dracut-squash \
dhcp-client \
e2fsprogs \
efibootmgr \
epel-release \
Expand Down
Loading

0 comments on commit 541dea6

Please sign in to comment.