Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: "Serverless Inc. framework plugin" for OpenFaaS #71

Closed
alexellis opened this issue Apr 29, 2017 · 11 comments
Closed

Proposal: "Serverless Inc. framework plugin" for OpenFaaS #71

alexellis opened this issue Apr 29, 2017 · 11 comments

Comments

@alexellis
Copy link
Member

alexellis commented Apr 29, 2017

Serverless Inc framework provides a CLI / abstraction to public cloud, but they do not appear to have any Docker or Swarm backed providers.

Related: #58

Help wanted from community.

Research:

Run a spike / PoC to integrate with serverless project:

Repo & skeleton created:

Goals:

  • Identify missing endpoints/API in FaaS and back-fill
  • Explore pros/cons of maintaining Serverless Inc Plugin over FaaS' own CLI
  • Understand security / api/secret key etc requirements for self-hosted vs managed (cloud) function service.
@alexellis alexellis self-assigned this Apr 29, 2017
@alexellis
Copy link
Member Author

alexellis commented May 12, 2017

Documentation from Serverless project on creating new provider was sparse. I was able to bootstrap the framework, but it requires a PR to their core project due to whitelist of provider names etc.

Parking issue for now in favour of faas-cli YAML - with similar format.

@alexellis
Copy link
Member Author

@aafrey I've re-opened this to track progress.

@alexellis alexellis changed the title Research/enhancement: FaaS Provider for "Serverless Inc. plugin" Proposal: "Serverless Inc. framework plugin" for OpenFaaS Sep 7, 2017
@austinfrey
Copy link
Contributor

initial commands are functional. I'll have more time to spend on it this weekend to clean things up.

@austinfrey
Copy link
Contributor

I've updated build to be package to be inline with other providers. Also, using the create command would require a PR to serverless to include the OpenFaaS templates, it can't be over-ridden like some of other commands, instead we could use the install command to pull templates from github, rather than using create. this is partly why I lobbied for separate template repos here: openfaas/faas-cli#85 but I'd only really recommend that change if it made the most sense for OpenFaaS across the board. thoughts?

I also added a custom init command to launch the OpenFaaS framework for funsies.

@austinfrey
Copy link
Contributor

summarizing a thread from slack:

  • Is it necessary to return a promise in the various plugin commands? (deploy, package, etc) it does not seem to have an impact when removed on the forked_cmds branch
  • there are two options to generating function boilerplate with the Serverless framework: 1) create requires a PR to the main Serverless repo to add the OpenFaaS templates. 2) install pulls function templates from a specific GitHub repo, this seems the fastest way but would require individual repo's for each function template.
  • I also created a new branch called http_cmds which implements the commands using http requests to the OpenFaaS Gateway API rather than spawning/forking the faas-cli. After experimenting, I think this way is actually the best. it offers mores flexibility and more reliable/predictable behavior. Since the serverless framework uses promises heavily, streaming functions don't seem to behave as well, and spawn pipes stream data to stdout ad stderr.
  • There seems to be a long delay when running the deploy and package commands. watching the cli output, it stalls at this step Serverless: Excluding development dependencies... which makes me think this is a serverless issue when packaging plugins. Error comes from this line in the serverless/serverless repo.

any feedback regarding the above is appreciated.
cc @alexellis

@alexellis
Copy link
Member Author

Derek add label: priority/low

@ghost ghost added the priority/low label Sep 14, 2017
@alexellis
Copy link
Member Author

I hope to sit down with this next week @aafrey

@javajon
Copy link

javajon commented Dec 10, 2017

Just a vote here.

In reviewing Kubeless it is nice to see this serverless.com plugin.

Adding a plugin for OpenFaaS may add more momentum.

(Along the lines of momentum, also a stable helm chart for faas-netes)

@austinfrey
Copy link
Contributor

austinfrey commented Dec 10, 2017

@javajon. Thanks for the interest. Feel free to give it a try. It needs updated to match certain newer changes but it's functional as an MVP. https://github.com/openfaas/serverless-openfaas

@alexellis
Copy link
Member Author

alexellis commented Dec 10, 2017

Hi @javajon, for context about momentum this analysis from The New Stack may be helpful - https://thenewstack.io/aws-lambda-still-towers-competition-much-longer/

There is a stable helm chart in our repository with instructions for how to get started and about available settings/flags. We're also doing the necessary to get it listed "upstream" in the charts repo. If you would like to be involved / help with either please shout.

The serverless framework's CLI is generally slow for every provider. You'll find a richer experience with the OpenFaaS CLI which was built for serverless with containers in mind and in Golang rather than with Cloud providers in mind.

@austinfrey which "newer changes" does it need updating for?

@alexellis
Copy link
Member Author

Derek close: inactivity

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

No branches or pull requests

3 participants