Go HTML JavaScript Shell COBOL Python Other
Switch branches/tags
Clone or download
affix and alexellis Add affix to derek maintainers
Signed-off-by: Keiran Smith <contact@keiran.scot>
Latest commit 79e5487 Jun 20, 2018
Permalink
Failed to load latest commit information.
.github Update ISSUE_TEMPLATE.md Feb 14, 2018
api-docs Add health and info endpoints May 20, 2018
contrib Update travis to use Go 1.9 Apr 3, 2018
docs Update README.md Mar 31, 2018
gateway Vendor new queue-worker version Jun 18, 2018
guide Update secret docs and sample-functions Jun 17, 2018
prometheus Bump alertmanager to RC version due to bug Mar 13, 2018
sample-functions Update secret docs and sample-functions Jun 17, 2018
watchdog Update to golang 1.9.7 Jun 16, 2018
.DEREK.yml Add affix to derek maintainers Jun 19, 2018
.gitignore Added GKE articles Dec 20, 2017
.travis.yml Fix Docker Registry push Apr 16, 2018
BACKERS.md Update BACKERS.md Apr 2, 2018
CNAME Create CNAME Apr 29, 2017
CONTRIBUTING.md Update guidance on commit messages Apr 3, 2018
DEV.md Update to golang 1.9.7 Jun 16, 2018
LICENSE Add license into code files for MIT Apr 27, 2017
MAINTAINERS Adding BurtonR to list of maintainers Dec 4, 2017
Makefile Make gateway Sep 24, 2017
README.md Remove PWD link in readme Jun 6, 2018
ROADMAP.md Updates for November Nov 4, 2017
TestDrive.md Remove sample functions for swarm Jun 5, 2018
_config.yml Set theme jekyll-theme-cayman Apr 29, 2017
appveyor.yml Windows port - spike (#66) Apr 27, 2017
build.sh Quote build.sh Oct 1, 2017
community.md add K8s post to community.md Jun 12, 2018
debug.md Disable KeepAlive on proxy (#21) Mar 21, 2017
deploy_stack.armhf.sh Check for docker in linux deploy_stack scripts Aug 16, 2017
deploy_stack.ps1 Add PowerShell script to start Docker stack Aug 16, 2017
deploy_stack.sh Check for docker in linux deploy_stack scripts Aug 16, 2017
docker-compose.arm64.yml Bump gateway and watchdog tags/versions Feb 25, 2018
docker-compose.armhf.yml Update armhf queue-worker version Jun 16, 2018
docker-compose.yml Bump gateway version to 0.8.3 Jun 18, 2018
stack.yml Remove sample functions for swarm Jun 5, 2018
stack_arm.yml Remove sample functions for swarm Jun 5, 2018

README.md

OpenFaaS - Serverless Functions Made Simple

Go Report Card Build Status GoDoc License: MIT OpenFaaS

OpenFaaS Logo

OpenFaaS (Functions as a Service) is a framework for building serverless functions with Docker and Kubernetes which has first class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.

Twitter URL

Highlights

  • Ease of use through UI portal and one-click install
  • Write functions in any language for Linux or Windows and package in Docker/OCI image format
  • Portable - runs on existing hardware or public/private cloud - Kubernetes and Docker Swarm native
  • CLI available with YAML format for templating and defining functions
  • Auto-scales as demand increases

New: become an OpenFaaS backer or sponsor

We need your support to keep delivering on Serverless Functions Made Simple so pledge to OpenFaaS and become a backer or a sponsor with a unique set of rewards. Help us hit our goals and get to back a great project at the same time.

View the List of backers and sponsors

Press-kit/media/swag

For stickers, swag, media or press-kit information head over to openfaas/media

Governance

OpenFaaS is an independent project created by Alex Ellis which is now being built and shaped by a growing community of contributors. Project website: openfaas.com.

Overview of OpenFaaS

Serverless Functions Made Simple.

Stack

Function Watchdog

  • You can make any Docker image into a serverless function by adding the Function Watchdog (a tiny Golang HTTP server)
  • The Function Watchdog is the entrypoint allowing HTTP requests to be forwarded to the target process via STDIN. The response is sent back to the caller by writing to STDOUT from your application.

API Gateway / UI Portal

  • The API Gateway provides an external route into your functions and collects Cloud Native metrics through Prometheus.
  • Your API Gateway will scale functions according to demand by altering the service replica count in the Docker Swarm or Kubernetes API.
  • A UI is baked in allowing you to invoke functions in your browser and create new ones as needed.

The API Gateway is a RESTful micro-service and you can view the Swagger docs here.

CLI

Any container or process in a Docker container can be a serverless function in FaaS. Using the FaaS CLI you can deploy your functions quickly.

Create new functions from templates for Node.js, Python, Go and many more. If you can't find a suitable template you can also use a Dockerfile.

The CLI is effectively a RESTful client for the API Gateway.

When you have OpenFaaS configured you can get started with the CLI here

Function examples

You can generate new functions using the FaaS-CLI and built-in templates or use any binary for Windows or Linux in a Docker container.

  • Python example:
import requests

def handle(req):
    r =  requests.get(req, timeout = 1)
    print(req +" => " + str(r.status_code))

handler.py

  • Node.js example:
"use strict"

module.exports = (callback, context) => {
    callback(null, {"message": "You said: " + context})
}

handler.js

Other Sample functions are available in the Github repository in a range of programming languages.

Documentation

We are building a new documentation site at docs.openfaas.com. The source repository for the documentation website is openfaas/docs.

For all other guides, tutorials, trouble-shooting and blog posts head over to our guides page on GitHub.

Get started with OpenFaaS

Hands-on labs (detailed getting started)

You can learn how to build functions with OpenFaaS using our hands-on labs in the OpenFaaS workshop.

TestDrive (classic getting started)

Kubernetes

OpenFaaS is Kubernetes-native - you can follow the deployment guide here.

Docker Swarm

The deployment guide for Docker Swarm contains a simple one-line command to get you up and running in around 60 seconds. It also includes a set of sample functions which you can use with the TestDrive instructions below.

Deployment guide for Docker Swarm

Docker Playground

You can quickly start OpenFaaS on Docker Swarm online using the community-run Docker playground: Play-with-Docker (PWD)

Simply follow the deployment guide for Swarm above in a new session

You will need a free Docker Hub account to get access. Get one here: Docker Hub

Begin the TestDrive

Here is a screenshot of the API gateway portal - designed for ease of use.

Portal

Find out more about OpenFaaS

SkillsMatter video presentation

Great overview of OpenFaaS features, users and roadmap

OpenFaaS presents to CNCF Serverless workgroup

Closing Keynote at Dockercon 2017

Functions as a Service or FaaS was a winner in the Cool Hacks contest for Dockercon 2017.

If you'd like to find the functions I used in the demos head over to the faas-dockercon repository.

Background story

Community

Have you written a blog about OpenFaaS? Send a Pull Request to the community page below.

If you'd like to join OpenFaaS community Slack channel to chat with contributors or get some help then check out this page on community.

Roadmap and contributing

OpenFaaS is written in Golang and is MIT licensed - contributions are welcomed whether that means providing feedback, testing existing and new feature or hacking on the source.

How do I become a contributor?

Please see the guide on community & contributing

Roadmap

The roadmap is represented in GitHub issues and a Trello board. There is also a historical ROADMAP file in the main faas repository.

Other

Example of a Grafana dashboards linked to OpenFaaS showing auto-scaling live in action: here

An alternative community dashboard is available here