Power Provisioning on Cray using CAPMC APIs.

Links:


Overview:

  • Cray developed new CLI for Shasta systems which will not work on old XC systems. But REST APIs are almost identical between Shasta and XC so Cray suggests using CAPMC API for power management features.


Glossary:

  • CAPMC HTTP Interface – The POST requests with JSON objects to the API server will return JSON output.


Technical Details:

  • PBS_Power Hook will run on Server and MoM nodes and they will POST requests to the CAPMC API server.
  • Hook needs to know if we're running on Shasta or XC.
  • Hook will get API server URL information by parsing file /etc/opt/cray/capmc/capmc.json.
  • Example data from /etc/opt/cray/capmc/capmc.json where os_service_url is defined.

          {

          "os_key": "/etc/opt/cray/capmc/capmc-client.key",

          "os_cert": "/etc/opt/cray/capmc/capmc-client.pem",

          "os_cacert": "/etc/opt/cray/capmc/capmc-cacert.pem",

          "os_service_url": "https://smw.example.com:8443"

          }


Exisiting Power management feature designs:


Changes:

  • Identify if the PBS setup is on a Shasta or XC machine.
  • Existing CAPMC CLI code within PBS_Power hook to be changed to common API code to make it work with both XC and Shasta systems.
  • Read os_service_url data from /etc/opt/cray/capmc/capmc.json.
  • Add code to create HTTP POST requests.
  • Change capmc cli commands to HTTP requests.
  • Restrict ramp rate limiting availability on Shasta until Cray starts supporting the feature.