forked from suse-edge/Factory
Compare commits
No commits in common. "91c303e8d861d65d96bcc663c1a556deef30afb439536df12a871964e4081e53" and "f5cc155d16553e07a7822539a21979451c4efacd18e5eea560b26a4038d2ec0f" have entirely different histories.
91c303e8d8
...
f5cc155d16
@ -1,7 +1,5 @@
|
|||||||
#!BuildTag: kiwi-builder:latest
|
#!BuildTag: kiwi-builder:10.1
|
||||||
#!BuildTag: kiwi-builder:10.1.16.0
|
FROM registry.suse.com/bci/kiwi:10.1.10
|
||||||
#!BuildTag: kiwi-builder:10.1.16.0-%RELEASE%
|
|
||||||
FROM registry.suse.com/bci/kiwi:10.1.16
|
|
||||||
MAINTAINER SUSE LLC (https://www.suse.com/)
|
MAINTAINER SUSE LLC (https://www.suse.com/)
|
||||||
|
|
||||||
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||||
@ -13,7 +11,7 @@ LABEL org.opencontainers.image.version="%PACKAGE_VERSION%"
|
|||||||
LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/"
|
LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/"
|
||||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||||
LABEL org.opencontainers.image.vendor="SUSE LLC"
|
LABEL org.opencontainers.image.vendor="SUSE LLC"
|
||||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:10.1.16.0"
|
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:10.1"
|
||||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||||
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
|
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
|
||||||
LABEL com.suse.eula="SUSE Combined EULA February 2024"
|
LABEL com.suse.eula="SUSE Combined EULA February 2024"
|
||||||
@ -22,6 +20,10 @@ LABEL com.suse.image-type="application"
|
|||||||
LABEL com.suse.release-stage="released"
|
LABEL com.suse.release-stage="released"
|
||||||
# endlabelprefix
|
# endlabelprefix
|
||||||
|
|
||||||
|
# Install required packages for Kiwi to function as expected
|
||||||
|
# Should be provided via https://github.com/SUSE/BCI-dockerfile-generator/pull/1770
|
||||||
|
# RUN zypper in -y gawk && zypper clean -a
|
||||||
|
|
||||||
# Configure Kiwi to use kpartx
|
# Configure Kiwi to use kpartx
|
||||||
RUN echo -e "mapper:\n - part_mapper: kpartx" > /etc/kiwi.yml
|
RUN echo -e "mapper:\n - part_mapper: kpartx" > /etc/kiwi.yml
|
||||||
|
|
||||||
|
@ -8,40 +8,32 @@ Please ensure that you're running this on a registered SLE Micro 6.0 system, and
|
|||||||
|
|
||||||
Next, download the podman image:
|
Next, download the podman image:
|
||||||
|
|
||||||
# podman pull %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder
|
# podman pull %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10
|
||||||
|
|
||||||
Make a local output directory (where the images will reside):
|
Make a local output directory (where the images will reside):
|
||||||
|
|
||||||
# mkdir output
|
# mkdir output
|
||||||
|
|
||||||
Then, to build a standard "Base" image, run the following in podman:
|
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image
|
|
||||||
|
|
||||||
To build a "Base" SelfInstall ISO, you can add additional flags, for example:
|
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image -p Base-SelfInstall
|
|
||||||
|
|
||||||
Then, to build a standard "Default" image, run the following in podman:
|
Then, to build a standard "Default" image, run the following in podman:
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image -p Default
|
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10 build-image
|
||||||
|
|
||||||
To build a "Default" SelfInstall ISO, you can add additional flags, for example:
|
To build a SelfInstall ISO, you can add additional flags, for example:
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image -p Default-SelfInstall
|
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10 build-image -p Default-SelfInstall
|
||||||
|
|
||||||
To build an image with a RealTime kernel, e.g. a RAW disk image ("Default"), use the following:
|
To build an image with a RealTime kernel, e.g. a RAW disk image ("Default"), use the following:
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image -p Base-RT
|
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10 build-image -p Base-RT
|
||||||
|
|
||||||
To build an image that supports a large block/sectorsize (4096), use the "-b" flag, for example:
|
To build an image that supports a large block/sectorsize (4096), use the "-b" flag, for example:
|
||||||
|
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image -p Default-SelfInstall -b
|
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10 build-image -p Default-SelfInstall -b
|
||||||
|
|
||||||
# mkdir mydefs/
|
# mkdir mydefs/
|
||||||
# cp /path/to/SL-Micro.kiwi mydefs/
|
# cp /path/to/SL-Micro.kiwi mydefs/
|
||||||
# cp /path/to/config.sh mydefs/
|
# cp /path/to/config.sh mydefs/
|
||||||
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -v ./mydefs/:/micro-sdk/defs/ -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder build-image
|
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -v ./mydefs/:/micro-sdk/defs/ -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10 build-image
|
||||||
|
|
||||||
All output will be in the local $(pwd)/output directory, for example:
|
All output will be in the local $(pwd)/output directory, for example:
|
||||||
|
|
||||||
|
@ -21,45 +21,43 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Set image build defaults, blocksize is an empty string
|
# Set image build defaults, blocksize is an empty string
|
||||||
PROFILE="Base"
|
PROFILE="Default"
|
||||||
LARGEBLOCK=false
|
LARGEBLOCK=false
|
||||||
|
|
||||||
# Print usage
|
# Print usage
|
||||||
usage(){
|
usage(){
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
==============================
|
==============================
|
||||||
SLE Micro 6.0 Kiwi SDK Builder
|
SLE Micro 6.0 Kiwi SDK Builder
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Usage: ${0} [-p <profile>] [-b]
|
Usage: ${0} [-p <profile>] [-b]
|
||||||
|
|
||||||
Profile Options (-p):
|
Profile Options (-p):
|
||||||
* Base: RAW Disk Image with podman
|
* Default: RAW Disk Image with kernel-default
|
||||||
* Base-SelfInstall: SelfInstall ISO with podman
|
* Default-SelfInstall: SelfInstall ISO with kernel-default
|
||||||
* Default: RAW Disk Image with podman and kvm
|
* Base-RT: RAW Disk Image with kernel-rt
|
||||||
* Default-SelfInstall: SelfInstall ISO with podman and kvm
|
* Base-RT-SelfInstall: SelfInstall ISO with kernel-rt
|
||||||
* Base-RT: RAW Disk Image with kernel-rt
|
|
||||||
* Base-RT-SelfInstall: SelfInstall ISO with kernel-rt
|
|
||||||
|
|
||||||
4096 Blocksize (-b): If specified, use a 4096 blocksize (rather than 512) when generating the image.
|
4096 Blocksize (-b): If specified, use a 4096 blocksize (rather than 512) when generating the image.
|
||||||
|
|
||||||
NOTE: If both options are omitted, the "Base" profile with a standard "512" blocksize is used.
|
NOTE: If both options are omitted, the "Default" profile with a standard "512" blocksize is used.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Grab CLI options and handle
|
# Grab CLI options and handle
|
||||||
while getopts 'p:bh' OPTION; do
|
while getopts 'p:bh' OPTION; do
|
||||||
case "${OPTION}" in
|
case "${OPTION}" in
|
||||||
p)
|
p)
|
||||||
PROFILE="${OPTARG}"
|
PROFILE="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
b)
|
b)
|
||||||
LARGEBLOCK=true
|
LARGEBLOCK=true
|
||||||
;;
|
;;
|
||||||
?)
|
?)
|
||||||
usage && exit 2
|
usage && exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# To avoid wasting time, perform the loop creation test first, and exit with a warning to re-run.
|
# To avoid wasting time, perform the loop creation test first, and exit with a warning to re-run.
|
||||||
@ -90,4 +88,4 @@ if [ $RESULT -eq 0 ]; then
|
|||||||
echo -e "\n\nINFO: Image build successful, generated images are available in the 'output' directory."
|
echo -e "\n\nINFO: Image build successful, generated images are available in the 'output' directory."
|
||||||
else
|
else
|
||||||
echo -e "\n\nERROR: Failed to build the image, please see above logs."
|
echo -e "\n\nERROR: Failed to build the image, please see above logs."
|
||||||
fi
|
fi
|
@ -16,9 +16,6 @@ kind: ClusterctlConfig
|
|||||||
metadata:
|
metadata:
|
||||||
name: clusterctl-config
|
name: clusterctl-config
|
||||||
namespace: rancher-turtles-system
|
namespace: rancher-turtles-system
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": "post-install, post-upgrade"
|
|
||||||
"helm.sh/hook-weight": "1"
|
|
||||||
spec:
|
spec:
|
||||||
providers:
|
providers:
|
||||||
- name: metal3
|
- name: metal3
|
||||||
|
Loading…
Reference in New Issue
Block a user