Faas: Proposal: "Serverless Inc. framework plugin" for OpenFaaS

Created on 29 Apr 2017  路  11Comments  路  Source: openfaas/faas

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

Related: https://github.com/alexellis/faas/issues/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.
help wanted prioritlow

Most helpful comment

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

All 11 comments

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.

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

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

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: https://github.com/alexellis/faas-cli/issues/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.

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

Derek add label: priority/low

I hope to sit down with this next week @aafrey

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)

@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

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?

Derek close: inactivity

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexellis picture alexellis  路  7Comments

saad749 picture saad749  路  5Comments

hotjunfeng picture hotjunfeng  路  5Comments

matthewdolman picture matthewdolman  路  5Comments

rorpage picture rorpage  路  7Comments