rest-rdma Plugin
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
Log into your UFM as admin.
Enter config mode. Run:
enable config terminal
WarningMake sure that UFM is running with show ufm status. If UFM is down then run with ufm start.
Ensure that rest-rdma plugin is disabled with show ufm plugin command
Pull the plugin container with docker pull mellanox/ufm-plugin-rest-rdma:[version]
Run ufm plugin rest-rdma add tag [version] to enable the plugin
Check that plugin is up and running with docker pull mellanox/ufm-plugin-rest-rdma:[version]
Deploy Plugin on Bare Metal Server
Verify that UFM is installed and running
Pull image from docker hub:
docker pull mellanox/ufm-plugin-rest-rdma:[version]To load image run:
/opt/ufm/scripts/manage_ufm_plugins.py add -p rest-rdma
Deployment Client
To pull image from docker hub:
docker pull mellanox/ufm-plugin-rest-rdma:[version]
To start container as client (on any host in the same fabric as UFM server) run:
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:
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:
cd /opt/ufm/src/ufm-plugin-ufm-rest
./ufm_rdma.py -r server
Client
There are three options to run client:
From inside the docker, using custom script from the hosting server or using docker exec command from hosting server.
From inside the docker:
Enter to the docker using docker exec -it ufm-plugin-rest-rdma bash
then cd /opt/ufm/src/ufm-plugin-rest-rdma
Use -h help option to see available parameters
./ufm_rdma.py -h
From hosting server run script located at /opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh inside docker
Warningthat could be copied using command
cp <containerId>:/opt/ufm/ufm-plugin-ufm-rest/ufm-rest-rdma_client.sh /host/path/targetWarningExample:
./ufm-rest-rdma_client.sh -u admin -p password -t simple -a GET -w ufmRest/app/ufm_versionTo see available options run:
./ufm-rest-rdma_client.sh -h
From hosting server using docker exec command.
WarningTo 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.
[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.
/remote_ibdiagnet.sh [options]
rest Request with Username/Password Authentication
To get UFM version from inside the docker:
./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:
./ufm_rest_rdma_client.sh -u admin -p admin_pwd -t simple -a GET -w ufmRest/app/ufm_version
For telemetry:
./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:
./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
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
Client certificate file should be located INSIDE docker container.
rest Request with Token Authentication
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
Token could be generated using UFM UI.
If a token is used for client authentication, ufmRestV3 must be used.