Commit Graph
389 Commits
Author SHA1 Message Date
Soam VasaniandGitHub 7d83f5713a Kubernetes access for Travis CI tests (#272)
Sets up Travis CI tests to use a Kubernetes cluster on GKE. All tests have access to $KUBECONFIG which points at a kubeconfig file with credentials to a cluster.

I had to skip the poolmgr unit test because it currently assumes NodePort services; that will be fixed in another change.

Also, because some of the tests don't work properly in parallel, I've ended up reducing the concurrency to 1. If this becomes a problem we'll have to fix the tests, but for now I don't mind just waiting a few minutes longer.
2017-08-08 17:01:34 -07:00
Soam VasaniandGitHub e238776bf7 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 37aa266a4d 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 85983c91cd Binary Environment (#256)
Adds a fission environment for arbitrary linux binaries.
2017-07-26 12:29:54 -07:00
Ta-Ching ChenandSoam Vasani a8fc7a7029 Fix nats trigger replies message to non-existing resptopic (#260) 2017-07-26 11:43:23 -07:00
Ta-Ching ChenandSoam Vasani 2036d80778 Fix logger prints wrong log (#263) 2017-07-20 13:44:23 -07:00
Ta-Ching ChenandSoam Vasani 46ff55ab49 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 51c84f3cfc 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 fe4015fab2 fix typo funtion -> function (#252) 2017-07-07 09:37:35 -07:00
Soam Vasani 22e0c10d07 Update install guide links to latest release 2017-07-05 17:49:40 -07:00
Ta-Ching ChenandSoam Vasani e4fe007838 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.
nightly20170705
2017-07-05 17:19:58 -07:00
S. Brent FaulknerandSoam Vasani 0fd60eab3b 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 ae87c0ea37 Fix curl command in install instructions (#248) 2017-07-03 16:29:09 -07:00
Soam Vasani 55651d49e0 Environment v2 interface doc (wip) 2017-06-30 09:23:35 -07:00
Soam Vasani 1f0ca47550 release helper script 2017-06-28 15:50:25 -07:00
Soam Vasani e619a70661 add sections to cli download 2017-06-28 15:07:23 -07:00
Soam Vasani d248bb89ea 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 5fe4b276eb Fission update must require at least one change to function (#241) 2017-06-26 22:22:09 -07:00
Soam Vasani 8f1b27bd72 Remove image tags from yamls nightly20170621 2017-06-21 00:09:31 -07:00
yang qfandSoam Vasani ce4d3ac42d 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 3328014ee6 Fix image version in fission-openshift.yaml 2017-06-17 21:14:27 -07:00
yang qfandSoam Vasani b1e66663bd 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 c1dd8a9f35 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 d9b98830cf 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 a8e7ec534b Add Ruby environment (#223)
Adds a Ruby environment and examples.
2017-06-17 10:48:05 -07:00
Soam VasaniandGitHub 0207d13b23 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 93ef6fac53 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 c43cde8891 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 62aa9d6d73 Update golang instructions 2017-06-07 10:52:11 -07:00
Javier CastellanosandSoam Vasani cde2f26a9d Added support for pods and replication controllers to watchers (#216) 2017-06-01 10:49:57 -07:00
Mark PeekandSoam Vasani 75d65adcc0 Fix two links in Roadmap doc (#213) 2017-05-31 11:32:32 -07:00
Ta-Ching ChenandSoam Vasani 2f6cd6d659 Print log when timetrigger is removed (#209) 2017-05-30 14:21:41 -07:00
Ta-Ching ChenandSoam Vasani 990d943f21 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 531f69a037 Roadmap doc links 2017-05-18 15:21:36 -07:00
Soam Vasani 3ea9ad2449 Roadmap doc formatting 2017-05-18 15:04:01 -07:00
Soam Vasani bc61396071 Roadmap.md for an overview of roadmap and areas 2017-05-18 12:17:33 -07:00
Quinn MurphyandSoam Vasani 6185e842b5 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 a8c6347ed0 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 e5f5050ea6 Modify the stock example to show how to change the Content-Type (#124) 2017-05-12 15:36:12 -07:00
yang qfandSoam Vasani 03e3a63581 Move fission-ui intro to Install.md (#159) 2017-05-09 11:36:07 -07:00
mgandSoam Vasani 747a3d2197 Update INSTALL.md with install instructions for openshift (#179) 2017-04-27 14:20:16 -07:00
Fernando AlvarezandSoam Vasani 9bd21d2380 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 a15c867812 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 e1067ab4e5 update guestbook example css 2017-04-25 12:09:19 -07:00
Soam Vasani d2b7dc36ab Update fission.yaml to 3/28 image 2017-04-24 08:25:38 -07:00
syassamiandSoam Vasani 1abe961869 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 01b399187e Work around 'too old resource version' 2017-03-28 12:42:59 +02:00
Soam Vasani b4dd7a83df Better error checking in watch restarts 2017-03-28 12:06:07 +02:00
Soam Vasani 137d8f7285 Track resourceVersion from event objects 2017-03-28 10:01:11 +02:00
Soam Vasani c9f63e8173 Pass last resource version to restart watch 2017-03-28 10:01:11 +02:00