Code Monkey home page Code Monkey logo

fission.io's Introduction


Fission: Serverless Functions for Kubernetes

Fission Licence Fission Releases go.dev reference Go Report Card Fission contributors Commit Activity
Fission website Fission slack Fission twitter GitHub Repo stars


Fission is a fast serverless framework for Kubernetes with a focus on developer productivity and high performance.

Fission operates on just the code: Docker and Kubernetes are abstracted away under normal operation, though you can use both to extend Fission if you want to.

Fission is extensible to any language; the core is written in Go, and language-specific parts are isolated in something called environments (more below). Fission currently supports NodeJS, Python, Ruby, Go, PHP, Bash, and any Linux executable, with more languages coming soon.

Table of Contents

Performance: 100msec cold start

Fission maintains a pool of "warm" containers that each contain a small dynamic loader. When a function is first called, i.e. "cold-started", a running container is chosen and the function is loaded. This pool is what makes Fission fast: cold-start latencies are typically about 100msec.

Kubernetes is the right place for Serverless

We're built on Kubernetes because we think any non-trivial app will use a combination of serverless functions and more conventional microservices, and Kubernetes is a great framework to bring these together seamlessly.

Building on Kubernetes also means that anything you do for operations on your Kubernetes cluster — such as monitoring or log aggregation — also helps with ops on your Fission deployment.

Getting Started

  # Add the stock NodeJS env to your Fission deployment
  $ fission env create --name nodejs --image fission/node-env

  # Create a function with a javascript one-liner that prints "hello world"
  $ fission function create --name hello --env nodejs --code https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js

  # Run the function.  This takes about 100msec the first time.
  $ fission function test --name hello
  Hello, world!

Learn More

Contributing

Check out the contributing guide.

Who is using Fission?

Sponsors

The following companies, organizations, and individuals support Fission's ongoing maintenance and development. If you are using/contributing to Fission, we would be happy to list you here, please raise a Pull request.

InfraCloud Srcmesh

License

Fission is licensed under the Apache License 2.0 - see the LICENSE file for details

fission.io's People

Contributors

aniket762 avatar blackfly19 avatar dependabot[bot] avatar dk03051996 avatar dssudake avatar endersonmenezes avatar gauravgahlot avatar kanuahs avatar life1347 avatar melrom avatar mschneider82 avatar neha-gupta1 avatar nikhilsharmawe avatar rcmorano avatar runitmisra avatar sanketsudake avatar saurabh3460 avatar shanep9 avatar shubhadar avatar shubham-bansal96 avatar soamvasani avatar spikatrix avatar swuecho avatar techmaharaj avatar timirahj avatar tri0l avatar ukthapa avatar vishal-biyani avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

fission.io's Issues

add version

**Describe something that is unclear or not documented and needs a documentation update
in Logs with loki catalog, helm install loki stack, and provide a config.yaml。but not specified a version, so i follow tutorial document get a lots of bug, the loki-grafana secrets is not have grafana config key, since the loki-grafana-437cxx pod is notReady status.
the config.yaml is not fine for latest version,it cant get response for scarpes pod, the pod is error with **Readiness probe failed: HTTP probe failed with statuscode: 500**. in actually, im so unaided.

Doc issue: Packaging source code

example env create contains --poolsize argument but not --version, so poolsize is ignored.

fission env create --name pythonsrc --image fission/python-env:latest \
                     --builder fission/python-builder:latest \
                     --mincpu 40 --maxcpu 80 \
                     --minmemory 64 --maxmemory 128 \
                     --poolsize 2

should read:

                     --poolsize 2 --version 3

Add links to examples on Github

The documentation has a lot of example code. Most examples are not complete, some of it are (incomplete) spec files, other examples are JavaScript or Python code. I find it helpful to have fully working examples so I don't have to piece bits of documentation example code together for a working example.

Having all source code for an function in the docs is less then ideal (hence why all examples are incomplete). I would propose to have a link to the file on Github when there is a code example so the complete file and accompanying files for a function can be looked at.

