Commit Graph
388 Commits
Author SHA1 Message Date
Soam VasaniandGitHub 2f3ff18551 V2 types and TPR (#266)
This changes the core fission function, environment and trigger types. It also changes Fission's storage to use ThirdPartyResources.

 - Functions are now specified by packages. Functions can also have both source and deployment packages. A package can be specified by a literal, or by a URL.
 - Environments have a build and runtime component.
 - Triggers reference functions by a FunctionReference. This is a layer of indirection between triggers and functions, and will allow things like incremental function upgrades in future releases.

See Documentation/wip/env-v2.md for design discussion about points 1 and 2.

Changes:

* V2 Types

All types now have a spec, following the pattern of K8s objects.

Functions now have source and deployment packages. A Package can be
specified by literal, or by URL.

Environments now have a builder and runtime component.

All triggers use a new FunctionReference to specify the function. This
for now only uses a function name, but in the future can be extended
to be more flexible.

A new FunctionLoadRequest type is added for specialization requests to
the environment runtime.

* TPR types, TPR init code, and a "fission client"

Implements TPR types using the spec types in fission/types.go.

Adds code for adding creating TPR types, and convenient types for crud
operations on each of our resource types.

Adds code for connecting to K8s API and configuring a REST client with
fission types set up.

* Change old stateful controller into a thin apiserver

This apiserver is now simply a stateless api layer on top of the TPR
types. At the moment it doesn't do anything that couldn't be done by
simply talking to the TPR types. In the future we can have better
validation and potentially some higher level APIs (like versioning for
example) in here.

* Split controller client into files and update for v2 types.

* Update CLI for v2 types.

As far as possible we keep the CLI flags the same. We'll have to add
flags for source/deploy packages and builder/runtime
environments. That will come in the next change.

* Update poolmgr and fetcher for v2 types.

Also adds a poolmgr_test.

* Update router for new types.

Also adds a function reference resolver, which separates out the job
of resolving a FunctionReference to a function.

* Update kubewatcher and timer for v2 types.

* Update Message Queue trigger type for v2 types.

* Minor odds and ends.

* Fission bundle CLI updates

Remove controllerUrl flag, since we don't need it any more.

* Remove etcd deployment (replaced by storing state in TPR)

Also update the poolmgr commandline, and use an env var for the
fetcher image URL.

* Explicit ChecksumType and consts

* Clarify separation of environment interface types
2017-08-05 01:18:30 -07:00
Ta-Ching ChenandSoam Vasani 0a2c308b40 Update/Add fission-core & fission-all helm charts (#239)
Improve fission helm chart; split it into "fission core" and "fission all". fission-core is the minimal install, and fission-all will have all the bells and whistles.

* Update/Add fission-core & fission-all helm charts
* Fix incompatible types for comparison
* Add message queue trigger
* Rename openshiftRBAC to openshift
* Update documentation & comments
* Fix logger & kubewatcher failed to access kubernetes resource due to RBAC
2017-07-31 14:10:26 -07:00
Erwin van EykandSoam Vasani 9138937249 Binary Environment (#256)
Adds a fission environment for arbitrary linux binaries.
2017-07-26 12:29:54 -07:00
Ta-Ching ChenandSoam Vasani e1ec460da8 Fix nats trigger replies message to non-existing resptopic (#260) 2017-07-26 11:43:23 -07:00
Ta-Ching ChenandSoam Vasani b052e67e9f Fix logger prints wrong log (#263) 2017-07-20 13:44:23 -07:00
Ta-Ching ChenandSoam Vasani 0412c9a876 Fix unstoppable kubewatcher (#208)
Fix a bug due to which watches could never be stopped; simplify control flow a bit.
2017-07-10 16:01:48 -07:00
S. Brent FaulknerandSoam Vasani f285cdfd1c Ruby logger (#251)
* Add logger for ruby environment

* Update readme and example for ruby logger

* ruby-env: log load time for user code
2017-07-07 18:05:11 -07:00
S. Brent FaulknerandSoam Vasani 864fe1501f fix typo funtion -> function (#252) 2017-07-07 09:37:35 -07:00
Soam Vasani f4c32d8328 Update install guide links to latest release 2017-07-05 17:49:40 -07:00
Ta-Ching ChenandSoam Vasani fb29f897fe Add message queue trigger support (#218)
Adds support for message queue triggers based on the NATS-Streaming message queue.

This lets the user map a queue topic to a function, and optionally send the function's response into another queue topic.

The message queue trigger manager is designed to be message queue independent, so we should be able add support for more queues by adding implementations for the relatively simple mqtrigger.MessageQueue interface.
2017-07-05 17:19:58 -07:00
S. Brent FaulknerandSoam Vasani 77afb2f240 include path parameters in params hash for ruby environment (#249)
* include path parameters in params hash for ruby environment

* Improve code organization and documentation for ruby environment.

* Document Ruby examples
2017-07-04 23:44:18 -07:00
Soam Vasani f6bb059141 Fix curl command in install instructions (#248) 2017-07-03 16:29:09 -07:00
Soam Vasani 8d621ba43b Environment v2 interface doc (wip) 2017-06-30 09:23:35 -07:00
Soam Vasani 81aab8c9c1 release helper script 2017-06-28 15:50:25 -07:00
Soam Vasani dfe0c207f1 add sections to cli download 2017-06-28 15:07:23 -07:00
Soam Vasani 412901b251 Install docs improvements
Keep install docs in one place INSTALL.md instead of two.

Use github releases for all YAMLs and CLIs. This has a few advantages:
 (a) it makes releasess more transparent
 (b) all yaml/cli files are transferred over HTTPS
 (c) CLIs and YAMLs being from the same release ensures that people
     always get compatible versions (we will still occasionally break
     api compatibility, until beta)
2017-06-28 15:00:42 -07:00
Ta-Ching ChenandSoam Vasani bafe196bb3 Fission update must require at least one change to function (#241) 2017-06-26 22:22:09 -07:00
Soam Vasani 1089106c0a Remove image tags from yamls 2017-06-21 00:09:31 -07:00
yang qfandSoam Vasani d451b58f40 Fix creation of redundant pods on heavy load cold start (#232)
Modifies function specialization so that concurrent requests for the same function cause only one pod to be created.
2017-06-19 18:56:38 -07:00
Soam Vasani 5604f0b773 Fix image version in fission-openshift.yaml 2017-06-17 21:14:27 -07:00
yang qfandSoam Vasani 01bc1ecb8f Retrieve URL params in functions (#226)
Addresses #158. Adds URL params into HTTP headers. A URL param named `KEY` with the value `VALUE` in the actual URL will appear as the header "X-Fission-Params-KEY: VALUE" in the fission function.
2017-06-17 21:12:12 -07:00
yang qfandSoam Vasani bbf68eca42 Aggregate tap service request in interval (#229)
The poolmgr client now aggregates successive tapService() calls and sends them to the poolmgr service every 5 sec, instead of sending them immediately.
2017-06-17 20:58:10 -07:00
Ta-Ching ChenandSoam Vasani cc66b245d0 Fix http response body not closed correctly, return immediately on error (#210)
* Fix controller timer handler not return when error occurred

* Fix controller not close http response correctly

This PR aims to fix controller not close response correctly. Also, I’ve check all over the project there is no more resource leak issues exist after this patch.

* Fix controller not return immediately when error occurred

* Sort import
2017-06-17 13:10:54 -07:00
S. Brent FaulknerandSoam Vasani a2c7f5fb28 Add Ruby environment (#223)
Adds a Ruby environment and examples.
2017-06-17 10:48:05 -07:00
Soam VasaniandGitHub 23a10691b0 Specify full golang version in Dockerfiles and build helper script (#227)
Addresses #222.

Plugins and the binaries loading them need to be built with the exact
same go version.

Also update README instructions.
2017-06-09 15:36:09 -07:00
Niko KurttiandSoam Vasani f6915765c0 Fix s/Sirupsen/sirupsen/ for logrus (#224)
Fix s/Sirupsen/sirupsen/ for logrus
2017-06-08 13:44:07 -07:00
Ta-Ching ChenandSoam Vasani 913207ae57 Fix pool contains wrong environment metadata (#221)
The generic pool manager creates a generic pool with the reference of environment metadata. Since the reference is address of loop variable, so the content of metadata will be replaced with the last element of envs. So pool manager sets up logging with wrong env.
2017-06-08 11:11:58 -07:00
Soam VasaniandGitHub 30645a208e Update golang instructions 2017-06-07 10:52:11 -07:00
Javier CastellanosandSoam Vasani b2ac9e738d Added support for pods and replication controllers to watchers (#216) 2017-06-01 10:49:57 -07:00
Mark PeekandSoam Vasani 9ea62a01a0 Fix two links in Roadmap doc (#213) 2017-05-31 11:32:32 -07:00
Ta-Ching ChenandSoam Vasani 9162f5d3ea Print log when timetrigger is removed (#209) 2017-05-30 14:21:41 -07:00
Ta-Ching ChenandSoam Vasani 9669f422af Retrieve function logs from controller (#207)
Establish a proxy server from the controller to the log database.

Redirect query commands send from client to database then proxy back the db response.

Use parameter binding instead of fmt.Sprintf to prevent SQL injection.
2017-05-30 14:19:22 -07:00
Soam Vasani 58a3e1af29 Roadmap doc links 2017-05-18 15:21:36 -07:00
Soam Vasani db6b617ea4 Roadmap doc formatting 2017-05-18 15:04:01 -07:00
Soam Vasani 43806ccf0f Roadmap.md for an overview of roadmap and areas 2017-05-18 12:17:33 -07:00
Quinn MurphyandSoam Vasani cefbe2f187 Adding fission-rbac.yml for (#183)
Set up RBAC role bindings to allow fission to create pods in the fission-function namespace.
2017-05-17 16:27:10 -07:00
yang qfandSoam Vasani 7ea791a960 Add Time Trigger API and client (#153) (#161)
This change adds a timer trigger API, client, and implementation.  Users can trigger a function with a cron-compatible string. 

This change also moves the publisher interface and webhook-based publisher implementation out of kubewatcher and into a separate `publisher` package.
2017-05-17 15:13:56 -07:00
gonrialandSoam Vasani d983256b27 Modify the stock example to show how to change the Content-Type (#124) 2017-05-12 15:36:12 -07:00
yang qfandSoam Vasani d03d23e107 Move fission-ui intro to Install.md (#159) 2017-05-09 11:36:07 -07:00
mgandSoam Vasani 903e7334d8 Update INSTALL.md with install instructions for openshift (#179) 2017-04-27 14:20:16 -07:00
Fernando AlvarezandSoam Vasani 1ada581d14 Add OpenShift support (#107) (#168)
Adds the minimal OpenShift components needed to deploy Fission with the
same functionality as with Kubernetes, using only a deployment template
file (fission-openshift.yaml). No need of objects creation via CLI.

Update deployment instructions in README.md
2017-04-27 14:19:32 -07:00
Ashley PenneyandSoam Vasani 23647bb671 Make the chart work with helm 2.2 (#170)
Primarily this involved removing the release namespace, which is
controlled by helm.  If you want resources in a namespace you set
--namespace= with helm install, anything else leaves helm unable
to properly manage the resources.

I think the functions namespace won't work either on a delete.
2017-04-27 14:17:30 -07:00
Soam Vasani 62481106f3 update guestbook example css 2017-04-25 12:09:19 -07:00
Soam Vasani 3b873b869c Update fission.yaml to 3/28 image 2017-04-24 08:25:38 -07:00
syassamiandSoam Vasani 9d4b6ceda7 Lighten up the python3 base image (alpine) (#171)
Saves 241 MB from the base example image, bringing things down to 242MB in total.
2017-04-21 11:15:52 -07:00
Soam Vasani 1d2b2f2432 Work around 'too old resource version' 2017-03-28 12:42:59 +02:00
Soam Vasani 885212c203 Better error checking in watch restarts 2017-03-28 12:06:07 +02:00
Soam Vasani 0aa9b5dc27 Track resourceVersion from event objects 2017-03-28 10:01:11 +02:00
Soam Vasani 97ada3f654 Pass last resource version to restart watch 2017-03-28 10:01:11 +02:00
Soam Vasani a4fbdeb264 Restart watches when they stop unexpectedly 2017-03-28 10:01:11 +02:00