Skip to content

A plugin for the serverless framework to deploy functions to tinyfaas

Notifications You must be signed in to change notification settings

valentin-carl/serverless-tinyfaas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-tinyfaas

The serverless project aims to simplify the development (among others) of serverless applications. TinyFaaS is a serverless platform for edge environments. This plugin allows the serverless framework to be able to deploy function on tinyFaaS nodes.

Deploying functions

Assuming the serverless framework is already installed, you just need to get this plugin via npm to get started.

npm i serverless-tinyfaas

Next, add your tinyFaaS functions and nodes to the serverless.yml. Here's an example configuration. This can be appended to an existing serverless.yml to combine the tinyFaaS functions with other providers. Note that the provider and service fields have no meaning for tinyFaaS; they're just required for the serverless framework to not throw any errors while deploying.

custom:
  tinyfaas:
    functions:
      - name: "fibonacci"
        env: "nodejs"
        threads: 1
        source: "./functions/fibonacci"
        deployTo:
          - name: "tinyFaaS-node-0"

    nodes:
      - name: "tinyFaaS-node-0"
        url: "http://localhost:8080"

plugins:
  - serverless-tinyfaas

provider:
  name: "aws"

service: "my-service"

Now, run the following command to deploy your functions to your tinyFaaS nodes.

serverless deploy

Note that a function can be deployed to multiple tinyFaaS nodes by adding more node-names to the deployTo list.

Local development

To work on this plugin locally, (1) download the src/index.js file and (2) replace serverless-tinyfaas in the serverless.yml with the path to the index.js file.

About

A plugin for the serverless framework to deploy functions to tinyfaas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published