Here are examples by Google.

Fixing Python Functions Documentation

Fission's Python documentation doesn't talk about customizing the image on this page. As a developer when I'm following this guide, I need to know that in some scenarios, I need to use a custom image without which the function will not execute.

There has a to be a note on this page that mentions these scenarios, so that the developer can follow the guide accordingly and setup the environment.

Deciding pool size for poolmgr executortype

We need to add some documentation which helps to decide what is the right value for poolsize in poolmgr executortype.
If the poolsize is less than required, we get errors like error posting to getting service for function: context deadline exceeded if there are many requests.
If the poolsize is more than required, we will end up utilizing more resources.

Add examples in multiple languages

Fission supports a lot of languages, but the documentation has examples in a single language. The introduction to writing a function has an example in JavaScript, while the section about configmaps has an example in Python.

I would propose to have examples in all the available languages. Google Developer Documentation has a great example with Firebase Cloud Firestore. Functions and Fission are new concepts for lots of developers, having documentation with in the language they are familiar with, makes it a bit easier to get started with Fission.

Templates already have support for it. It is for example used on the installation guide page.

mqtrigger debugging steps

mqtrigger is not able to pick the messages from the configured Kafka Cluster, even though the Kafka Cluster is up and running fine and other clients can produce the message to that Kafka Cluster.
We dont see any logs in that pod also so it becomes increasingly tough to debug the mqtrigger.
We should have some steps documented in this page that explain how can we debug if mqtrigger is not able to pick the Kafka messages and call fission function.

python3 docs clone path is wrong

Doc Page: https://fission.io/docs/usage/languages/python/#modifying-the-runtime-environment-image

The git clone directory is out-of-date. Pulling the fission repo will not give you the environments sub-directory as indicated in the docs. Instead, users should pull the environment repo.

Proposed changes:

  • Change git clone https://github.com/fission/fission to git clone https://github.com/fission/environments
  • Change cd fission/environments/python to cd environments/python

Link, Formatting issues on Architecture, Concept pages

Some areas in the documentation that can be improved based:

General Issues

  • Architecture sidebar menu is missing optional components, it should list all the core and optional components, currently it shows only the core components.
  • https://fission.io/docs/concepts/ -> Environment -> can change the anchor text from "here" to "Fission Environments". Something like: Check out our complete list of Fission Environments.
  • We should add a full architectural diagram of Fission on the Architecture page - will add more value to the page
  • The text "Brief Intro", "Diagram" on every page should be removed, provides no extra info to the user nor for SEO

Individual Page Specific changes

  • Controller: The text "Kubernetes CRDs" - can be linked to https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/ - will provide better context to the reader
  • Executor: PoolManager, NewDeploy - link to the relevant places on the page
  • Function Pod: Fetcher & Environment Container - descriptions can be moved above the image
  • Builder Manager: the page mentions "fission-builder" namespace, however we don't have any page listing all the namespaces that fission creates. We can create a new page with all fission namespaces - something like this -> https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#viewing-namespaces
  • Builder Pod: Fetcher & Builder container - descriptions can be moved above the image
  • StorageSVC: can rename to Storage Service which has better readability and replace the same at all occurrences
  • Logger: DaemonSets - can link to https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - - will provide better context to the reader
  • Logger: links can be updated, for eg.: under Function Pod, we mention StorageSVC, but we have not mentioned it earlier. Hence we should link this to StorageSVC page or provide a small intro here.
  • Kubewatcher: "Kubewatcher link to issue #64" - either add the link to the issue or remove the text.

OpenAPI documentation

The documentation needs to clearly lay out how to get the API Documentation using OpenAPI and how to access it from a client such as curl or postman

Ham menu in the website not functioning

So, I was going through the fission.io website today when I came across this issue.

The Ham menu doesn't work when clicked. I'm attaching a clip of the issue below.

I'm on a Ubuntu 20.04 LTS version

