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
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.
Add function log aggregation and persistence using Fluentd and InfluxDB.
Fluentd and a helper sidecar run as a daemonset. The poolmgr sets up logging for each function pod, using the helper sidecar. Fluentd forwards logs to InfluxDB, which is run as a deployment and service. The client CLI directly queries InfluxDB for logs.
Fluentd supports many outputs besides InfluxDB, so we aren't very tied to InfluxDB.
The setup is somewhat manual, which we should be able to improve by integrating this into the helm chart.
Diagram of component interactions: https://cloud.githubusercontent.com/assets/202578/23100399/b0e3ea00-f6ba-11e6-8f2f-6588cfef2e84.png
Minimal golang runtime.
Functions are built as Go plugins, and the plugin is uploaded to fission.
See `environments/go/README.md` for instructions and `examples/go` for a usage example.
For now, we're re-using the 'code' field of the function to store the binary plugin. With v2 environments, this will be stored separately as a binary package.
When the request is handled successfully, json data is returned, this
patch changes the response Content-Type header from text/plain to
application/json
Fixes: #144
Upgrades the node environment to NodeJS 7.6.0. Functions can now use async/await and promises; they can return a promise instead of using a callback. The change preserves compatibility with the callback style.
* Upgrade node environment to Node.js 7.6.0+
* Bump package version
* Preserve compatibility for callbacks
* Cleanup
* Re-add hello callback example
* Make sure not returning won't blow everything up
* Update stock example with request promise
If no uid is provided, all versions of function files and function metadata will be deleted. If a uid is provided, only that specific version is deleted, and the "latest" version of the function moves back to the previous one.
Fixes#152
Fixes#139. The code before this change was saving up pointers to the loop variable in a slice. So loop was useless and we always chose the last pod in the list, whether it was ready or not. With this fix, choosePod should always return a ready pod.
Also adds a check for the pod phase, before looping over the containers in the pod, and discard pods that aren't running yet.
Before this change, if the user doesn't define a route for /, the
router happily 404s at that path. This breaks GKE Ingress, which uses
that request as a health check. So this change adds a handler for
"GET /", unless the user already has one.
Also, log the delay for slow requests.
Motivation: The output when an error occurs shows an integer error code,
which isn't very helpful. And in the case of an error when creating a
resource, you also get a redundant log message from the controller
client.
Modifications:
* the controller client no longer logs errors
* the generated String() allows for the enum name to be displayed in the
error output
* each errorCode enum member has a hand-generated description
* the format of the error message from the CLI client was modified to
display the error description with the error message
Related to #112
Test script that sets up fission on a cluster, runs tests and
uninstalls it.
Yet to come:
1. The actual tests
2. Builds (for fission-bundle, client, and envs)
3. Automation with github pull requests
Remove our non-standard namespace variable and use .Release.Namespace
to put fission deployments and services into.
(We still need the functionNamespace parameter, to customize what
namespace fission puts functions into.)
Motivation: Creating duplicate resources currently results in a 500
error being displayed by the client, with no information about the true
nature of the failure.
Modifications:
* ResourceStore now converts any errors from the etcd client into
fission errors, capturing the reason for the error in the case of a
duplicate key (as ErrorNameExists)
* ErrorNameExists errors are signaled to the client with a
409 (Conflict) HTTP status
* MakeErrorFromHTTP() now reads the body of the error response to
retrieve the actual error message instead of using the HTTP status
message
* the controller client now uses MakeErrorFromHTTP() to centralize
status code -> error code mapping
* tests for all of the resources now check that duplicate resources are
reported properly
Result: The client can now provide more context when a duplicate name is
given
related to #112
Addresses issue #113. poolmgr.MakeGenericPool does not need to wait
for a ready pod. Kubernetes already retries image fetching, so
there's no need to repeat the task in fission. And if it's a
non-retriable error (like the image URL being wrong), then the
deployment will stay broken, and the user can fix the environment with
'fission env update' (or 'fission env delete' followed by 'fission env
create').