Update docs-site

This commit is contained in:
Ta-Ching Chen
2018-01-23 13:27:10 +08:00
parent 8df520721c
commit 01bcfad44a
428 changed files with 6789 additions and 29646 deletions
@@ -0,0 +1,99 @@
---
title: Fission
weight: 1
---
Fission: Serverless Functions for Kubernetes
============================================
[fission.io](http://fission.io) [@fissionio](http://twitter.com/fissionio)
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.
### 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.
Fission Concepts
----------------
A _function_ is a piece of code that follows the fission function
interface.
An _environment_ contains the language- and runtime-specific parts of
running a function.
The following environments are currently available:
| Environment | Image |
| ------------------------------------ | ------------------------- |
| Binary (for executables or scripts) | `fission/binary-env` |
| Go | `fission/go-env` |
| .NET | `fission/dotnet-env` |
| .NET 2.0 | `fission/dotnet20-env` |
| NodeJS (Alpine) | `fission/node-env` |
| NodeJS (Debian) | `fission/node-env-debian` |
| Perl | `fission/perl-env` |
| PHP 7 | `fission/php-env` |
| Python 3 | `fission/python-env` |
| Ruby | `fission/ruby-env` |
You can also extend environments or create entirely new
ones if you want. (An environment is essentially just a container
with a webserver and dynamic loader.)
A _trigger_ is something that maps an event to a function; Fission
supports HTTP routes as triggers today, with upcoming support for
other types of event triggers, such as timers and Kubernetes events.
Usage
-----
```bash
# Add the stock NodeJS env to your Fission deployment
$ fission env create --name nodejs --image fission/node-env
# A javascript one-liner that prints "hello world"
$ curl https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js > hello.js
# Upload your function code to fission
$ fission function create --name hello --env nodejs --code hello.js
# Map GET /hello to your new function
$ fission route create --method GET --url /hello --function hello
# Run the function. This takes about 100msec the first time.
$ curl http://$FISSION_ROUTER/hello
Hello, world!
```
See the [examples](examples) directory for more.
@@ -1,6 +0,0 @@
## Fission Documentation
* [Installation guide](install)
* [Upgrade guide for v0.3 to v0.4](upgrade-from-v0.3)
@@ -0,0 +1,56 @@
---
title: "Compiling Fission"
date: 2017-09-07T20:10:05-07:00
draft: false
weight: 1
---
[You only need to do this if you're making Fission changes; if you're
just deploying Fission, use fission.yaml which points to prebuilt
images.]
You'll need the `go` compiler and tools installed, along with the
[glide dependency management
tool](https://github.com/Masterminds/glide#install). You'll also need
docker for building images.
The server side is compiled as one binary ("fission-bundle") which
contains controller, poolmgr and router; it invokes the right one
based on command-line arguments.
To build fission-bundle: clone this repo to
`$GOPATH/src/github.com/fission/fission`, then from the top level
directory (if you want to build the image with the docker inside
minikube, you'll need to set the proper environment variables with
`eval $(minikube docker-env)`):
```
# Get dependencies
$ glide install
# Build fission server and an image
$ pushd fission-bundle
$ ./build.sh
```
You now need to build the docker image for fission. You can use
`push.sh` and push it to a docker hub account. But it's easiest to use
minikube and its built-in docker daemon:
```
$ eval $(minikube docker-env)
$ docker build -t minikube/fission-bundle .
```
Next, install fission with this image on your kubernetes cluster using the helm chart:
```
$ helm install --set "image=minikube/fission-bundle,pullPolicy=IfNotPresent,analytics=false" charts/fission-all
```
And if you're changing the CLI too, you can build it with:
```
# Build Fission CLI
$ cd fission && go install
```
@@ -1,7 +1,8 @@
---
title: "Fission Installation Guide"
title: "Installation Guide"
date: 2017-09-07T20:10:05-07:00
draft: false
weight: 20
---
Welcome! This guide will get you up and running with Fission on a
@@ -1,7 +1,7 @@
---
title: "Kubernetes Quick Install"
date: 2017-09-07T20:10:05-07:00
draft: false
weight: 10
---
This is a quick guide to help you get started running Kubernetes on
@@ -0,0 +1,12 @@
---
title: "Upgrade"
date: 2017-09-07T20:10:05-07:00
weight: 30
---
### From v0.1 to v0.2.x
* [Upgade guide](upgrade-from-v0.1)
### From v0.3 to v0.4.x
* [Upgrade guide](upgrade-from-v0.3)
@@ -1,7 +1,8 @@
---
title: "Upgrading from Fission v0.1 to v0.2.x"
title: "Upgrading from v0.1 to v0.2.x"
date: 2017-09-08T16:26:29-07:00
draft: false
weight: 31
---
## TL;DR
@@ -1,7 +1,8 @@
---
title: "Upgrading from Fission v0.3 to v0.4.x"
title: "Upgrading from v0.3 to v0.4.x"
date: 2017-11-04T03:38:29+08:00
draft: false
weight: 32
---
## Introduction