Screencast.2021-05-30.20.41.43.mp4

cannot run hugo server

Documentation URL: contributing : https://github.com/fission/fission.io/blob/11c77d5b84a9ae31e61e1aa5a174ccbaba6d2099/CONTRIBUTING.md

go1.15.15go1.15.15 npm 7.5.2
Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2021-07-18T09:31:51Z (debian 0.80.0-6+b5)

Error: add site dependencies: load resources: loading templates: "/home/steve/projects/fission.io/layouts/shortcodes/readfile.html:27:1": parse failed: template: shortcodes/readfile.html:27: unexpected unclosed action in parenthesized pipeline

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

$ go version
go version go1.15.15 linux/amd64
$ hugo version
Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2021-07-18T09:31:51Z (debian 0.80.0-6+b5)
$ npm --version
7.5.2

$ hugo server
Error: add site dependencies: load resources: loading templates: "/home/foo/projects/fission.io/layouts/shortcodes/readfile.html:27:1": parse failed: template: shortcodes/readfile.html:27: unexpected unclosed action in parenthesized pipeline

Add PWA support for the application with offline support

A progressive web application is a type of application software delivered through the web, built using common web technologies including HTML, CSS, and JavaScript. It is intended to work on any platform that uses a standards-compliant browser, including both desktop and mobile devices. Progressive Web Apps (PWAs) allow developers to deliver an app-like experience to the user.

I would like to work on the issue, in case you don't want PWA support feel free to close the issue! Looking forward to working contribute to one of the best Org out there ⚡️

Improve documentation of each environment

Currently the documentation for environments varies from environment to environment. Most of the environments lack info on common questions users have: How do I setup this environment? Which version should I use? What is the latest version of environment? Does it have a builder? Does it support functionality X?

We should ensure that the documentation is sufficient enough to help the user with these questions, which otherwise confuse the user at runtime and lead to pressure on the support.

I think it would help if we have some sort of a template or checklist what should be in the environment documentation. From the top of my head we should consider it to constitute of the following should be in there:

  • Cut-and-paste examples of most recent version
  • A table indicating what functionality is supported (builder, V2, V3, etc)
  • Links to examples
  • Build instructions
  • Some text on the functions./usage: how to set response code, how to get headers, body, and query params. What happens on exceptions?
  • Known issues/FAQ
  • Changelog on changes made to the environment

Switch to algolia search

The current search on site is not very intuitive with GCS search, we should try to switch to algolia instead.

We also need to check if we can be enabled autocomplete search.

Docsy Hugo also provides an offline search option, need to check if it can work for us.

New contributor experience needs improvement

  • Create docs on various modules
    • Draw some sequence diagrams of common flows (e.g. builder, function cold start, spec apply, etc.)
  • Label issues that are good for beginners: easy and low-enough priority. Avoid working on them so other people can.
  • Take another look at contributors guide and see what needs to be improved.

Metrics with Prometheus (Documentation)

for this portion of the documentation for installing prometheus montioring,

"Install Prometheus and Grafana with the release name fission-metrics."
should the directions say for the release name to be "prometheus" instead?

Packaging source code

If I am doing just as described in docs then after execution of this command

fission package create --sourcearchive demo-src-pkg.zip --env pythonsrc --buildcmd "./build.sh"

I am getting following error:
Build Logs:
error building source package: error starting cmd: fork/exec ./build.sh: no such file or directory
Error building deployment package: Internal error - 500 Internal Server Error
However running same command without passing --buildcmd option everything is working fine

Blog on adding a language to Fission

I'd love to see a blog on how to add a language to Fission. I'm trying to get this working with SBCL (Steel Bank Common Lisp) and would to see a good blog post on how to add something like SBCL into Fission.

observability/opentelemetry jaeger installation wrong urls

In the observability/opentelemetry installation commands for the jaeger-operator installation are provided.
From the current documentation

kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/crds/jaegertracing.io_jaegers_crd.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/service_account.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/role.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/role_binding.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/operator.yaml

