GithubHelp home page GithubHelp logo

openfaas / store Goto Github PK

View Code? Open in Web Editor NEW
162.0 9.0 56.0 129 KB

Official Function and Template Store for OpenFaaS

License: MIT License

Shell 100.00%
store registry openfaas functions colorise inception community tensor-flow

store's Introduction

OpenFaaS Function Store

ci-only

The Function Store is a curated index of OpenFaaS functions which have been tested by the community and chosen for their experience.

See the announcement here

Q&A

  • How much does this cost?

It's free

  • What's happening conceptually?

The concept is that we will keep a curated list of interesting functions that you can deploy in one-click to your existing OpenFaaS API Gateway using the UI. We do not need access to your API gateway.

We may update the CLI to make use of the store future too.

  • Where are functions hosted?

In any public Docker registry whether that be the Docker Hub, Quay or elsewhere.

  • Where is the list/definition kept?

We are using a .json file in this repository and GitHub's raw download CDN.

  • Why is it called a store if I don't have to pay money?

See also: Google Play Store/Apple App Store.

Make a submission to the Function Store

If you'd like to make a submission then raise an issue to propose it. This should follow the CONTRIBUTION guide for OpenFaaS.

Here are two example function definitions.

Version 0.1.0 (store.json)

[
  {
    "title": "Inception",
    "description": "This is a forked version of the work by Magnus Erik Hvass Pedersen - it has been re-packaged as an OpenFaaS serverless function.",
    "image": "alexellis/inception",
    "name": "inception",
    "fprocess": "python3 index.py",
    "network": "func_functions",
    "repo_url": "https://github.com/faas-and-furious/inception-function",
    "labels": {
      "com.openfaas.ui.ext": "json"
    },
    "environment": {
      "write_timeout": "30"
    }
  }
]

Version 0.2.0 (functions.json)

{
    "version": "0.2.0",
    "functions": [
    {
        "title": "NodeInfo",
        "name": "nodeinfo",
        "description": "Get info about the machine that you're deployed on. Tells CPU count, hostname, OS, and Uptime",
        "images": {
            "arm64": "functions/nodeinfo:arm64",
            "armhf": "functions/nodeinfo:latest-armhf",
            "x86_64": "functions/nodeinfo:latest"
        },
        "labels": {
          "com.openfaas.ui.ext": "json"
        },
        "environment": {
          "write_timeout": "30"
        },
        "fprocess": "node main.js",
        "network": "func_functions",
        "repo_url": "https://github.com/openfaas/faas/tree/master/sample-functions/NodeInfo"
    }
  ]
}

See also:

  • labels

You can set the file extension used by the UI to download a result from your function i.e. csv/mp3/txt

  • environment

Set timeouts etc

OpenFaaS Template Store

The Template Store contains all the templates from OpenFaaS and OpenFaaS-Incubator organizations, along with user-defined templates which have been approved by the community.

How to submit to the Template Store

If you'd like to see your template in the official store follow these steps:

  1. Open an issue to propose the template and include a link to your template repository. This should follow the CONTRIBUTION guide for OpenFaaS.
  2. Await feedback on, and subsequent approval of, your proposal from the community.
  3. Add your template to the templates.json file. Here is example of a template definition:
    {
        "template": "go",
        "platform": "x86_64",
        "language": "Go",
        "source": "openfaas",
        "description": "Classic Golang template",
        "repo": "https://github.com/openfaas/templates",
        "official": "true"
    },
  1. Open PR for your template to be merged in the Template Store

Once merged you can see your template displayed by typing faas-cli template store list in the terminal.

Templates created by the community:

Those are the custom templates created by the community:

store's People

Contributors

affix avatar alexellis avatar burtonr avatar devries avatar distantcam avatar ericstoekl avatar esimov avatar ivanayov avatar jockdarock avatar kenfdev avatar koffeinfrei avatar kylos101 avatar lucasroesler avatar martindekov avatar meacu1pa avatar michaelmior avatar nitishkumar71 avatar piotr-roslaniec avatar pmlopes avatar rgee0 avatar rorpage avatar scottleedavis avatar stefanprodan avatar tmiklas avatar tpei avatar viveksyngh avatar welteki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

store's Issues

Submission Request, LSB Steganography function

I created a steganography function that can be usefull for some, and fun for others. Hope you find it interesting. It has 100% test coverage and CircleCi integration in my repo.

