rest-rdma Plugin

NVIDIA UFM-SDN Appliance User Manual v4.11.0

rest-rdma is a utility to send REST requests over IB to the UFM server. Rest requests can be one of the following three types:

  • UFM REST API requests

  • ibdiagnet requests

  • Telemetry requests

rest-rdma is distributed as a docker container that could serve as server and as client.

Deploy Plugin on UFM Appliance

  1. Log into your UFM as admin.

  2. Enter config mode. Run:

    Copy
    Copied!
                

    enable config terminal

    Warning

    Make sure that UFM is running with show ufm status. If UFM is down then run with ufm start.

  3. Ensure that rest-rdma plugin is disabled with show ufm plugin command

  4. Pull the plugin container with docker pull mellanox/ufm-plugin-rest-rdma:[version]

  5. Run ufm plugin rest-rdma add tag [version] to enable the plugin

  6. Check that plugin is up and running with show ufm plugin

Deployment Client

To pull image from docker hub:

Copy
Copied!
            

docker pull mellanox/ufm-plugin-rest-rdma:[version]

To start container as client (on any host in the same fabric as UFM server) run:

Copy
Copied!
            

docker run -d --network=host --privileged --name=ufm-plugin-rest-rdma --rm -v /tmp/ibdiagnet:/tmp/ibdiagnet mellanox/ufm-plugin-rest-rdma:[version] client

To check that plugin is up and running run:

Copy
Copied!
            

docker ps


Server

In server mode ufm_rdma.py will started automatically and will be restarted if exit. If ufm_rdma.py server is not running – enter to the docker and run the following commands to start the server:

Copy
Copied!
            

cd /opt/ufm/src/ufm-plugin-ufm-rest ./ufm_rdma.py -r server


Client

There are three options to run client:

Warning

From inside the docker, using custom script from the hosting server or using docker exec command from hosting server.

  1. From inside the docker:

    1. Enter to the docker using docker exec -it ufm-plugin-rest-rdma bash

    2. then cd /opt/ufm/src/ufm-plugin-rest-rdma

    3. Use -h help option to see available parameters
      ./ufm_rdma.py -h

  2. From hosting server run script located at /opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh inside docker

    Warning

    that could be copied using command
    cp <containerId>:/opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh /host/path/target

    Warning

    Example:
    ./ufm-rest-rdma_client.sh -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

    1. To see available options run:
      ./ufm-rest-rdma_client.sh -h

  3. From hosting server using docker exec command.

    Warning

    To run from inside docker, run:

    docker exec ufm-plugin-rest-rdma prior to the command.

    For example: docker exec ufm-plugin-rest-rdma /opt/ufm/ufm-plugin-ufm-rest/src/ufm_rdma.py -r client -u admin -p password -t simple -a GET -w ufmRest/app/ufm_version

Telemetry request authentication option could be enabled or disabled (enabled by default – set to True) in ufm_rdma.ini file in [Server] section on the server. It means that the rest_rdma server will perform simple request to UFM server, using supplied credentials to verify that the user is allowed to run telemetry requests.

Copy
Copied!
            

[Server] telemetry_authentication=True

Remote ibdiagnet Request

The remote_ibdiagnet.sh script does not require authentication as the server side can run on a machine which does not run UFM (which is responsible for the authentication) so just to run from hosting server.

Copy
Copied!
            

/remote_ibdiagnet.sh [options]

rest Request with Username/Password Authentication

To get UFM version from inside the docker:

Copy
Copied!
            

./ufm_rdma.py -r client -u admin -p admin_pwd -t simple -a GET -w ufmRest/app/ufm_version

To get UFM version from hosting server using script:

Copy
Copied!
            

./ufm_rest_rdma_client.sh -u admin -p admin_pwd -t simple -a GET -w ufmRest/app/ufm_version

For telemetry:

Copy
Copied!
            

./ufm_rdma.py -r client -u admin -p admin_pwd -t telemetry -a GET -g 9001 -w /csv/enterprise

To get ibdiagnet run result using UFM REST API from inside the docker:

Copy
Copied!
            

./ufm_rdma.py -r client -u admin -p admin_pwd -t ibdiagnet -a POST -w ufmRest/reports/ibdiagnetPeriodic -l '{"general": {"name": "IBDiagnet_CMD_1234567890_199_88", "location": "local", "running_mode": "once"}, "command_flags": {"--pc": ""}}'

rest Request with Client Certificate Authentication

Copy
Copied!
            

need to pass path to client certificate file and name of UFM server machine: 6. ./ufm_rdma.py -r client -t simple -a GET -w ufmRest/resources/modules -d /path/to/certificate/file/ufm-client.pfx -s ufm.azurehpc.core.azure-test.net for telemetry if need authentication from inside the docker ./ufm_rdma.py -r client -t telemetry -a GET -g 9001 -w csv/enterprise -d /path/to/certificate/file/ufm-client.pfx -s ufm.azurehpc.core.azure-test.net

Warning

Client certificate file should be located INSIDE docker container.


rest Request with Token Authentication

Copy
Copied!
            

need to pass token for authentication ./ufm_rdma.py -r client -k OGUY7TwLvTmFkXyTkcsEWD9KKNvq6f -t simple -a GET -w ufmRestV3/app/ufm_version for telemetry if need to perform authentication ./ufm_rdma.py -r client -k 4rQRf7i7wEeliuJEurGbeecc210V6G -t telemetry -a GET -g 9001 -w /csv/enterprise

Warning

Token could be generated using UFM UI.

Warning

If a token is used for client authentication, ufmRestV3 must be used.


© Copyright 2023, NVIDIA. Last updated on Sep 5, 2023.