unity-sds / unity-analytics-bcdp

OGC compliant BCDP Deployment using CWL/Papermill
Apache License 2.0
0 stars 2 forks source link

Test deployment and execution on laptop of BCDP application package on an existing ADES. #26

Open jjacob7734 opened 2 years ago

jjacob7734 commented 2 years ago

To test the deployment and execution of your BCDP application package on a Mac laptop, you should be able to:

  1. Run Docker Desktop with Kubernetes enabled (launches a 1-node Kubernetes cluster on your laptop that can be managed with kubectl).
  2. Install the existing ADES/WPS-T Flask app on your laptop
    • git clone https://github.jpl.nasa.gov/SOAMC/flask_ades_wpst.git
    • cd flask_ades_wpst
    • mkdir sqlite
    • Create an Anaconda or other virtual environment for your ADES and activate it.
    • python setup.py install
  3. Deploy ADES/K8S on laptop
    • export ADES_PLATFORM="K8s"
    • python -m flask_ades_wpst.flask_wpst
  4. The endpoints we are interested in are getLandingPage, getProcesses, deployProcess, getProcessDescription, undeployProcess, getJobList, getJobStatus, dismissJob, getJobResult as in Table 1 of http://docs.opengeospatial.org/per/18-050r1.html#_wps_t_restjson. Demonstrate WPS-T endpoints with curl or wget
    • Landing page: curl -X POST http://127.0.0.1:5000/
    • Get process list: curl http://127.0.0.1:5000/processes
    • Deploy process: curl -X POST http://127.0.0.1:5000/processes?proc=<raw-url-to-your-app_desc.json>
    • Undeploy process: `curl -X DELETE http://127.0.0.1:5000/processes/
    • Execute job: curl -H "Content-Type: application/json" -X POST -d '{"<your-key1>": "<your-val1>", "<your-key2>": "<your-val2>", ... }' http://127.0.0.1:5000/processes/hello-world-1.0.0/jobs
    • Get job list: curl http://127.0.0.1:5000/processes/<your-proc-id>/jobs
    • Get job status: curl http://127.0.0.1:5000/processes/<your-proc-id>/jobs/<your-job-id>
    • Dismiss job: curl -X DELETE http://127.0.0.1:5000/processes/<your-proc-id>/jobs/<your-job-id>
    • Get job result (when implemented): curl http://127.0.0.1:5000/processes/<your-proc-id>/jobs/<your-job-id>/result