Commit Graph
421 Commits
Author SHA1 Message Date
Soam VasaniandGitHub f2091d0d80 Move builds to package level (#297)
Introduce _Archives_ as a type to reference arbitrary blobs.

_Packages_ are a pair of Source and Deployment archives. Packages have an environment reference.

Functions reference a package. Multiple functions can reference the same package.
2017-09-08 14:19:39 -07:00
Ta-Ching ChenandSoam Vasani 9d7bd49338 Use latest function metadata to check cached function service. (#316)
Watch functions in the router and use that to trigger functionReferenceResolver cache invalidation.

We might want to rate-limit syncTriggers in a future change, since we might be triggering it more often than needed.
2017-09-08 13:53:02 -07:00
Soam VasaniandGitHub 45c766061a Storage service helm chart integration + bugfixes (#315)
Add storage service and a persistent volume claim to helm charts. A few bugfixes for the api proxy.
2017-09-08 04:49:14 -07:00
Moritz Grosch (LittleFox)andSoam Vasani 6142ac3648 Added perl environment (#311)
Perl runtime environment and example function.
2017-09-07 23:42:40 -07:00
Ta-Ching ChenandSoam Vasani 1b9fa5bc30 Unarchive zip file after fetcher downloads the package (#301)
Fetcher now uncompresses archive files. 

This is triggered by automatically detecting the file format, although maybe we should make that explicit or at least move the detection into the client.
v0.2.0-20170901
2017-09-01 07:50:47 -07:00
Soam VasaniandGitHub 8d103fa35b Large functions: API proxy for storage svc, upload support in the CLI (#304)
This change contains CLI support for uploading large functions to the storage service.

It also adds a reverse proxy into the storage service to the fission API.

The helm chart is not yet updated to actually run the storage service -- that will come in the next change.
2017-08-31 15:42:59 -07:00
Ta-Ching ChenandSoam Vasani 9d1b096bac Add Environment v2 Builder (#298)
Build server and client for environments.

This build server will run inside environment builders and invoke environment-specific scripts for doing builds. It provides a uniform language-independent API for builds to the fission build manager.

The change also includes an implementation of a builder for Python -- this "builder" acts on requirements.txt and runs `pip install` to collect all function deps.
2017-08-31 10:56:40 -07:00
Soam VasaniandGitHub d83c89df69 Storage service and client (#300)
A very rudimentary storage service for archives larger than what can
fit in TPR/CRD resources. The library used allows for using local
files, AWS S3, or other cloud storage APIs. For now only local paths
are set up.

The storage service doesn't know anything about functions or packages;
it can be used for arbitrary archives.

There's no CLI integration yet.
2017-08-31 00:44:25 -07:00
Ta-Ching ChenandSoam Vasani c03f1a6d9c Add env builder & srcpkg through cli (#296)
CLI support for specifying an environment builder and source packages.
2017-08-28 10:44:31 -07:00
Liu YangandSoam Vasani 4fc55b3b3c Add link to the logs section of INSTALL.md (#299) 2017-08-28 09:19:18 -07:00
Soam VasaniandGitHub 6f017cf400 Split out the Package type into a first class Kubernetes resource (#295)
Split out the Package type into a first class Kubernetes resource. Before this change, packages were implicitly tied to functions.

This wasn't ideal because:
 * Functions will need to share packages
 * A package storage system may be more generally useful than just
   functions (for example, for storing static assets)

This change does the following:
* Updates the fission and tpr types to add a new Package and PackageSpec.  It also creates a PackageRef type, and a FunctionPackageRef type. The PackageRef simply references a package, but the FunctionPackageRef includes the name of a function within the package. This allows us to share packages between different functions.
* Updates fetcher and other components for first-class packages
* Allows customization of fetcher image pull policy in the helm charts
2017-08-25 13:40:45 -07:00
Soam Vasani b19be5c0a3 Reduce slack spam 2017-08-24 11:10:41 -07:00
Soam Vasani 9920008916 Project credits: link to Platform9 and contributor list 2017-08-23 11:25:09 -07:00
Soam Vasani 68ab7efcd4 Add slack notification token to travis 2017-08-23 08:11:29 -07:00
Soam VasaniandGitHub 3693082004 Helm chart bugfixes + end to end test bugfixes (#293)
Helm Chart fixes: bump chart version, parameterize image pull policy, pass poolmgr url to router.

E2E test: add a simple hello world test. Make test runner dump fission logs after test.
2017-08-23 07:00:49 -07:00
George BuckerfieldandSoam Vasani dd6bfd73e2 Minor documentation fix for the go example (#292) 2017-08-22 07:51:58 -07:00
rapitableandSoam Vasani fe9f200606 Improve error message if an older CLI attempts to make a request (#291)
Closes #290
2017-08-21 23:46:45 -07:00
Soam Vasani 3165fe7719 tpr description typo 2017-08-21 15:12:10 -07:00
Erwin van EykandSoam Vasani a4124abeb2 Update list of environments currently in README (#289) 2017-08-21 13:56:58 -07:00
Soam Vasani 789a7d25ce Empty commit to kick ci 2017-08-18 16:11:35 -07:00
Ta-Ching ChenandSoam Vasani 31f94dbc12 Set fetcher image through poolmgr env (#280)
Add a helm value for the fetcher image. Pass the fetcher image path to poolmgr through an env var.
2017-08-18 15:12:10 -07:00
Ta-Ching ChenandSoam Vasani 6bca24a3f5 Fix fetcher failed to access TPR if RBAC is enabled (#288) 2017-08-18 15:01:21 -07:00
Ta-Ching ChenandSoam Vasani 961ee069ed Set message content-type based on the trigger.Spec.ContentType (#279) 2017-08-17 10:30:24 -07:00
Soam Vasani b5e3e4e625 Scripts for a couple of simple fission demos 2017-08-16 15:18:31 -07:00
Soam VasaniandGitHub 00a8430a24 Fix bug that causes us to skip our new e2e tests (#285)
Various e2e test bugfixes. The test runner now compiles fission bundle and cli, installs helm, installs kubectl, and uses helm to install fission, run all scripts under test/tests/, and uninstalls fission.

The change also removes go tip tests -- I think we can get by without them, but we'll add them back if the next go version update brings some surprises.
2017-08-15 17:00:27 -07:00
Soam VasaniandGitHub f79d44156b End to end test runner (#281)
Build fission-bundle and fission cli. Install the fission-bundle using
the fission-all helm chart. Run all files matching test_*.sh from the
tests/ directory.

This change doesn't contain any real tests, just the build and test
runner scripts.

Skips the tests when there are no cluster credentials available.
2017-08-14 16:17:24 -07:00
Ta-Ching ChenandSoam Vasani a52425a31d Parse metadata.Name before creating tpr resource (#284) 2017-08-14 08:55:31 -07:00
Ta-Ching ChenandSoam Vasani 45f3095fb1 Remove etcd from fission-all chart (#282)
Since we use Kubernetes APIs for storing our state now, etcd can be removed.
2017-08-12 16:04:30 -07:00
Soam Vasani 96ae2d3d86 Update with our new codeofconduct@ alias 2017-08-11 17:36:53 -07:00
Soam Vasani 6f8a2e4789 Don't set KUBECONFIG when there is no reachable cluster
Travis doesn't pass secret env vars to tests run on forks, so we need
a way to skip the tests when there are no credentials passed in.

This change unsets KUBECONFIG when there's no reachable cluster. The
Go tests already check for KUBECONFIG and skip when it's not defined.
2017-08-11 15:02:14 -07:00
Soam VasaniandGitHub 00c2883235 Helm chart updates (#273)
Remove hardcoded "fission" namespace in various places.

Remove etcd deployment and service, since we use K8s APIs now.

Add ClusterRoleBinding for the fission service account, to allow fission components to access TPRs. We currently make the service account a cluster admin. This is more permissive than it should be; we should define a specific role for just fission resources.
2017-08-09 23:52:13 -07:00
Soam Vasani 42261d8810 Remove retries from poolmgr eagerPoolCreator
This was initially added to avoid restarts if poolmgr starts before
fission api; but we don't really need that since k8s will restart
it. Also, poolmgr now talks to the k8s api directly instead of the
fission api.
2017-08-09 22:37:55 -07:00
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