Commit Graph
134 Commits
Author SHA1 Message Date
Soam VasaniandGitHub 26aa0998fd Use http for fission.io link
fission.io is on github pages, which doesn't seem to support SSL on custom domains.  Use http for now.
2016-11-12 08:43:27 -08:00
Soam Vasani 87a7fa6e26 Use glide for dependency mgmt; update README
And compilation instructions to README.
2016-11-11 14:15:59 -08:00
Soam Vasani e219804cde Fix segfault in defer statement
A defer statement contained an access to a pointer that was set to
nil before the deferred statement was run; remove it and just
explicity run the statement.
kubecon
2016-11-11 11:56:19 -08:00
Soam Vasani ac039535a1 Couple of nodejs examples -- hello world and a slack bot 2016-11-11 09:30:55 -08:00
Soam Vasani 1a86078fc0 Very rudimentary Python support
Create a python environment.  Only supports GET; doesn't support any
parameters etc. yet.  Basically just enough for a hello world demo.
2016-11-09 10:02:03 -08:00
Soam Vasani 8de691b914 Ensure markdown doesn't re-wrap lines that are commands 2016-11-08 00:45:38 -08:00
Soam Vasani 1080126b9e Store files at /filestore 2016-11-08 00:44:46 -08:00
Soam Vasani e80d4a7492 README updates 2016-11-08 00:40:55 -08:00
Soam Vasani 842f5eaa45 Remove extra whitespace from deployment yaml 2016-11-08 00:17:03 -08:00
Soam Vasani 3533c158d6 Add version to controller API 2016-11-07 14:33:00 -08:00
Soam Vasani 164c1b3c89 Kubernetes all-in-one yaml file for fission deployment
"kubectl create -f fission.yaml" will deploy fission on the kubernetes
cluster, in the "fission" namespace.
2016-11-07 12:24:08 -08:00
Soam Vasani d8fdd84368 Handle pod specialization errors
Handle pod specialization success/failure better.  Make sure we only
retry on connection failure, otherwise fail immediately.
2016-11-07 12:21:10 -08:00
Soam Vasani fffba6fcf0 CLI improvements
Check for required args; allow "route add" as an alias for "route
create".
2016-11-07 10:42:16 -08:00
Soam Vasani 038037dded Set filestore path in deployment yaml 2016-11-07 10:41:55 -08:00
Soam Vasani ddf279ed7d Add some useful packages to nodejs env 2016-11-07 10:41:29 -08:00
Soam Vasani ef7de75ec3 Minor cli option validation bug 2016-11-05 23:34:55 -07:00
Soam VasaniandGitHub 2a2a21c781 Merge pull request #20 from platform9/reap-idle-pods
Reap idle pods
2016-11-05 23:33:45 -07:00
Soam Vasani c7692978f9 Reap idle pods
Idle pod reaper wakes up once a minute, looks in the functionServiceCache for pods that
haven't been accessed for more than idlePodReapTime, and deletes all such pods.

(This doesn't yet delete pods that may be leaked from previously terminated poolmgrs; it
only works with pods created by the current poolmgr instance.)
2016-11-05 23:10:52 -07:00
Soam Vasani 5650fca3fd Refactor caching in poolmgr
Move separate caches to one cache -- functionServiceCache.  It can be
looked up by function, can update atime by address, and can be deleted
by podname.  This removes the other caches.  Some of the concurrency
logic is still a bit hairy; it might be better not to use fission.Cache.
2016-11-05 22:03:48 -07:00
Soam Vasani 8491aaf7fc Minor router update for cache interface change 2016-11-05 21:42:39 -07:00
Soam Vasani 9dcadd5f4a Support cache expiry based on create/last access time 2016-11-05 21:41:57 -07:00
Soam Vasani 68f860dcb3 Update unit tests for functionServiceMap change 2016-11-04 23:05:29 -07:00
Soam Vasani 78687d24b3 Idle pod reaper
Delete pods that are unused for more than a certain timeout.  This
change isn't complete -- other funcSvc caches need to be invalidated
on delete.  This needs a bit of refactoring.
2016-11-04 23:05:29 -07:00
Soam Vasani 35a5c94731 Add a reaped bit to funcSvc struct 2016-11-04 23:05:29 -07:00
Soam Vasani d805928f3e Cache: add method to get a copy of the map 2016-11-04 23:05:29 -07:00
Soam Vasani a000d4cc32 Update router for cache expiry 2016-11-04 23:05:29 -07:00
Soam Vasani d512159cb3 Fix poolmgr cache bug
Poolmgr cache was useless because it was keying by *fission.Metadata
instead of the metadata itself.
2016-11-04 23:05:29 -07:00
Soam Vasani 094da5c69a Add expiry time to cache
MakeCache() now takes a time.Duration after which entries are
considered invalid, and not returned from a Get().
2016-11-04 23:05:29 -07:00
Soam Vasani f639bc3558 Use fission.Cache for functionServiceMap 2016-11-04 23:05:29 -07:00
Soam Vasani 5cfe4b7c1d Log and ignore errors on eager pool creation 2016-11-04 23:05:29 -07:00
Soam Vasani f3eba4b825 Call poolmgr from router while using a cached service
Poolmgr needs to know usage statistics for a function's pod.  This
change asynchronously taps poolmgr API when router uses a service.
Poolmgr can use this information to control pod expiry.  It may also
be useful later as one of the metrics for autoscaling.
2016-11-04 23:05:29 -07:00
Soam VasaniandGitHub 22583481a4 Merge pull request #19 from platform9/fission-cli
Fission CLI
2016-11-04 23:04:58 -07:00
Soam Vasani 96616507fd Fission CLI
fission (function|httptrigger|environment) (create|get|update|delete|list)

