Running plugins on the MOC (ppc64le OpenShift) - FNNDSC/pfcon GitHub Wiki

Running plugins on the MOC (ppc64le OpenShift)

Overview

This page documents some pfcon related commands for executing plugins on the Massachusetts Open Cloud by communicating with a pman and pfioh exposed the OpenShift cluster.

Service access

Set the access IP to the machine running pfcon. This snippet sets a variable HOST_IP on Linux hosts. This will NOT work on macOS. Also, even on Linux, please check with an echo $HOST_IP that this value is indeed sane and correct!

export HOST_IP=$(ip route | grep -v docker | awk '{if(NF==11) print $9}' | head -n 1)

Call

The routes that are currently working:

pfurl --verb POST --raw \
      --http  ${HOST_IP}:5005/api/v1/cmd \
      --httpResponseBodyParse \
      --jsonwrapper 'payload' \
      --msg \
    '{  "action": "internalctl",
        "meta": {
                    "var":     "/service/moc-ppc64le",
                    "set":     {
                        "compute": {
                            "addr": "pman2-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/",
                            "baseURLpath": "api/v1/cmd/",
                            "status": "undefined",
                            "authToken": "password"
                        },
                        "data": {
                            "addr": "pfioh-ppc64le-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/pfioh/",
                            "baseURLpath": "api/v1/cmd/",
                            "status": "undefined",
                            "authToken": "password"
                        }
                    }
                }
    }'

The route currently not working:

pfurl --verb POST --raw \
      --http  ${HOST_IP}:5005/api/v1/cmd \
      --httpResponseBodyParse \
      --jsonwrapper 'payload' \
      --msg \
    '{  "action": "internalctl",
        "meta": {
                    "var":     "/service/moc-ppc64le",
                    "set":     {
                        "compute": {
                            "addr": "pman-ppc64le-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/pman/",
                            "baseURLpath": "api/v1/cmd/",
                            "status": "undefined",
                            "authToken": "password"
                        },
                        "data": {
                            "addr": "pfioh-ppc64le-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/pfioh/",
                            "baseURLpath": "api/v1/cmd/",
                            "status": "undefined",
                            "authToken": "password"
                        }
                    }
                }
    }'

Set an optional proxy if in a proxied network:

pfurl --verb POST --raw \
      --http ${HOST_IP}:5005/api/v1/cmd \
      --httpResponseBodyParse \
      --jsonwrapper 'payload' \
      --msg \
'{  "action": "internalctl",
    "meta": {
                "var":     "/self",
                "set":     {
                     "httpProxy": {
                        "httpSpec": "http://proxy.tch.harvard.edu:3128",
                        "use":  true
                    }
                }
            }
}'

Test with a hello

pfurl --verb POST --raw --http ${HOST_IP}:5005/api/v1/cmd   \
        --httpResponseBodyParse --jsonwrapper 'payload' --msg \
'{  "action": "hello",
    "meta": {
                "askAbout":     "sysinfo",
                "echoBack":      "Hi there!",
                "service":       "moc-ppc64le"
            }
}'

Saying hello to pman on the MOC Power9 Cluster:

Two possible routes you can use to say hello to pman:

pfurl --verb POST --raw \
      --http pman2-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/api/v1/cmd \
      --jsonwrapper 'payload' --msg \
         '{  "action": "hello",
                 "meta": {
                         "askAbout":     "sysinfo",
                         "echoBack":     "Hi there!"
                 }
         }' --quiet --authToken 'password'
pfurl --verb POST --raw \
      --http pman-ppc64le-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/pman/api/v1/cmd \
      --jsonwrapper 'payload' --msg \
         '{  "action": "hello",
                 "meta": {
                         "askAbout":     "sysinfo",
                         "echoBack":     "Hi there!"
                 }
         }' --quiet --authToken 'password'

Saying hello to pfioh on the MOC Power9 Cluster:

pfurl --verb POST --raw \
      --http pfioh-ppc64le-benchmarking-chris-on-the-moc.p9-apps.osh.massopen.cloud/pfioh/api/v1/cmd \
      --jsonwrapper 'payload' --msg \
         '{  "action": "hello",
                 "meta": {
                         "askAbout":     "sysinfo",
                         "echoBack":     "Hi there!"
                 }
         }' --quiet --authToken 'password'

-30-