Bug 1194532

Summary: [RFE][sahara]: [EDP] Add a new job-types endpoint
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: openstack-saharaAssignee: Elise Gafford <egafford>
Status: CLOSED ERRATA QA Contact: Luigi Toscano <ltoscano>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: kbasil, lbopf, markmc, matt, mimccune, yeylon
Target Milestone: gaKeywords: FutureFeature
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/sahara/+spec/edp-job-types-endpoint
Whiteboard: upstream_milestone_kilo-rc1 upstream_definition_approved upstream_status_implemented
Fixed In Version: openstack-sahara-2015.1.0-2.el7ost Doc Type: Enhancement
Doc Text:
A new endpoint has been added to Sahara that allows queries of the available job types per plug-in and version that the Sahara installation supports. This information is useful both for UI presentation and filtering, and for CLI and REST API users.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-05 13:21:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description RHOS Integration 2015-02-20 05:00:56 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/sahara/+spec/edp-job-types-endpoint.

Description:

The current /jobs/config-hints/<job_type> endpoint is not adequate for providing configuration hints for job types because it does not take a cluster or plugin argument. This has been a problem for a long time, since the config hints need to be specific to a particular plugin type and even the version (often synonymous with the hadoop version). Additionally, there is not a way currently for a user to query a Sahara instance to find out what kinds of jobs its supports.

To solve both of these issues, we can add a new job-types endpoint that will report the following information to the user:

All of the job types that can be run on that Sahara instance
   For each job type, the plugins that support it
     For each plugin, the versions of that plugin that support it with (optionally) configuration hints for that version

With this endpoint, a user can know exactly which types of jobs can be run and what the choices are for a cluster deployment to run those jobs (what image is needed, what templates do I need to use or create, etc)

Proposed JSON output from the endpoint would look something like this (for a cluster with only the hdp plugin enabled and without config hints)

{
    "job_types": {
        "Hive": [
            {
                "description": "The Hortonworks Sahara plugin automates the deployment of the Hortonworks Data Platform (HDP) on OpenStack.", 
                "name": "hdp", 
                "title": "Hortonworks Data Platform", 
                "versions": {
                    "1.3.2": {}, 
                    "2.0.6": {}
                }
            }
        ], 
        "Java": [
            {
                "description": "The Hortonworks Sahara plugin automates the deployment of the Hortonworks Data Platform (HDP) on OpenStack.", 
                "name": "hdp", 
                "title": "Hortonworks Data Platform", 
                "versions": {
                    "1.3.2": {}, 
                    "2.0.6": {}
                }
            }
        ], 
        ... and more job types here ...
    }
}

Specification URL (additional information):

None

Comment 3 Luigi Toscano 2015-06-15 17:56:10 UTC
The list of job types (by plugin) is now exposed through the API and can be reached using the official client. All the job types (Hive, Java, MapReduce, MapReduce.Streaming, Pig, Shell) are available for both enabled plugins/versions (HDP 2.0.6, CDH 5.3.0).

Verified on:
python-saharaclient-0.9.0-1.el7ost.noarch
openstack-sahara-engine-2015.1.0-2.el7ost.noarch
openstack-sahara-api-2015.1.0-2.el7ost.noarch
openstack-sahara-common-2015.1.0-2.el7ost.noarch

Comment 5 errata-xmlrpc 2015-08-05 13:21:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548