{
    "title": "LSB Steganography",
    "description": "LSB steganography encoding/decoding on base64 images",
    "images": {
        "x86_64": "auyer/fn-steganography"
    },
    "name": "steganography",
    "repo_url": "https://github.com/auyer/fn-steganography",
    "labels": {
        "com.openfaas.ui.ext": "json"
    }
}

Submission Request, pwgen

Hello Guys, home I'm doing this right, I submit for your review the following "Function" to be added to the store both armhf and x86_64

{
  "title": "Password Generator",
  "description": "Basic implementation of the known linux 'pwgen' command, for OpenFaas, armhf",
  "image": "playgali/faas_pwgen:latest-armhf",
  "name": "pwgen",
  "fprocess": "xargs pwgen -s",
  "network": "func_functions",
  "repo_url": "https://github.com/playgali/faas_pwgen",
  "labels": {
    "com.openfaas.ui.ext": "txt"
  },
  "environment": {
    "write_timeout": "10"
  }
}

and the other one

{
  "title": "Password Generator",
  "description": "Basic implementation of the known linux 'pwgen' command, for OpenFaas",
  "image": "playgali/faas_pwgen:latest",
  "name": "pwgen",
  "fprocess": "xargs pwgen -s",
  "network": "func_functions",
  "repo_url": "https://github.com/playgali/faas_pwgen",
  "labels": {
    "com.openfaas.ui.ext": "txt"
  },
  "environment": {
    "write_timeout": "10"
  }
}

Thank you for your time

Add caire image resizer as sample function.

I think we should add an image resizer into the store.

This one looks to have shot up to popularity with 8k stars: https://github.com/esimov/caire

It does smart things like scale/resize images while retaining the scale for faces, it can even extend the width of images etc.

Not sure of the best user interface, we could use a string like a human-readable sentence - or JSON as the input. JSON is obviously easier. Human-readable string may be: "Resize this URL https:// to 100 pixel width"

[wip] "sisyphus", to illustrate a single function that works across stores of all architectures

See vielmetti/sisyphus#6 , work in progress to build a single simple OpenFaaS function that's multi-architecture and builds across multiple architectures from a simple Makefile and from a single Dockerfile.

Not ready to merge yet, but if you want to try it out,

faas-cli deploy --image vielmetti/sisyphus:amd64 --name sisyphus

should work on amd64 (x86_64) systems right now

  • build for amd64
  • build for arm64
  • build for armhf
  • test on amd64/faas-netes
  • test on arm64/faas-netes
  • test on armhf
  • build multiarch image vielmetti/sisyphus:latest with manifest
  • add to store
  • write up blog

"Docker Image Manifest Query" image has invalid manifest list

Due to a bug in Docker some multi-arch manifest lists have the wrong size in them. This bug has since been fixed in Docker 18.09 docker/cli#1156 but the manifests in the registry still need to be updated. Docker does not appear to validate the size, but containerd does. So you will see an issue pulling rgee0/of-mquery:1.0 on kubernetes using containerd as the CRI implementation.

The manifest list for rgee0/of-mquery:1.0 needs to be updated and repushed to docker hub.

I can only see two store functions.

I just deployed latest OpenFass on my kubernetes and when looking on Portal I can see only two store functions "NodeInfo" and "Sha512sum", do I need to update the list somehow as I can see more in the github json...

Submission Request - COBOL Template

I wrote a COBOL template, which is a bit tongue in cheek, but could be another potential addition to the store. It's currently in a fairly large container, and I may work on trimming in down a bit as we go forward. The build and deployment container is devries/cobol:latest which is just a debian:buster-slim container with GnuCOBOL installed. The Dockerfile I use to create that container is here: https://github.com/devries/docker-cobol/blob/master/Dockerfile

The template itself is located at https://github.com/devries/openfaas-cobol-template, and contains a README explaining how it is used. I would propose adding the following to the templates.json file:

    {
        "template": "cobol",
        "platform": "x86_64",
        "language": "COBOL",
        "source": "devries",
        "description": "COBOL Template",
        "repo": "https://github.com/devries/openfaas-cobol-template",
        "official": "false"
    }

Submission request, fsharp template

Didn't see any issue template so here we go.

Want to submit my template for functions using F# and .NET Core.
Template available here.

Please tell me the next step

templates.json has an error with the powershell-templates

It looks like an error in the templates.json that pointes the powershell-template to the python3-debian template.

{
"template": "powershell-template",
"platform": "x86_64",
"language": "Python",
"source": "openfaas-incubator",
"description": "Powershell Ubuntu:16.04 template",
"repo": "https://github.com/openfaas-incubator/python3-debian",
"official": "false"
},

