Skip to content

Serverless v1.0 Provider "Templates" #1452

Closed

Description

@jthomas

Further to my conversation with @ac360 I'm opening this issue to provide feedback about the Provider API. I've been reviewing the API and AWS & Auzre implementations to help understand how to deliver the OpenWhisk provider plugins.

Provider Templates

This template file is used to scaffold the Node.js handler for new services. The template matches Lambda's handler interface. Both Azure and OpenWhisk use different handler signatures.

Is there a way for the providers to provide their own templates?

Activity

  1. added this to the milestone on Jun 30, 2016
  2. pmuens commented on Jun 30, 2016

    @pmuens
    Contributor

    Hey @jthomas!
    Thank you for the feedback and jumping in on the OpenWhisk implementation!

    Right now we simply copy the handler file (see https://github.com/serverless/serverless/blob/v1.0/lib/plugins/create/create.js#L77-L80).
    The create plugin only supports the create:create lifecycle. https://github.com/serverless/serverless/tree/v1.0/lib/plugins/create#provided-lifecycle-events

    We should definitely move the handler creation process into a provider specific create plugin (so that each provider can copy it's own files) and keep the main create plugin Serverless related (it should only create the serverless files).

    We should furthermore extend the create lifecycles (e.g. a create:createServiceDir or something similar) so that plugin authors can hook into them easily (like we've done with the deploy plugin).

    P.S. we're about to provide an option to make plugins provider specific (#1429). This way the plugins will only run when the services provider matches.

    What do you think @eahefnawy ? Do we have a way that providers can provide their own templates?

  3. eahefnawy commented on Jun 30, 2016

    @eahefnawy
    Contributor

    @jthomas yep we will just update the create plugin to choose a certain handler.js template file based on the passed provider as an option just like @pmuens described. Will merge that tomorrow!

    Happy to have you here James 😊

  4. jthomas commented on Jul 1, 2016

    @jthomas
    ContributorAuthor

    FYI I'm working on the OpenWhisk implementation here:
    https://github.com/jthomas/serverless/tree/v1.0-openwhisk
    Hoping to have basic deploy working next week.

    I'll also be at the Serverless meetup in London on Monday if anyone wants to say hello!

  5. pmuens commented on Jul 4, 2016

    @pmuens
    Contributor

    Hey @jthomas
    Great! Really looking forward to OpenWhisk support! I'll attend the meetup as well.

    See you there!

  6. pmuens commented on Jul 12, 2016

    @pmuens
    Contributor

    Is discussed in detail in #1470

    and should be available soon. Will close this one here. Thanks for the proposal @jthomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions