CSM Only Upgrade

This page provides guidance for systems with exclusively CSM installed that are performing an upgrade from a CSM v1.5.X release to the CSM v1.5.2 release.

The v1.5.2 upgrade page will refer to this page during Update NCN images.

If other products are installed on the system, return to Update NCN images and choose option 1.

Requirements

  • CSM_RELEASE_VERSION is set in the shell environment on ncn-m001. See Preparation for details on how it should be set.

  • Set CSM_RELEASE in the shell environment to the same value as CSM_RELEASE_VERSION.

    export CSM_RELEASE="${CSM_RELEASE_VERSION}"
    echo "${CSM_RELEASE}"
    

Steps

  1. (ncn-m001#) Generate a new CFS configuration for the management nodes.

    This script creates a new CFS configuration that includes the CSM version in its name and applies it to the management nodes. This leaves the management node components in CFS disabled. They will be automatically enabled when they are rebooted at a later stage in the upgrade.

    /usr/share/doc/csm/scripts/operations/configuration/apply_csm_configuration.sh \
        --no-enable --config-name "management-${CSM_RELEASE}"
    

    Successful output should end with the following line:

    All components updated successfully.
    
  2. (ncn-m001#) Set the IMS IDs for each Management node sub-role.

    • Kubernetes ID

      KUBERNETES_IMAGE_ID="$(kubectl -n services get cm cray-product-catalog -o jsonpath='{.data.csm}' \
        | yq r -j - '"'${CSM_RELEASE}'".images' \
        | jq -r '. as $o | keys_unsorted[] | select(startswith("secure-kubernetes")) | $o[.].id')"
      echo "KUBERNETES_IMAGE_ID=$KUBERNETES_IMAGE_ID"
      
    • Storage-CEPH ID

      STORAGE_IMAGE_ID="$(kubectl -n services get cm cray-product-catalog -o jsonpath='{.data.csm}' \
        | yq r -j - '"'${CSM_RELEASE}'".images' \
        | jq -r '. as $o | keys_unsorted[] | select(startswith("secure-storage")) | $o[.].id')"
      echo "STORAGE_IMAGE_ID=$STORAGE_IMAGE_ID"
      
  3. (ncn-m001#) Create CFS sessions for both Kubernetes and Storage nodes.

    1. Set variables with unique names for the CFS sessions to be created.

      TSTAMP=$(date "+%Y%m%d%H%M%S")
      K8S_CFS_SESSION_NAME="management-k8s-${CSM_RELEASE}-${TSTAMP}"
      CEPH_CFS_SESSION_NAME="management-ceph-${CSM_RELEASE}-${TSTAMP}"
      
    2. Build customized master node images.

      cray cfs sessions create \
          --target-group Management_Master \
          "$KUBERNETES_IMAGE_ID" \
          --target-definition image \
          --target-image-map "$KUBERNETES_IMAGE_ID" "management-kubernetes-${CSM_RELEASE}" \
          --configuration-name "management-${CSM_RELEASE}" \
          --name "${K8S_CFS_SESSION_NAME}" \
          --format json
      
    3. Build customized storage node images.

      cray cfs sessions create \
          --target-group Management_Storage \
          "$STORAGE_IMAGE_ID" \
          --target-definition image \
          --target-image-map "$STORAGE_IMAGE_ID" "management-storage-${CSM_RELEASE}" \
          --configuration-name "management-${CSM_RELEASE}" \
          --name "${CEPH_CFS_SESSION_NAME}" \
          --format json
      
  4. (ncn-m001#) Wait for the image builds to complete successfully.

    This may take over 20 minutes to complete.

    watch "
    cray cfs sessions describe "${K8S_CFS_SESSION_NAME}" --format json | jq -r ".status.session.succeeded";
    cray cfs sessions describe "${CEPH_CFS_SESSION_NAME}" --format json | jq -r ".status.session.succeeded"
    "
    

    Expected results:

    true
    true
    
  5. (ncn-m001#) Set environment variables with the IMS image IDs.

    • Kubernetes image IMS ID

      NEW_KUBERNETES_IMAGE_ID="$(cray cfs sessions describe "${K8S_CFS_SESSION_NAME}" --format json | jq -r '.status.artifacts[].result_id')"
      echo "NEW_KUBERNETES_IMAGE_ID=$NEW_KUBERNETES_IMAGE_ID"
      
    • Storage image IMS ID

      NEW_STORAGE_IMAGE_ID="$(cray cfs sessions describe "${CEPH_CFS_SESSION_NAME}" --format json | jq -r '.status.artifacts[].result_id')"
      echo "NEW_STORAGE_IMAGE_ID=$NEW_STORAGE_IMAGE_ID"
      
  6. (ncn-m001#) Assign images in BSS.

    1. Update Kubernetes management nodes:

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh \
          -mw \
          -p "$NEW_KUBERNETES_IMAGE_ID"
      
    2. Update storage management nodes:

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh \
          -s \
          -p "$NEW_STORAGE_IMAGE_ID"
      
  7. Return to Update test suite packages