Conductor Documentation

WRCP Plugin Prestage

Overview

The prestage feature streamlines WRCP subcloud deployment by generating a pre-staged ISO that includes all the required images, removing the requirement to download these images during the deployment.

WRCP Plugins Prestage Overview

To achieve this, a WRCP system controller is provided with an RVMC pod in running state. When the prestage workflow is initiated, the details of the WRCP system controller are passed from the conductor for the workflow to be executed. Via ssh, Conductor accesses the WRCP system controller and edits the rvmc YAML file contained in the RVMC. The YAML file is updated with the parameters and path to the prestage ISO (which is in CFS). After the update is complete, a python script is executed to initiate the prestaging. The response from the script is captured and shown in the conductor.

Prerequisites

  1. Conductor-wrcp-plugin installed on Conductor.
  2. A WRCP system controller with RVMC pod running inside it. The details should be given when the prestage workflow is initiated.
  3. Generate Prestage ISO file and copy to CFS. The path should be provided in the CIQ files.
  4. Update CIQ files with path of prestage iso file and bmc server details (in the ndc file, add as a new field “prestage_iso”).

Generate Prestage ISO file manually - Using multiple script

  1. Execute all the steps as ROOT user.
  2. Download images from http://delivers.windriver.com/
    • Base ISO file (e.g.: WRCP 22.12 MR2(Patch 4) ISO)
    • Container image list (e.g.: wind-river-cloud-platform-container-images-list-wr-aws-22.12_PATCH_0004.txt)
    • gen-image-archive.sh
    • gen-prestaged-iso.sh
    • stx-iso-utils.sh
  3. Update permission for all the scripts to 755.
  4. Download and tar the container images
    1. Docker login to windriver registry https://registry.delivers.windriver.com docker login
    2. Modify script gen-image-archive.sh
      1. Replace 625619392498.dkr.ecr.us-west-2.amazonaws.com with appropriate prefix in script: gen-image-archive.sh
      2. WRS_REGISTRY_PREFIX=‘registry.delivers.windriver.com/wrcp-cd’
    3. Execute gen-image-archive.sh
      1. ./gen-image-archive.sh wind-river-cloud-platform-container-images-list-wr-harbor-22.12_PATCH_0004.txt
    4. This will create multiple tar files. tar file creation
    5. The tar files are created and will be in multiple files as there is a restriction of 4GB per file. tar file restriction
    6. Troublshooting
      1. Check if the user has permission to do a docker pull.
      2. Check if these are executed as root user.
      3. Check script file permissions.
  5. (Optional) Create an images folder and move these tar files into it.
    1. Generate the md5sum for all tar.gz files and save it to a file.
      1. md5sum container-image1.tar.gz container-image2.tar.gz > container-image.tar.gz.md5 tar file restriction
  6. Generate prestage ISO
    1. For executing this as a root user a couple of packages must be installed.
      1. sudo apt-get install coreutils cpio debianutils findutils gawk genisoimage grep initscripts isomd5sum libguestfs-tools mount rpm2cpio rsync sed syslinux tar udisks2
      2. Refer this link for the packages: Packages required.
      3. If you have issues installing some packages, installed the following separately:
        • syslinux-utils
        • libguestfs-tools
        • Isomd5sum
    2. Inputs for the scripts:
      • input – base iso image
      • images – the container images zip files. There can be multiple files, add all of them. These are the files created via the gen-image-archive.sh script.
      • output – the output file path
      • param boot_device and rootfs_device – These should be based on the disk details of the target machine.
    3. ./gen-prestaged-iso.sh \
      --input wind-river-cloud-platform-host-installer-22.12-b160-PATCH_0004.iso \
      --images images/container-image1.tar.gz \
      --images images/container-image2.tar.gz \
      --output prestage-2212mr2.iso \
      --param boot_device=/dev/disk/by-path/pci-0000:44:00.0-nvme-1 \
      --param rootfs_device=/dev/disk/by-path/pci-0000:44:00.0-nvme-1

iso.sh 4. Executing the above step will generate a prestage iso file in the path mentioned in output. output 5. Troubleshooting:
1. If the image md5sum is not created, update the command with the correct images path.
2. Make sure the path of base iso and images are correct with respect to the script
3. If any error comes up when running the generate prestage iso script, check if all the necessary packages are installed. These are system wide packages. Refer to Packages required.

Generate Prestage ISO file manually - Using single script

Prerequisites:

Steps:

  1. Execute the build-image-and-prestage-iso.sh with the required inputs:

    • Usage:
      build-image-and-prestage-iso.sh
      --input <input bootimage.iso>
      --output <output bootimage.iso>
      --image-list <image list image_list.txt>
      [ --patch <patch-name.patch> ]
      [ --kickstart-patch <kickstart-enabler.patch> ]
      [ --addon <ks-addon.cfg> ]
      [ --param <param>=<value> ]
      [ --default-boot <default menu option> ]
      [ --timeout <menu timeout> ]
    
      --input <file>: Specify input ISO file
    
      --output <file>: Specify output ISO file
    
      --image-list <image_list.txt>:
      Eg: wind-river-cloud-platform-container-images-list.txt
      The txt file containing the list of images.
    
      --patch <patch-name.patch>:
      Specify WRCP software patch file(s).
      Can be specified more than once,
       or provide a comma separated list.
    
      --kickstart-patch <kickstart-enabler.patch>:
      A patch to replace the prestaged installer kickstart.
      Not to be included in the runtime patches.
    
      --addon <file>: Specify ks-addon.cfg file.
    
      --param <p=v>: Specify boot parameter(s).
      Can be specified more than once, or provide a comma separated list.
      Examples:
      --param rootfs_device=nvme0n1,boot_device=nvme0n1
      --param rootfs_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
      --param boot_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    
      --default-boot <default menu option>:
      Specify default boot menu option:
      0 - Serial Console
      1 - Graphical Console (default)
    
      --timeout <menu timeout>:
      Specify boot menu timeout, in seconds. (default 30)
      A value of -1 will wait forever.
    
     --force-install:
     Force install the prestaged content even if 
     there is already an installation on the target.
    
    
    • Example:
    sudo ./build-image-and-prestage-iso.sh \
    --input wind-river-cloud-platform-host-installer-22.12-b160-PATCH_0004.iso \
    --image-list test_list1.txt --output prestage-test1.iso \
    --param boot_device=/dev/disk/by-path/pci-0000:44:00.0-nvme-1 \
    --param rootfs_device=/dev/disk/by-path/pci-0000:44:00.0-nvme-1 \
    --setup my-setup.ks \
    --addon my-addon.ks \
    --patch my-patch1.patch \
    --kickstart-patch my-kickstart-patch.patch \
    --default-boot 1 \
    --timeout 60 \
    --force-install

Procedure Steps

  1. Initiate the newly added workflow. Prestage Install

  2. While executing this workflow:

    1. Fetch the following parameters related to WRCP system controller as input for the workflow:
      1. system_controller_host
      2. system_controller_username
      3. system_controller_password
      4. system_controller_ssh_port (default 22) Prestage Parameters

    Note:

    1. The actual installation is ongoing in this case and is not completed. For checking that will have to manually checked the target machine to see if the installation is completed.
    2. Based on the prestage ISO used, the configuration can differ.