Skip to content

Refactor create plugin to be provider independent #2498

Closed

Description

@pmuens

This is a Feature Proposal

Description

While working on multi provider support I found that in the create plugin we store all the templates for all the providers we support. It would be great if we can refactor this and make the main create plugin provider independent and add the corresponding provider related templates in the lib/plugins/<provider>/create plugin.

Activity

  1. austencollins commented on Oct 21, 2016

    @austencollins
    Member

    Providers will exist outside of the core as separate installable plugins. Plugins can only be installed in Services. In the proposed approach, how would you run create, if you have nowhere to install the Provider plugin first, which contains the create command?

  2. pmuens commented on Oct 21, 2016

    @pmuens
    ContributorAuthor

    Yes, that could not be done going this way of installing provider related plugins in the service after it was created.

    But how would an external provider integration look like if the programmer is not able to touch the Serverless core codebase? Or do he need to submit a PR to get his template into the core?

    The only thing that caught my attention was the baked in nature of provider related information in the Serverless core. I would find it great if the Serverless core could be independent on it's own by just providing the core plugins like deploy, remove etc. without having any dependency on providers (and their logic).

  3. flomotlik commented on Oct 21, 2016

    @flomotlik
    Contributor

    @pmuens How is the create plugin dependent on the provider? While we have templates for AWS in there now, we could easily add templates for other providers as well correct?

    The only downside is that at the moment those templates are hardcoded so if somebody implements a provider as a plugin they can't easily add those templates to the create plugin. While an inconvenience its not too bad at the moment and if we really need to we can easily make this better by plugins being able to provide their own templates and somehow register them (but that should be something we do once we need it and I don't think we'll need it soon)

  4. pmuens commented on Oct 21, 2016

    @pmuens
    ContributorAuthor

    Yes, that's exactly what I mean.

    An addition to register templates would be great so that other providers can integrate easily and don't need to PR their templates into the core. What I would love is a bare core which can be basically shipped without any provider at all, but extended through the plugins so that it works with the provider of choice.

  5. pmuens commented on Nov 4, 2016

    @pmuens
    ContributorAuthor

    Just wanted to get get the discussion going as we're facing this exact problem with the current Google Cloud Functions implementation (see #2568).

    We could add the template to the core of Serverless. However the Google Cloud Functions support should be provided as a separate set of plugins.

    IMHO the template should be shipped in the plugin and not in the core so we should provide a way for plugin developers (and provider integrators) to hook into the create plugin so that the template for the corresponding provider can be created without putting it into the core Serverless codebase by submitting a PR.

    /cc @ac360 @flomotlik @eahefnawy

  6. pmuens commented on Jan 15, 2019

    @pmuens
    ContributorAuthor

    Closing this since it's stale and not an issue per se.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions