You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor create plugin to be provider independent #2498
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.
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?
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).
@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)
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.
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.
Activity
austencollins commentedon Oct 21, 2016
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?
pmuens commentedon Oct 21, 2016
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,removeetc. without having any dependency on providers (and their logic).flomotlik commentedon Oct 21, 2016
@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)
pmuens commentedon Oct 21, 2016
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.
pmuens commentedon Nov 4, 2016
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
pmuens commentedon Jan 15, 2019
Closing this since it's stale and not an issue per se.