Git Product home page Git Product logo

docs.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 an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. With Fission, developers can easily create and deploy serverless functions that can be triggered by a variety of events, such as HTTP requests, messages from a message queue, or scheduled tasks.

Fission provides a simple, easy-to-use interface for developers to create serverless functions in their language of choice, without having to worry about the underlying infrastructure. The framework also offers automatic scaling, so functions can scale up or down based on demand, without any additional configuration.

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

docs.fission.io's People

Contributors

alenros avatar bhavin192 avatar blackfly19 avatar davidsmf avatar draghuram avatar erwinvaneyk avatar gauravgahlot avatar girishg4t avatar jetalone85 avatar kbbqiu avatar life1347 avatar neverbehave avatar orfeas0 avatar ramonpires avatar rcarle3911 avatar realharshthakur avatar rickbau5 avatar sahil-lakhwani avatar saintmalik avatar sanketsudake avatar smruthi2187 avatar soamvasani avatar swuecho avatar therahulbhati avatar timirahj avatar vadasambar avatar vasergen avatar vcillusion avatar vishal-biyani avatar viveksinghggits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs.fission.io's Issues

Create Function > Building functions from source: build.sh permission deined

When trying the Python packaged example from the docs, I got the following error:

=== Build Logs ===command=./build.sh
env=[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=python-11726-^C2.312372,"logger":"builder","caller":"builder/builder.go:124","msg":"error building source package","error":"error starting cmd: fork/exec ./build.sh: permission denied","errorVerbose":"fork/exec ./build.sh: permission denied\nerror starting cmd\ngithub.com/fission/fission/pkg/builder.(*Builder).build\n\t/go/src/pkg/builder/builder.go:196\ngithub.com/fission/fission/pkg/builder.(*Builder).Handler\n\t/go/src/pkg/builder/builder.go:121\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2375\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337","stacktrace":"github.com/fission/fission/pkg/builder.(*Builder).Handler\n\t/go/src/pkg/builder/builder.go:124\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2375\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878"}
{"level":"info","ts":1582450652.3126423,"logger":"builder","caller":"builder/builder.go:91","msg":"build request complete","elapsed_time":0.001539051}
{"level":"info","ts":1582450652.3133094,"logger":"builder","caller":"builder/builder.go:110","msg":"builder received request","request":{"srcPkgFilename":"py-packaged-b04496d5-2e8d-4909-bc8c-905bf363f012-sknlaf","command":"./build.sh"}}
{"level":"info","ts":1582450652.3133872,"logger":"builder","caller":"builder/builder.go:112","msg":"starting build"}

Fixed it by running chmod +x build.sh before zipping the files.

Is this an expected behavior? If so I can create a PR to fix the docs.

Cheers

Documentation Revamp Phase 2

Copied from fission/fission#499

Documentation was revamped as part of fission/fission#496 Though there are some areas which require more detailed explanation and some areas are missing in that version. This issue will act as a placeholder for next phase of documentation.

  • Creating a custom environment
  • Creating a custom builder environment/image
  • K8S Watch Triggers examples and concepts
  • Architecture and explanation of various components (Executor, Controller, etc.)
  • Examples of executors and their combinations and how behaviour changes based on various parameters
  • YAML specs for functions
  • Istio Integration
  • Container Specs
  • Change README.md at the root of the project to have only basic info and point to docs
  • In the context of the package, also talk about archives

URL scheme

The URL scheme for the docs has some disadvantages:

  1. Full Version in URL means docs move often
  2. Full version in URL means there are a lot of duplicates, confusing google
  3. Links that people save or put into blogs/tweets/forum comments stay pointed at old versions. This is especially bad with the install page, people are still installing 0.6.0 because someone printed the link in a book.

