← Back to team overview

savanna-all team mailing list archive

Re: Clarification of REST invocation (exec_resource_action())

 

Hi Jon,

Thanks for the writeup on the flow. My concern still is around having a
concise api. This opens up the rabbit hole to include any and all calls as
a proxy.

Do you see this being used by admins of the provider or by the users. If
it's admin only this might be something that fits into an admin api or at
the least be an extension rather than as a core api.

On Wed, May 8, 2013 at 3:46 PM, Jon Maron <jmaron@xxxxxxxxxxxxxxx> wrote:

> In an effort to make clear exactly what the intent is, here is the flow as
> we see it:
>
>
>    - Controller exposes /hadoop endpoint at startup (or some other root
>    context)
>    - This allows clients to invoke provider specific REST API
>       - Rest of URI after /hadoop/ is provider specific (i.e. it is
>       interpreted by the plugin)
>       - Controller receives REST request
>    - GET /hadoop/v1/clusters/c1
>       - Controller calls provider.exec_resource_action(request)
>    - request contains original URI, method, body, etc.
>       - Request body is provider specific
>       - Response is provider specific
>       - Provider performs any necessary action to process the request
>       - In the case of the HDP provider this includes
>       - resolve host:port of Ambari server which should handle the
>          request (for example, based on the cluster name in the URI)
>          - each Ambari server manages a single cluster
>             - get security credentials for management server (perhaps
>          from Savanna credential store facility)
>          - currently Ambari uses standard web auth
>             - add credentials to request
>             - invoke the provider api on the appropriate Ambari server
>          - modify URI in request to provider specific URI
>             - /api/v1/clusters/c1
>                - invoke request via HTTP client
>             - The provider may choose to decompose the request into
>          multiple requests and aggregate the results into a single response
>          - Because each Ambari server manages only a single cluster, the
>             HDP provider may want to handle some requests by aggregating requests
>             across multiple calls to different Ambari servers
>
>
>
> --
> Mailing list: https://launchpad.net/~savanna-all
> Post to     : savanna-all@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~savanna-all
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References