This page documents an automated tool which takes a set of Non-Compute Node (NCN)
kernel, initrd
, and SquashFS artifact files, uploads them into the Simple Storage Service (S3), and registers them as an image in the
Image Management Service (IMS).
For the more general (and more manual) procedure for how to register images in IMS, see Import an External Image to IMS. In addition to providing a more detailed explanation of the various subtasks being carried out, that procedure also covers such variations as:
Converting to SquashFS from other formats
Importing images that are not for NCNs
Including boot parameters as part of the image manifest file
initrd
file are required.root
user.This procedure may be run on any master or worker NCN.
Set variables for all of the image artifact files: IMS_ROOTFS_FILENAME
, IMS_INITRD_FILENAME
, and IMS_KERNEL_FILENAME
.
(ncn-mw#
) Set the IMS_ROOTFS_FILENAME
variable to the path and file name of the SquashFS image root file.
For example:
IMS_ROOTFS_FILENAME=my_ncn_artifacts/sles_15_image.squashfs
(ncn-mw#
) Set the IMS_INITRD_FILENAME
variable to the path and file name of the initrd
file.
For example:
IMS_INITRD_FILENAME=my_ncn_artifacts/initrd
(ncn-mw#
) Set the IMS_KERNEL_FILENAME
variable to the file name of the kernel file.
For example:
IMS_KERNEL_FILENAME=my_ncn_artifacts/kernel
(ncn-mw#
) Set the IMS_IMAGE_NAME
variable to a name for the new image in IMS.
This is just a label for the image in IMS – it does not need to correspond to an actual artifact or file.
For example:
IMS_IMAGE_NAME=rootfs-k8s-customized-version-2
(ncn-mw#
) Set the path to the IMS image upload script.
NCN_IMS_IMAGE_UPLOAD_SCRIPT=$(rpm -ql docs-csm | grep ncn-ims-image-upload[.]sh)
echo "${NCN_IMS_IMAGE_UPLOAD_SCRIPT}"
(ncn-mw#
) Register the new NCN image in IMS.
NEW_NCN_IMS_ID=$( "$NCN_IMS_IMAGE_UPLOAD_SCRIPT}" --no-cpc \
-i "${IMS_INITRD_FILENAME}" \
-k "${IMS_KERNEL_FILENAME}" \
-s "${IMS_ROOTFS_FILENAME}" \
-n "${IMS_IMAGE_NAME}" )
echo "${NEW_NCN_IMS_ID}"
The IMS ID (in UUID format) of the new NCN image should be shown.