I think it should be
{
"template": "powershell-template",
"platform": "x86_64",
"language": "Python",
"source": "openfaas-incubator",
"description": "Powershell Ubuntu:16.04 template",
"repo": "https://github.com/openfaas-incubator/powershell-template",
"official": "false"
},

Submission Request - Kotlin Native Linux x64 Template

There is no Kotlin Native Linux x64 template in the store despite the fact that a template exists. Kotlin has significantly grown in backend development to the point where it makes sense to include a Kotlin Native Linux x64 template in the store.

Proposed Solution

I propose using the existing template as the one to use in the store but with some modifications. Will require updating the Kotlin version used to match the latest Kotlin stable version (Kotlin Native uses the Kotlin versioning scheme). Starting with Kotlin 1.3 program arguments are now optional therefore fun main(args: Array<String>) can be shortened to fun main().

Considering that the Kotlin Native runtime is currently in flux with concurrency it would be best to use the classic OpenFaaS Watchdog. Kotlin Native has a dependency on the GCC standard library which means Alpine Linux cannot be used as the container OS, therefore Debian will be used instead.

Since KotlinConf 2019 is over a week away (from the 4th to the 6th of December) it would make sense to see what announcements are being made, especially around Kotlin backend development and Kotlin Native. It might be possible that the Kotlin 1.4 release might provide some benefits where it is better to skip using Kotlin 1.3 for the template.

Add Deno.js a template

I would like to submit a Deno.js template as an alternative of the Node.js template.
This is the project link: https://github.com/betterRunner/openfaas-deno-template

Here are some reasons for adding this template:
(1) deno supports Typescript out of the box. I think using Typescript to write functions would be better than using Javascript because of type checking and other features.
(2) deno is designed to be a security sandbox so in some themes I think it would be more suitable than nodejs.

You can see out more details here.

Thank you!

Submission: php7-http template

I wrote an php7-http template that is based on https://github.com/spiral/roadrunner.
I took some ideas from the official php-template (php-extension.sh for installing extensions, composer.json etc.)

The template is located here: https://github.com/HeavyHorst/php-roadrunner-template.

The performance seems to be quite good (with the simple hello world example that returns the query parameters as json):

hey -n 5000 "http://localhost:8080?something=bla&one=1"
Summary:
  Total:	0.7239 secs
  Slowest:	0.0199 secs
  Fastest:	0.0008 secs
  Average:	0.0071 secs
  Requests/sec:	6906.9279

Would you accept a PR request for it?

Submission Request: PowerShell Polaris template

Hi! I'd like to request the submission of a new template for a http function that uses Polaris as it's web server.

  • More info on Polaris can be found here
  • The repository containing the template can be found here

I've tried to include as much info as I can in the README, but happy to answer and questions and feedback you may have.

Submission request, next.js template

Hi, I opened this issue to submit a Next.js template to the store.

The template uses the new serverless mode introduced in Next.js 8 to create a single file for each page.

It was built based on the node10-express-template in a way it is compatible with the features of the base template.

It comes with 2 sample pages and the pages include emotion for styling:

  • '/': Home page
  • '/about': About page

You can check it deployed here.

Please feel free to reach me if you have any suggestions about how to make the template better or if you encounter any issue.

The template is openfaas-serverless-nextjs-template.

Thanks.

Submission: HTTP load generator function using Dockerfile template

Hello there,

Long time reader, second time writer! I'd like to submit a function to the store for HEY.

I've been selfishly using this on my local cluster when demoing the power of Serverless to peers (using this function to load test other functions, showing how they scale, are async, etc.) and thought this might be good to share with folks, too.

This is my first real contribution to open source, aside from reporting issues. As time permits, may I ask you to let me know if this is approved, you'd like more info, or if this is rejected? I'd be happy to share a pull request for the store update if it is approved.

References:
The function source
The function image repo
The function store update

Take care,

Kyle

Feature: try to pull each image from manifest

Using bash / jq we should try to pull each image in the manifest functions.json - for every platform.

If one or more is missing then this should exit non-zero and print an error indicating which images are missing.

Move from cli-lang to template in templates.json

I open this issue just in case we need some commenting on the name, the old one is cli-lang which is not verbose enough, It was suggested that more proper way should be template or template-name. I will open PR to fix the issue. More keen on template for simplicity. Open to suggestions

Validate JSON files using jq