At github jaegertracing/jaeger-operator/master a deploy directory isn't there anymore. In the latest tag where the deploy directory is available is v1.28.0.

I accommodate this for me as the following :

JAEGER_VERSION=v1.28.0
kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/$JAEGER_VERSION/deploy/crds/jaegertracing.io_jaegers_crd.yaml # <2>
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/$JAEGER_VERSION/deploy/service_account.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/$JAEGER_VERSION/deploy/role.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/$JAEGER_VERSION/deploy/role_binding.yaml
kubectl create -n observability -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/$JAEGER_VERSION/deploy/operator.yaml

The jaeger-operator install documentation https://www.jaegertracing.io/docs/1.29/operator/ points to a version 1.29 which not exits on the tags on github. The jaeger doc shows the same commands the in the fission docs provided.

Website not available

Describe the bug

Currently, I can not access the fission.io website. There may be something wrong with the certificates.

To Reproduce

Visit the fission.io website.

Expected result

It would be nice to navigate the site again and read the documentation, etc.

Actual result
Currently, I get an connection error within firefox and chrome.

Typo on Primary Website Image

Primary marketing image on https://fission.io/ has a typo and looks extremely unprofessional. Specifically, terminal line two.

Line: fission function create --funtion
Solution: --funtion should be spelled as --function

Source Images on GitHub:

https://github.com/fission/fission.io/blob/514835fd5a713557857ab6e4c6bbdd3781bbdf76/static/images/body-img-1.svg

https://github.com/fission/fission.io/blob/514835fd5a713557857ab6e4c6bbdd3781bbdf76/static/images/body-img-1.png

Use of podspec in new environment spec

It used to be possible to apply certain modifications (specifically, in this case, nodeSelector clauses - being able to use those is essential in mixed-architecture clusters to ensure that correct binary images and functions are supplied to each node, or in clusters where functions require particular peripheral hardware not present on all nodes) to the builder and runtime pods created by fission, in this format:

apiVersion: fission.io/v1
kind: Environment
metadata:
  creationTimestamp: null
  name: binary-amd64
  namespace: default
spec:
  builder:
    command: build
    image: fission/binary-builder:v1.11.2
    podspec:
      nodeSelector:
        kubernetes.io/arch: amd64
  imagepullsecret: ""
  keeparchive: false
  poolsize: 1
  resources: {}
  runtime:
    image: fission/binary-env:1.11.2
    podspec:
      nodeSelector:
        kubernetes.io/arch: amd64
  version: 3

But now doing so fails, since the containers: element is mandatory in the new Environment CRD. Unfortunately, while this much is discoverable from the documentation at https://doc.crds.dev/github.com/fission/fission/fission.io/Environment/v1 , it's not at all obvious how to use the podspec clause (and its new mandatory element) to achieve what the above used to, or indeed to get a working spec at all. (I have not yet managed it.)

Could we have an example showing how to use podspec, and possibly also some common usages of it in the primary documentation?

RBAC Permissions for Developers/Users

How do I allow users with the "devs" role to create functions without giving them full admin rights? What are the resources and verbs I have to use for the fission namespace in order to grant access to use fission in our cluster? It would be great to have an example in the documentation. I am sure I am not the only one who has asked this question.

Monitoring Fission logs with Grafana Loki chart updation

Hi, Please change below url as it has been deprecated for Loki
helm repo add grafana https://grafana.github.io/helm-charts/
helm install -n monitoring --create-namespace loki grafana/loki-stack

For grafana installation, we should use official helm repo
helm repo add grafana https://grafana.github.io/helm-charts/
helm repo update
helm upgrade --install grafana grafana/grafana --create-namespace -n grafana
Accessing Grafana UI
To get login credentials of grafana
Default user is “admin”
For password, run the below command

kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-
password}" | base64 --decode

To access UI, run below command

kubectl port-forward svc/grafana -n grafana 3000:80

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.