TODO: Commands for getting status, logs, perf stats.  Commands for
changing configuration.  Add examples.
2016-11-04 22:59:52 -07:00
Soam Vasani a5ae7688ce Make *Update functions consistently return fission.Metadata 2016-11-04 22:57:11 -07:00
Soam Vasani f775806405 Add HTTP method to HTTPTrigger 2016-11-04 22:56:44 -07:00
Soam Vasani a6cd6e99fe Eagerly create generic pools
Poolmgr now watches the controller's list of environments and eagerly
creates a generic pool for each environment, if one doesn't already exist.
2016-11-03 15:08:06 -07:00
Soam Vasani c978efa1d9 Return bare pod IPs to router, instead of creating services
Even though the K8s api returns quickly after creating a service, that
service doesn't seem usage until about a second or two later.  We need
to investigate this and see if there's something we can do to make it
faster.  If there isn't we'll remove the svc code entirely; for now
it's behind a useSvc flag that's set to false.
2016-11-03 15:07:26 -07:00
Soam Vasani 59cc772b89 Add retries to router's proxy
Create an implementation of http.RoundTrip which does retries --
RetryingRoundTripper.  K8s services seem to timeout for about ~1-2 sec
after they're created even when the pods being routed to are ready to
serve requests.
2016-11-03 14:59:41 -07:00
Soam Vasani 1b76cdf200 Remove request path when routing
Route all requests to / on the function run container.  It doesn't
need to do any routing since it has only one function.
2016-11-03 10:11:43 -07:00
Soam Vasani bbaa766fe1 Poolmgr -- add retries to specialize call
If the pool is new or very busy, we may call the chosen container's
specialize endpoint before it's actually up -- handle the case by
retrying a few times.

Also namespace-qualify service hostname (since router and
functions run in different namespaces).
2016-11-03 10:11:25 -07:00
Soam Vasani f7ea5b99fd Namespace-qualify controller and poolmgr URLs 2016-11-03 10:05:06 -07:00
Soam Vasani 4cd3e65692 Another bug due to initialization/assignment confusion 2016-11-02 22:42:43 -07:00
Soam Vasani bb687d3e98 Don't use := when some vars are defined
:= attempts to declare as many of the variables on its left side as it
can, instead of re-using as many as it can.  Consider this code:

   a, ok := foo()
   if !ok {
      a, err := bar()
      ...
   }

The inner 'a' is a different var from the outer one, and goes out of
scope at the }.  The outer 'a' is left with whatever value foo()
returned.
2016-11-02 20:29:21 -07:00
Soam Vasani af8e5f360f Don't put internal fission error details in responses 2016-11-02 16:07:07 -07:00
Soam Vasani b1587551d5 Filestore - create path if it doesn't exist 2016-11-02 16:06:27 -07:00
Soam Vasani 91eb0ca3cd Poolmgr bugfix -- remove double response on the same channel 2016-11-02 15:47:32 -07:00
Soam Vasani f8a1fdf4c6 Improve logging in controller, fetcher, poolmgr
TODO: most of these should be in a debug loglevel.
2016-11-02 15:06:55 -07:00
Soam Vasani bfdd706b98 Rename 'function-run' dir to 'environments' 2016-11-02 11:22:20 -07:00
Soam Vasani 0805e5911d Use build.sh to build 2016-11-02 00:30:08 -07:00
Soam Vasani 5cacf9e90b Script to push to docker hub 2016-11-02 00:29:40 -07:00