HMN Connections File

About this task

This guide shows the process for generating the hmn_connections.json from the system’s SHCD Excel document. This process is typically needed when generating the hmn_connections.json file for a new system, or regenerating it when system’s SHCD is changed (specifically the HMN tab). The hms-shcd-parser tool can be used to generate the hmn_connections.json file.

Each system has its own directory in the repository. If this is a new system that does not yet have the hmn_connections.json file (or needs to be regenerated), then one will need to be generated from the SHCD (Cabling Diagram) for the system.

If you need to fetch the system’s SHCD, you can use your HPE login to fetch it from SharePoint. May need to request permission to access this SharePoint folder.

Prerequisites

  • SHCD Excel file for your system
  • Podman or Docker running

Note: Docker can be used instead of Podman if the system being used to prepare this file does not have Podman available. Podman is available on the CSM LiveCD, and is installed onto a NCN running Shasta v1.3 during the procedure to create the CSM USB LiveCD.

Procedure

  1. If using Docker: Make sure that the docker service is running:

    linux# systemctl status docker
    ● docker.service - Docker Application Container Engine
    Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
    Active: inactive (dead)
        Documentation: http://docs.docker.com
    

    If the service is not running start it:

    linux# systemctl start docker
    
  2. Load the hms-shcd-parser docker image from the CSM release distribution. Only required if the CSM release distribution includes container images, otherwise this step can be skipped.

    INTERNAL USE When the version of the hms-shcd-parser image changes in the CSM release distribution the following section will need to be updated with the corrected tag

    Note: The load-container-image.sh script works with both Podman and Docker

    Load the hms-shcd-parser docker image. This script will load the image into either Podman or Docker.

    linux# ${CSM_RELEASE}/hack/load-container-image.sh dtr.dev.cray.com/cray/hms-shcd-parser:1.1.1
    
  3. Set environment to point to the system’s SHCD Excel file:

    Note: Make sure to quote the SHCD file path if there are spaces in the document’s filename.

    linux# export SHCD_FILE="/path/to/systems/SHCD.xlsx"
    
  4. Generate the hmn_connections.json file from the SHCD. This will either create or overwrite the hmn_connections.json file in the current directory:

    INTERNAL USE When the version of the hms-shcd-parser image changes in the CSM release distribution the following section will need to be updated with the corrected tag

    If using Podman:

    linux# podman run --rm -it --name hms-shcd-parser -v "$(realpath "$SHCD_FILE")":/input/shcd_file.xlsx -v "$(pwd)":/output dtr.dev.cray.com/cray/hms-shcd-parser:1.1.1
    

    If using Docker:

    linux# docker run --rm -it --name hms-shcd-parser -v "$(realpath "$SHCD_FILE")":/input/shcd_file.xlsx -v "$(pwd)":/output dtr.dev.cray.com/cray/hms-shcd-parser:1.1.1