-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tumbleweed example Signed-off-by: Fredrik Lönnegren <[email protected]> * Add status badges for workflows to README Signed-off-by: Fredrik Lönnegren <[email protected]> * Update ele-testhelpers to latest commit Signed-off-by: Fredrik Lönnegren <[email protected]> --------- Signed-off-by: Fredrik Lönnegren <[email protected]>
- Loading branch information
Showing
8 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# run `make build` to build local/elemental-toolkit image | ||
ARG TOOLKIT_REPO | ||
ARG VERSION | ||
FROM ${TOOLKIT_REPO}:${VERSION} as TOOLKIT | ||
|
||
# OS base image of our choice | ||
FROM opensuse/tumbleweed:latest as OS | ||
ARG REPO | ||
ARG VERSION | ||
ENV VERSION=${VERSION} | ||
|
||
# install kernel, systemd, dracut, grub2 and other required tools | ||
RUN ARCH=$(uname -m); \ | ||
if [[ $ARCH == "aarch64" ]]; then ARCH="arm64"; fi; \ | ||
zypper --non-interactive install --no-recommends -- \ | ||
kernel-default \ | ||
device-mapper \ | ||
dracut \ | ||
grub2 \ | ||
grub2-${ARCH}-efi \ | ||
shim \ | ||
haveged \ | ||
systemd \ | ||
NetworkManager \ | ||
openssh-server \ | ||
openssh-clients \ | ||
timezone \ | ||
parted \ | ||
e2fsprogs \ | ||
dosfstools \ | ||
mtools \ | ||
xorriso \ | ||
findutils \ | ||
gptfdisk \ | ||
rsync \ | ||
squashfs \ | ||
lvm2 \ | ||
tar \ | ||
gzip \ | ||
vim \ | ||
which \ | ||
less \ | ||
sudo \ | ||
curl \ | ||
sed | ||
|
||
# Just add the elemental cli | ||
COPY --from=TOOLKIT /usr/bin/elemental /usr/bin/elemental | ||
|
||
# Enable essential services | ||
RUN systemctl enable NetworkManager.service | ||
|
||
# Generate initrd with required elemental services | ||
RUN elemental init -f && \ | ||
kernel=$(ls /boot/Image-* | head -n1) && \ | ||
if [ -e "$kernel" ]; then ln -sf "${kernel#/boot/}" /boot/vmlinuz; fi && \ | ||
rm -rf /var/log/update* && \ | ||
>/var/log/lastlog && \ | ||
rm -rf /boot/vmlinux* | ||
|
||
# Update os-release file with some metadata | ||
RUN echo IMAGE_REPO=\"${REPO}\" >> /etc/os-release && \ | ||
echo IMAGE_TAG=\"${VERSION}\" >> /etc/os-release && \ | ||
echo IMAGE=\"${REPO}:${VERSION}\" >> /etc/os-release && \ | ||
echo TIMESTAMP="`date +'%Y%m%d%H%M%S'`" >> /etc/os-release && \ | ||
echo GRUB_ENTRY_NAME=\"Elemental\" >> /etc/os-release | ||
|
||
# Good for validation after the build | ||
CMD /bin/bash | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 7 additions & 31 deletions
38
vendor/github.com/rancher-sandbox/ele-testhelpers/vm/sut.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters