mirror of
https://github.com/rancher/os.git
synced 2025-09-19 09:22:40 +00:00
Add isolinux cfg files to installer, and add ros to base installer for now
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
@@ -1,14 +1,22 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
# TODO: redo as cross platform, and without git etc :)
|
# TODO: redo as cross platform, and without git etc :)
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
ARG KERNEL_VERSION
|
||||||
|
ENV VERSION=${VERSION}
|
||||||
|
ENV KERNEL_VERSION=${KERNEL_VERSION}
|
||||||
|
|
||||||
# not installed atm udev, grub2, kexe-toos
|
# not installed atm udev, grub2, kexe-toos
|
||||||
# parted: partprobe, e2fsprogs: mkfs.ext4, syslinux: extlinux&syslinux
|
# parted: partprobe, e2fsprogs: mkfs.ext4, syslinux: extlinux&syslinux
|
||||||
RUN apk --no-cache add syslinux parted e2fsprogs
|
RUN apk --no-cache add syslinux parted e2fsprogs
|
||||||
|
|
||||||
COPY conf /scripts/
|
COPY conf /scripts/
|
||||||
#COPY ./build/vmlinuz-${KERNEL_VERSION} ./build/initrd ./build/ros /dist/
|
COPY ./build/ros /bin/
|
||||||
RUN ln -s /bootiso/boot/ /dist \
|
#OR softlink in the host one - this image should only be used when installing from ISO..
|
||||||
&& ln -s /host/usr/bin/ros /scripts/
|
# (except its useful for testing)
|
||||||
|
# && ln -s /host/usr/bin/ros /bin/
|
||||||
|
|
||||||
ENTRYPOINT ["/scripts/ros"]
|
RUN ln -s /bootiso/boot/ /dist
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/ros"]
|
||||||
|
|
||||||
|
@@ -1,12 +1,11 @@
|
|||||||
FROM rancher/os-installer
|
FROM rancher/os-installer
|
||||||
|
|
||||||
ARG VERSION
|
# TODO: separate out the elements below - so we can mix and match updates
|
||||||
ARG KERNEL_VERSION
|
|
||||||
ENV VERSION=${VERSION}
|
|
||||||
ENV KERNEL_VERSION=${KERNEL_VERSION}
|
|
||||||
|
|
||||||
# TODO: separate out the 3 elements below - so we can mix and match updates
|
|
||||||
RUN rm /dist/ \
|
RUN rm /dist/ \
|
||||||
&& mkdir -p /dist/
|
&& mkdir -p /dist/
|
||||||
COPY ./build/vmlinuz-${KERNEL_VERSION} ./build/initrd ./build/ros /dist/
|
|
||||||
|
# Run docker build in the `./build/` dir
|
||||||
|
#COPY ./ros /bin/
|
||||||
|
#needs to be a recursive copy
|
||||||
|
COPY ./ /dist/
|
||||||
|
|
||||||
|
@@ -12,16 +12,27 @@ if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz-${KERNEL_VERSION} ] ||
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO maybe extract the cration of the syslinux cfg files
|
||||||
|
mkdir -p ${DIST}/boot/isolinux/
|
||||||
|
cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg
|
||||||
|
cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg
|
||||||
|
#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg
|
||||||
|
cat scripts/global.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg
|
||||||
|
|
||||||
|
|
||||||
mkdir -p ./scripts/installer/build
|
mkdir -p ./scripts/installer/build
|
||||||
cp ./dist/artifacts/initrd ./scripts/installer/build
|
cp ./dist/artifacts/initrd ./scripts/installer/build
|
||||||
cp ./dist/artifacts/vmlinuz-${KERNEL_VERSION} ./scripts/installer/build
|
cp ./dist/artifacts/vmlinuz-${KERNEL_VERSION} ./scripts/installer/build
|
||||||
cp ./bin/ros ./scripts/installer/build
|
cp ./bin/ros ./scripts/installer/build
|
||||||
|
cp -r ${DIST}/boot/* ./scripts/installer/build/
|
||||||
trap "rm -rf ./scripts/installer/build" EXIT
|
trap "rm -rf ./scripts/installer/build" EXIT
|
||||||
|
|
||||||
# installer base image - can be included in iso
|
# installer base image - can be included in iso
|
||||||
# TODO: fix the fullinstaller Dockerfile to use the ${VERSION}${SUFFIX}
|
# TODO: fix the fullinstaller Dockerfile to use the ${VERSION}${SUFFIX}
|
||||||
docker build \
|
docker build \
|
||||||
-t ${OS_REPO}/os-installer \
|
-t ${OS_REPO}/os-installer \
|
||||||
|
--build-arg VERSION=${VERSION} \
|
||||||
|
--build-arg KERNEL_VERSION=${KERNEL_VERSION} \
|
||||||
-f $BASEDOCKERFILE \
|
-f $BASEDOCKERFILE \
|
||||||
./scripts/installer
|
./scripts/installer
|
||||||
docker save -o dist/artifacts/installer.tar ${OS_REPO}/os-installer
|
docker save -o dist/artifacts/installer.tar ${OS_REPO}/os-installer
|
||||||
@@ -29,8 +40,6 @@ docker save -o dist/artifacts/installer.tar ${OS_REPO}/os-installer
|
|||||||
# Full installer image with initrd - used for pulling from network
|
# Full installer image with initrd - used for pulling from network
|
||||||
docker build \
|
docker build \
|
||||||
-t ${OS_REPO}/os:${VERSION}${SUFFIX} \
|
-t ${OS_REPO}/os:${VERSION}${SUFFIX} \
|
||||||
--build-arg VERSION=${VERSION} \
|
|
||||||
--build-arg KERNEL_VERSION=${KERNEL_VERSION} \
|
|
||||||
-f $DOCKERFILE \
|
-f $DOCKERFILE \
|
||||||
./scripts/installer
|
./scripts/installer
|
||||||
|
|
||||||
|
@@ -22,14 +22,11 @@ cp ${ARTIFACTS}/initrd ${CD}/boot
|
|||||||
# TODO: these move to os-kernel
|
# TODO: these move to os-kernel
|
||||||
pwd
|
pwd
|
||||||
ls dist/artifacts/vmlinuz-${KERNEL_VERSION}
|
ls dist/artifacts/vmlinuz-${KERNEL_VERSION}
|
||||||
|
|
||||||
cp ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ${CD}/boot/
|
cp ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ${CD}/boot/
|
||||||
#TODO cp ${ARTIFACTS}/linuxmods-${KERNEL_VERSION} ${CD}/boot/
|
#TODO cp ${ARTIFACTS}/linuxmods-${KERNEL_VERSION} ${CD}/boot/
|
||||||
|
|
||||||
cat scripts/isolinux.cfg | envsubst > ${CD}/boot/isolinux/isolinux.cfg
|
# cfg files creation moved to package-installer
|
||||||
cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${CD}/boot/linux-current.cfg
|
cp -r ${DIST}/boot/* ${CD}/boot/
|
||||||
#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${CD}/boot/linux-previous.cfg
|
|
||||||
cat scripts/global.cfg | LABEL=${VERSION} envsubst > ${CD}/boot/global.cfg
|
|
||||||
|
|
||||||
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
|
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
|
||||||
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
|
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
|
||||||
|
Reference in New Issue
Block a user