Exporting and Importing BSS Data

Prerequisites

  • Ensure that the cray command line interface (CLI) is authenticated and configured to talk to system management services.
  • In order to use the automated procedures, the latest CSM documentation RPM must be installed on the node where the procedure is being performed.

Export BSS boot parameters

  1. (ncn-mw#) Create a JSON file with the boot parameters.

    cray bss bootparameters list --format json > cray-bss-boot-parameters-dump.json
    
  2. (ncn-mw#) Create a JSON file with the boot parameters for only the compute nodes.

    xnames=`cray hsm state components list --type Node --role Compute --format json | jq -r '.[] | map(.ID) | join(",")'`
    echo $xnames
    cray bss bootparameters list --name $xnames --format json > cray-bss-compute-boot-parameters-dump.json
    

Restore BSS boot parameters

  1. Copy the file generated by the export command to the node where the import procedure is being performed.

  2. (ncn-mw#) Set up an API token.

    export TOKEN=$(curl -k -s -S -d grant_type=client_credentials -d client_id=admin-client \
        -d client_secret=$(kubectl get secrets admin-client-auth -o jsonpath='{.data.client-secret}' | base64 -d) \
        https://api-gw-service-nmn.local/keycloak/realms/shasta/protocol/openid-connect/token | jq -r '.access_token')
    
  3. (ncn-mw#) Restore the boot parameters.

    cray-bss-compute-parameters-dump.json is the name of the file created from the export procedure.

    /usr/share/doc/csm/scripts/operations/boot_script_service/bss-restore-bootparameters.sh cray-bss-compute-parameters-dump.json