Mozart REST-like Interface
Originally created by Hook Hua, last modified on Mar 16, 2017
Page Navigation: |
---|
Confidence Level Moderate This article includes input from several JPLers. Multiple subject matter experts can indicate that a page is more frequently reviewed and updated. |
---|
REST-like services for resource management
Here is the initial interface to Mozart v2. The method calls are categorized under these groupings:
JobSpec: job specifications
HySDS-IO: job interface wiring into actual code inside Container.
Queue: job queues for the workers to listen to.
Job: jobs running on the workers on the compute fleet.
Job Container: Docker containers that have the job execution environment. The JobSpec points to these containers.
JobSpec
Job specifications describes a job and how to execute it within a Container.
There can be multiple jobs within a Container.
The following REST methods for are job specifications. e.g. deployed at the following endpoint:
https://v2-mozart.hysds.net:8888/api/v0.1/jobspec/*
Service | Methods | Input Parameters | Output Response | Comments |
---|---|---|---|---|
Get job type specification | type |
|
|
|
Get supported job types | list | none |
|
|
Create a job specification | add |
|
|
|
Remove a job specification | remove |
|
|
|
HySDS-IO
HySDS-IO describes a job's wiring to external inputs.
There is a 1-to-1 relationship between HySDS-IO specifications and job specifications.
The following REST methods for are HySDS-IO. e.g. deployed at the following endpoint:
https://v2-mozart.hysds.net:8888/api/v0.1/jobspec/*
Service | Methods | Input Parameters | Output Response | Comments |
---|---|---|---|---|
Get hysds-io specification | type |
|
|
|
Get supported hysds-io specs | list | none |
|
|
Create a hysds-io specification | add |
|
|
|
Remove a hysds-io specification | remove |
|
|
|
Job Container
Docker containers that have the job execution environment. The JobSpec points to these containers.
The following REST methods for are work queues. e.g. deployed at the following endpoint:
https://v2-mozart.hysds.net:8888/api/v0.1/container/*
Service | Methods | Input Parameters | Output Response | Comments |
---|---|---|---|---|
Gets the list of registered containers. | list | none |
|
|
Registers a new container | add |
|
|
|
Removes a container | remove |
|
|
|
Gets more detailed information for a container | info |
|
|
|
Queue
Work queues are actually RabbitMQ-based queues defined by workers and job submission.
The following REST methods for are work queues. e.g. deployed at the following endpoint:
https://v2-mozart.hysds.net:8888/api/v0.1/queue/*
Service | Methods | Input Parameters | Output Response | Comments |
---|---|---|---|---|
Gets the allowed queues to send jobs to. | list | none |
|
|
Job
The following REST methods for are jobs. e.g. deployed at the following endpoint:
https://v2-mozart.hysds.net:8888/api/v0.1/job/*
Service | Methods | Input Parameters | Output Response | Comments |
---|---|---|---|---|
Submits a new job to RM | submit |
|
|
|
Gets the status of the job state. | status |
|
|
|
Gets the complete job information | info |
|
|
|
Gets a list of all jobs in RM | list |
|
|
|
(Pending Implementation) Stops a running job. | stop |
|
|
|
(Pending Implementation) Purges a job from the RM | purge |
|
|
|
(Pending Implementation) Adds a user tag to a job | user_tag_add |
|
|
|
(Pending Implementation) Removes a user tag from a job | user_tag_remove |
|
|
|
Deployments
A web UI is also provided via use of https://swagger.io/tools/swagger-ui/
https://<mozart-ip-address>/mozart/api/v0.1/doc/
OCG Interoperability (future item)
We aspire to OGC Web Processing Service, but it is too heavyweight for our initial use cases.
Mozart supports resource management of jobs, tasks, and workers. Currently only the job management interfaces have been exposed as a REST API. For the rest, the Faceted Search web interface to Mozart is recommended.
Related Articles: |
---|
Have Questions? Ask a HySDS Developer: |
Anyone can join our public Slack channel to learn more about HySDS. JPL employees can join #HySDS-Community
|
JPLers can also ask HySDS questions at Stack Overflow Enterprise
|
Page Information: |
---|
Was this page useful? |
Contribution History:
|
Subject Matter Expert: @Hook Hua @Gerald Manipon |
Find an Error? Is this document outdated or inaccurate? Please contact the assigned Page Maintainer: @Hook Hua |