Skip to content
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

Update example oses #2097

Merged
merged 3 commits into from
Jun 10, 2024
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
6 changes: 1 addition & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
steps:
- id: set-matrix
run: |
if [ "${{ contains(github.event.pull_request.labels.*.name, 'all-distros') }}" == "true" ]; then
echo "flavor=['green', 'blue', 'orange']" >> $GITHUB_OUTPUT
else
echo "flavor=['green']" >> $GITHUB_OUTPUT
fi
echo "flavor=['green', 'blue', 'orange']" >> $GITHUB_OUTPUT
- id: set-platform
run: |
if [ "${{ startsWith(github.event.ref, 'refs/tags/v') }}" == "true" ]; then
Expand Down
10 changes: 1 addition & 9 deletions examples/blue/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION
FROM ${TOOLKIT_REPO}:${VERSION} as TOOLKIT

# OS base image of our choice
FROM fedora:39 as OS
FROM fedora:40 as OS
ARG REPO
ARG VERSION
ENV VERSION=${VERSION}
Expand Down Expand Up @@ -53,14 +53,6 @@ RUN mkdir -p /oem /system
# Just add the elemental cli
COPY --from=TOOLKIT /usr/bin/elemental /usr/bin/elemental

# This is patches are fix upstream dracut, see https://github.com/dracutdevs/dracut/pull/2525
ADD patches /

RUN cd /usr/lib/dracut && \
patch -p 1 -f -i /0001-fix-dmsquash-live-restore-compatibility-with-earlier.patch && \
patch -p 1 -f -i /0001-fix-overlayfs-split-overlayfs-mount-in-two-steps.patch && \
rm /*.patch

# This is for automatic testing purposes, do not do this in production.
RUN echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/rootlogin.conf

Expand Down

This file was deleted.

This file was deleted.

19 changes: 9 additions & 10 deletions examples/orange/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION
FROM ${TOOLKIT_REPO}:${VERSION} as TOOLKIT

# OS base image of our choice
FROM ubuntu:23.04 as OS
FROM ubuntu:24.04 as OS
ARG REPO
ARG VERSION
ENV VERSION=${VERSION}
Expand Down Expand Up @@ -49,9 +49,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
patch \
netplan.io \
locales \
kbd \
podman \
xz-utils

# Hack to prevent systemd-firstboot failures while setting keymap, this is known
# Debian issue (T_T) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790955
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finding

ARG KBD=2.6.4
RUN curl -L https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-${KBD}.tar.xz --output kbd-${KBD}.tar.xz && \
tar xaf kbd-${KBD}.tar.xz && mkdir -p /usr/share/keymaps && cp -Rp kbd-${KBD}/data/keymaps/* /usr/share/keymaps/

# Symlink grub2-editenv
RUN ln -sf /usr/bin/grub-editenv /usr/bin/grub2-editenv

Expand All @@ -61,14 +68,6 @@ RUN mkdir -p /oem /system
# Just add the elemental cli
COPY --from=TOOLKIT /usr/bin/elemental /usr/bin/elemental

# This is patches are fix upstream dracut, see https://github.com/dracutdevs/dracut/pull/2525
ADD patches /

RUN cd /usr/lib/dracut && \
patch -p 1 -f -i /0001-fix-dmsquash-live-restore-compatibility-with-earlier.patch && \
patch -p 1 -f -i /0001-fix-overlayfs-split-overlayfs-mount-in-two-steps.patch && \
rm /*.patch

# Enable essential services
RUN systemctl enable systemd-networkd.service

Expand All @@ -95,7 +94,7 @@ ADD 05_network.yaml /system/oem/05_network.yaml
# Arrange bootloader binaries into /usr/lib/elemental/bootloader
# this way elemental installer can easily fetch them
RUN mkdir -p /usr/lib/elemental/bootloader && \
cp /usr/lib/grub/x86_64-efi-signed/gcdx64.efi.signed /usr/lib/elemental/bootloader/grubx64.efi && \
cp /usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed /usr/lib/elemental/bootloader/grubx64.efi && \
cp /usr/lib/shim/shimx64.efi.signed.latest /usr/lib/elemental/bootloader/shimx64.efi && \
cp /usr/lib/shim/mmx64.efi /usr/lib/elemental/bootloader/mmx64.efi

Expand Down

This file was deleted.

This file was deleted.

16 changes: 14 additions & 2 deletions tests/smoke/smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package elemental_test
import (
"fmt"
"math/rand"
"strings"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -100,10 +101,21 @@ var _ = Describe("Elemental Smoke tests", func() {
})

It("has default localectl configuration from cloud-init", func() {
out, err := s.Command("localectl status")
var isUbuntu bool

out, err := s.Command("source /etc/os-release && echo $NAME")
Expect(err).ToNot(HaveOccurred())
if strings.Contains(out, "Ubuntu") {
isUbuntu = true
}

out, err = s.Command("localectl status")
Expect(err).ToNot(HaveOccurred())
Expect(out).Should(ContainSubstring("LANG=en_US.UTF-8"))
Expect(out).Should(ContainSubstring("VC Keymap: us"))
if !isUbuntu {
// Setting keymap is not supported in Debian via systemd (localectl)
Expect(out).Should(ContainSubstring("VC Keymap: us"))
}
})
})
})
Loading