We should validate all PRs using jq or a similar tool with Travis. This prevents the store from breaking when the JSON is merged but invalid.

Submission Request, imgmod function

Hi guys, I would like to submit a review request for this Image Manipulation Function with hope it can be added to the OpenFaaS Function Store ๐Ÿ™‚

{
  "title": "Image Manipulation Function",
  "description": "Provide URL and use image manipulation function to download, scale, gray, flip, mirror, invert any online jpeg or png image",
  "image": "psyhomb/imgmod:latest",
  "name": "imgmod",
  "fprocess": "python3 index.py",
  "network": "func_functions",
  "repo_url": "https://github.com/psyhomb/serverless/tree/master/openfaas/imgmod",
  "environment": {
    "input_mode": "url",
    "output_mode": "image"
  },
  "labels": {
    "com.openfaas.ui.ext": "jpg"
  }
}

Thanks

Submission: rust-rocket

Hey,

Hope all of you are doing well during these times. I am trying to add the following template that I created into the store if possible. it's build on rocket.rs which is a fairly new networking framework on rust.

Best Regards.

Provide more C# .NET Core samples for armhf

Exploring more of the sample functions in the store I would like to see more .NET Core for armhf.

Following Alex Ellis' and Scott Hanselman's great posts I would like to see similar examples available in the store.

  • Hello World - C#
  • NodeInfo - C#
  • Suggestions? (I'm willing to work on any, just need ideas)

I've got Hello World working locally and would be happy to submit.

Add .DEREK.yml to each repo in faas-and-furious

Task

Add .DEREK.yml to each repo in faas-and-furious which contains community functions, some of which are used in the function store.

This will result in us being able to accept PRs with sign-off checking and allowing community to administrate PRs and Issues.

You'll get 18 commits which will bump you up in the leaderboard too ๐Ÿ’น whilst also helping the project a lot.

http://kenfdev.o6s.io/github-stats-page#/

preview outside OpenFaaS?

As a random visitor of this repository, it would be nice if I could easily view the functions in here. Right now it's not so bad to directly read the JSON file, but especially if this collection (hopefully) grows, it would be great to have a nicer view.

Maybe the code rendering the frontend in OpenFaaS could be used to create a simple page, e.g. on GitHub pages and linked from this repo?

Add AsciiWeather to Function Store

Hello everyone,

Happy New Year!

I would like to propose asciiweather function to be added into the function store.

I think this would be a good sample/demo function for getting started with OpenFaas. The associated github repo can also serve as a reference for converting a Go CLI application into a serverless function.

Here are the function definitions for amd64 and armhf for the registry.

amd64:

{
    "title": "AsciiWeather",
    "description": "This is a ported version of the wego weather client as an OpenFaaS serverless function.",
    "image": "roncrivera/asciiweather:latest",
    "name": "asciiweather",
    "fprocess": "xargs ./wego",
    "repo_url": "https://github.com/roncrivera/openfaas-asciiweather"
}

armhf:

{
    "title": "AsciiWeather",
    "description": "This is a ported version of the wego weather client as an OpenFaaS serverless function.",
    "image": "roncrivera/asciiweather:armhf",
    "name": "asciiweather",
    "fprocess": "xargs ./wego",
    "repo_url": "https://github.com/roncrivera/openfaas-asciiweather"
}

Here it is in action:

Thank you very much for your time.

best regards,
ron

Why template requires repo but function can use repo-url?

I found in templates.json, it is "repo" for each template.
By my understanding the "repo" has to be to one repo project root path.
But in functions.json, it is "repo_url" for each function,
The "repo_url" could be sub path of one repo project.

So if I want to contribute one template, I have to create a new repo project to hold the template.
I couldn't use the existed "https://github.com/clearlinux/dockerfiles/tree/master/FaaS/OpenFaaS/template" path for the "repo" definition in templates.json.

May I know the reason why and if you will support "repo_url" for template.
Thanks.

Submission request - Perl template

I would like to suggest adding Perl template to the official store.

Currently the Alpine version is working correctly hence suggestion to call it perl-alpine, to avoid collision with currently (not fully working) template found in incubator.

My template is located at https://github.com/tmiklas/openfaas-perl-templates, usage described in README.

Proposed templates.json bit:

    {
        "template": "perl-alpine",
        "platform": "x86_64",
        "language": "Perl",
        "source": "tmiklas",
        "description": "Perl language template based on Alpine image",
        "repo": "https://github.com/tmiklas/openfaas-perl-templates",
        "official": "false"
    }

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.