We should follow this convention instead:

  1. have only one version of every page and constantly update it.
  2. the url would remain constant and would not include the version number
  3. the core documentation would always up to date- there would be only one.
  4. we can add a comment to the top/footer of each page that "this relates to version XX, with a link to installing it, if needed"
  5. If it's necessary to have docs for old versions - we can include a page that reads "see the documentation for previous versions of fission"- it'll show a list of links- linking to the individual docsfor old versions
  6. these docs "directories" have to be set to "noindex" in the metadata
  7. we should redirect all the old versions of all the doc pages throughout all the old versions to the new version in item #2 to avoid breaking existing stuff

Contributing docs need to add step about Helm Chart dependencies

As a contributor if you deploy the helm chart form source code repo, it does not work and you get an error:

Error: found in requirements.yaml, but missing in charts/ directory: prometheus

This is because you need to update prometheus dependency before you can install. We either need to document this or find a good way to download automatically:

$ cd charts/fission-all/
$ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):
	Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: getsockopt: connection refused
...Successfully got an update from the "fission-charts" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading prometheus from repo https://kubernetes-charts.storage.googleapis.com
Deleting outdated charts

Prometheus + Fission instructions

Link to install instructions for Prometheus (nothing fission fission specific here).

Document our metrics and what they mean; show some sample queries.

Document improvement for users and contributors

  1. Draw some architecture/diagram graphs to explain how fission works
  2. Advanced session/tutorial, like how to set up the environment variable .e.g
  3. Check and revise existing documents to make sure its easy to understand for the newcomer.

How to help translating

I want to learn fission by reading through docs, and why not translate them at the same time? so I fork and create a branch translation-zh-hans and PR? or how do you want i18n managed?

Workflows version update

Workflows version in the install instructions is still 0.2.0. This probably leads to lots of people still using 0.2.0.

Manual volume provisioning

User guide on manual volume provisioning for Fission in case there is no dynamic volume provisioner available.

More complex examples

Currently, most of the examples we have are a simple source file for a function. In the real world - things are more than a file. We need a few examples of main languages like Go, Python where we show a non-trivial example working as a function.

Autoscaling doc issues

Autoscaling usage doc issues:

  1. Small mincpu used. Even though it's used for forcing autoscaling in a demo, people may take it as a recommendation. Suggest simply removing mincpu/maxcpu settings and leaving them as the defaults.
  2. k used as an alias for kubectl
  3. It should mention somewhere that the HPA takes > 1 minute to start autoscaling and N minutes to scale down (what is N? also 1?)

Ordering of listing in document browser(left pane)

Our listing should be in the order

  • Installation
  • Using Fission
  • Concepts
  • Triggers
  • Environments
  • Examples
  • Troubleshooting
  • FAQs
  • Contributing
  • Release highlights

We need to compress the existing listing and also need to ensure it is in order for simplicity of browsing or seems natural to the new user.

Access to router in Docker for Desktop works!

Hey there, how are u doing?

I'm using K8S from Docker from Desktop and, after creating a route for a function, the command curl localhost:<port>/<url> just works!

In the docs it says it had a bug and instructs the user to do a port-forward, which maybe is not necessary anymore?

Here's my Docker for Desktop version:
image

If confirmed, I can work on a PR to remove or adapt the content of the doc 💃

Cheers!

Current URL should point to latest

Currently if you go to website and navigate to any page, the URL has current version's number in the URL:

https://docs.fission.io/0.7.0/usage/executor/

Instead of this, it will be better to have latest in the URL so the if user bookmarks and visits later user will be redirected to latest version's page of the documentation.

https://docs.fission.io/latest/usage/executor/

Not sure if this is possible, but nice to have.

More Executors examples

Examples of executors and their combinations and how behaviour changes based on various parameters

Document time trigger retry behaviour

Timer trigger retries a function when it fails. Today it retries up to 10 times with an exponential delay starting at a half a second.

We should document this behaviour, including how to tune it (see fission/fission#660)

We should also encourage people to test their functions with fission fn test before setting up a timer. Digging through timer logs is inherently more difficult than having an error happen while you're still setting things up.

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.