Giter Site home page Giter Site logo

rimiti / openfaas-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openfaas/openfaas-cloud

0.0 1.0 0.0 17.98 MB

OpenFaaS Cloud - portable, multi-user Serverless Functions powered by GitOps

Home Page: https://blog.alexellis.io/introducing-openfaas-cloud/

License: MIT License

Makefile 0.38% Go 76.37% Dockerfile 1.42% HTML 6.83% Shell 0.67% JavaScript 13.33% CSS 1.00%

openfaas-cloud's Introduction

OpenFaaS Cloud

OpenFaaS Cloud - portable, multi-user Serverless Functions powered by GitOps

https://pbs.twimg.com/media/DacWCtZVMAAJQ-u.jpg

Announcement from Cisco's DevNet Create in Mountain View

Description

OpenFaaS Cloud is a portable, multi-user Serverless Functions platform powered by GitOps. OpenFaaS Cloud introduces a build-system for your functions and native integrations into GitHub meaning that you just run git push to deploy your code. As soon as OpenFaaS Cloud receives the push event it will clone your Git repo, build, push and then deploy your function with a rolling update to your own sub-domain with HTTPS.

Features:

  • Portable - run anywhere or use the hosted Community Cluster
  • Multi-user - use your GitHub identity to log into your personal dashboard
  • Applies GitOps principles - your git repo is the source of truth
  • Integrate repos with a single click through the GitHub App
  • Immediate feedback - live build notifications for your commits
  • HTTPS endpoints per user
  • Secured through HMAC - the public facing function "github-event" uses HMAC to verify the origin of events

OpenFaaS Cloud packages, builds and deploys functions using OpenFaaS. Moby's BuildKit is used to build images and push to a local Docker registry instance.

The dashboard page for a user:

Dashboard

The details page for a function:

Details page

Blog post

Read my introducing OpenFaaS Cloud blog post for an overview of the idea with examples, screenshots and background on the project.

Roadmap & Features

  • Core experience
  • Self-hosted deployment on Kuberneters or Docker Swarm
  • GitHub Status API integration for commits
  • Automatic HTTPS for endpoints (yes via CertManager/Traefik)
  • Authorization with a CUSTOMER list
  • Trust with GitHub via HMAC and GitHub App
  • CI/CD for functions
  • Container builder using BuildKit
  • Free to use SaaS edition for community members and contributors
  • Log storage on Minio (S3-compatible)
  • Log storage on AWS S3
  • Kubernetes helm chart (plain YAML supported already)
  • Automation for the day-0 installation via Ansible or similar
  • Developer story
  • Multi-user
  • UI: Dashboard for users
  • Support secrets in public repos through Bitnami SealedSecrets
  • Make detailed logs available to show build or unit test failures (dashboard)
  • Make build logs available publicly (dashboard finished, Checks API in progress)
  • Mixed-case user-names
  • Use a git "tag" or "GitHub release" to promote a function to live
  • UI: Dashboard - detailed metrics of success/failure per function in
  • Operationalize
  • Support for shared Docker Hub accounts instead of private registry
  • Support for private GitHub repos
  • Dashboard: OAuth 2 login via GitHub
  • Isolation between functions (through the provided NetworkPolicy on Kubernetes)
  • Stretch goals
  • Move Dashboard UI to React.js
  • Re-write React.js Dashboard to use native Bootstrap library
  • CI/CD integration with on-prem GitLab (in-progress)
  • UI: OAuth 2 login via GitLab (planned, help wanted)
  • Unprivileged builds with BuildKit or similar (under investigation)
  • Log into OpenFaaS Cloud via CLI (faas-cli cloud login)
  • Enable untrusted container builds via docker-machine?
  • Integration with on-prem BitBucket (help wanted)

Functions

OpenFaaS Cloud is built using OpenFaaS Golang functions to interact with GitHub and build your functions from source and deploy them - live within seconds of typing: git push.

  • Function: github-event

Receives events from the GitHub app and checks the origin via HMAC

  • Function: github-push

Handles push events from the "github-event" function

  • Function: git-tar

Clones the git repo and checks out the SHA then uses the OpenFaaS CLI to shrinkwrap a tarball to be build with Docker

  • Function: buildshiprun

Submits the tar to the of-builder then configures an OpenFaaS deployment based upon stack.yml found in the Git repo. Finally starts a rolling deployment of the function.

Calls garbage-collect

  • Function: garbage-collect

Function cleans up functions which were removed or renamed within the repo for the given user.

  • Service: of-builder

A builder daemon which exposes the GRPC of-buildkit service via HTTP.

  • Service: of-buildkit

The buildkit GRPC daemon which builds the image and pushes it to the internal registry. The image is tagged with the SHA of the Git commit event.

  • Service: Docker open-source registry

A private, local registry is deployed inside the cluster.

Conceptual architecture diagram

This conceptual diagram shows how OpenFaaS Cloud integrates with GitHub through the use of an event-driven architecture.

Main flows:

  1. User pushes code - GitHub push event is sent to github-event function triggering a CI/CD workflow
  2. User removes GitHub app from one or more repos - garbage collection is invoked removing 1-many functions
  3. User accesses function via router using "pretty URL" format and request is routed to function via API Gateway

Try it out

You can set up and host your own OpenFaaS Cloud or contact [email protected] for instructions on how to participate in a public trial of a fully-hosted service. Read the privacy statement and terms and conditions for the hosted version of OpenFaaS Cloud.

Read the development guide to find out more about the functions and to start hacking on OpenFaaS Cloud.

openfaas-cloud's People

Contributors

affix avatar akihirosuda avatar alexellis avatar bartsmykla avatar burtonr avatar ericstoekl avatar fntlnz avatar itscaro avatar ivanayov avatar jaigouk avatar jkrol2 avatar joaopluigi avatar johnmccabe avatar k33g avatar kenfdev avatar kvuchkov avatar lucasroesler avatar martindekov avatar mjhea0 avatar nwiizo avatar padiazg avatar rdimitrov avatar rgee0 avatar rorpage avatar s8sg avatar tarunmangukiya avatar tianyizheng avatar viveksyngh avatar xmudrii avatar zhuzhenfeng-finogeeks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.