Commit Graph
88 Commits
Author SHA1 Message Date
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
Soam Vasani 3ca1191117 Make some router settings configurable; silence noisy logs 2016-11-02 00:28:07 -07:00
Soam VasaniandGitHub e19669b019 Merge pull request #18 from platform9/controller-emptydb-bug
Fix resource store errors on empty db
2016-11-02 00:26:40 -07:00
Soam Vasani 49acdc49eb Fix resource store errors on empty db 2016-11-02 00:23:06 -07:00
Soam VasaniandGitHub 320b56bd68 Merge pull request #17 from platform9/fission-bundle
fission-bundle: executable package for router, controller, poolmgr
2016-11-01 18:38:33 -07:00
Soam Vasani d124c1331c fission-bundle: executable package for router, controller, poolmgr
fission-bundle is a single binary that can be run as one or more of
the router, controller and poolmgr.  It's built into one docker image
which can then be run with different commands.
2016-11-01 18:37:10 -07:00
Soam VasaniandGitHub c07311d214 Merge pull request #16 from platform9/router-poolmgr
Router integration with poolmgr and controller
2016-11-01 18:29:27 -07:00
Soam Vasani 3d5e52dc3d Router integration with poolmgr and controller
Router uses poolmgr to specialize pods when necessary.

Router uses controller to get the list of triggers to listen for.  For
now this integration is pretty crappy -- we just poll the controller
every few seconds and cache the result.  The right way would be to
have some sort of watch API on the controller and use that.  Or maybe
share access to etcd directly.
2016-11-01 18:22:04 -07:00
Soam Vasani 2b15b726d4 Poolmgr client 2016-11-01 18:14:38 -07:00
Soam Vasani 6e86182e19 Poolmgr API tweaks + convenient Start function 2016-11-01 18:14:23 -07:00
Soam Vasani 1cf531038a fission.Error constructor from http response 2016-11-01 18:11:46 -07:00
Soam Vasani 8b8e8c6539 Trim server url in client init 2016-11-01 18:11:21 -07:00
Soam VasaniandGitHub e49f165ba2 Merge pull request #15 from platform9/poolmgr
Poolmgr -- manage generic containers and their specialization
2016-11-01 02:20:00 -07:00
Soam Vasani 01bfa8b082 Minor changes; remove noisy test logs 2016-11-01 01:32:02 -07:00
Soam Vasani 40dfba1a41 Switch to official Kubernetes Go client -- client-go/1.4
Switch to client-go package instead of pulling the from kubernetes.
Use a versioned client with sensible compatiblity.

This change breaks 'go get'.  For now you have to manually checkout
the 'release-1.4' branch of the client-go package after 'go get'
fetches it.  TODO: use one of the build tools to fix this.
2016-11-01 01:32:02 -07:00
Soam Vasani 7d1058d7be Pool Manager -- manage generic containers and their specialization
GenericPool is a pool of generic containers for an environment.
GenericPoolManager keeps track of all GenericPools, creating them
on-demand.

The pool manager API is simply a "lookup" for the service URL of a
function.  If one exists it is returned immediately; otherwise, a
generic pool is created, and then a pod is specialized from that pool.

poolmgr is designed to run from within the cluster, since it connects
to pod IP addresses directly.

This is a first cut with many pieces missing.

TODO:
* Use versioned kubernetes clients instead of the unversioned one
* Unit tests for GenericPoolMgr; improve unit test for GenericPool;
  test for API.
* Handle cases where a service exists but pod backing it has failed.
* On start up, use existing deployments/pods/services if they exist;
  in other words don't orphan resources on restart.
* Kill idle resources (services, pods, even generic pools)
* Autoscale generic pool (for example, by watching num ready pods)
2016-11-01 01:32:02 -07:00
Soam VasaniandGitHub 0cbd489cbf Merge pull request #14 from platform9/fetcher
Fetcher is a helper for function run containers
2016-11-01 01:31:27 -07:00
Soam Vasani 95e38203a9 Fetcher is a helper for function run containers
Fetcher is a tool to download functions from the controller.  It is
meant to be run in a container in the same pod as the function run
container, with a shared volume.
2016-11-01 01:29:40 -07:00
Soam VasaniandGitHub 9f34fc3dd9 Merge pull request #13 from platform9/cache
Cache -- simple threadsafe map
2016-11-01 01:28:27 -07:00
Soam Vasani 1c32ce19fe Cache -- simple threadsafe map 2016-11-01 01:26:12 -07:00
Soam VasaniandGitHub ac440ac99f Merge pull request #12 from platform9/packaging-etc
Change controller and router exports to make them usable as libraries
2016-10-29 23:48:38 -07:00
Soam Vasani fbd76149f5 Add exports to make router usable as a library 2016-10-29 20:40:41 -07:00
Soam Vasani 83c995e019 Don't crash on user function exceptions 2016-10-29 20:39:41 -07:00
Soam Vasani a93c17548c Add exports that make controller usable 2016-10-29 20:38:50 -07:00
Soam VasaniandGitHub ff3efa3434 Merge pull request #11 from platform9/api-version-urls
Add API version to URLs
2016-09-29 22:33:27 -07:00
Soam Vasani 012a8de1ec Add API version to URLs 2016-09-29 21:41:52 -07:00
Soam VasaniandGitHub 3177c035c6 Merge pull request #10 from platform9/nodejs-improvements
Nodejs improvements
2016-09-24 12:17:54 -07:00
Soam Vasani 5d76ee8894 Remove outdated comment 2016-09-24 12:17:08 -07:00
Soam Vasani 35e3b3b421 Add logging middleware to log requests 2016-09-24 12:14:27 -07:00
Soam Vasani b42f4dee6a Add bodyParser calls for urlencoded and json request content-types 2016-09-24 11:47:01 -07:00
Soam VasaniandGitHub fedc3f76e3 Merge pull request #9 from platform9/function-raw-code-api
Base64 encode the code in json objects.
2016-09-22 01:11:44 -07:00
Soam Vasani 9a65c8a6fb Undo changes to client function obj 2016-09-22 01:11:17 -07:00
Soam Vasani 79fb54820e Base64 encode the code in json objects.
This will make the API easier for clients.  Also add a ?raw=1 flag to
the function GET API, to get just the code of the function.
2016-09-22 01:07:34 -07:00
Soam VasaniandGitHub d836be88da Merge pull request #8 from platform9/controller-environment-api
API for environments
2016-09-21 23:47:35 -07:00
Soam Vasani 6b67bc0a61 API for environments
Environments for functions. For now this is just the image URL for the
function run container. In the future, Environments will also have
build container image URLs, and perhaps parameters to those
containers.

Create/read/update/delete/list. Versioning will be added later. For
now, only the latest update is stored.
2016-09-21 22:29:51 -07:00
Soam VasaniandGitHub 80e73f7f09 Merge pull request #7 from platform9/controller-httptriggerapi
Add HTTP trigger API and client
2016-09-21 17:10:12 -07:00
Soam Vasani f7757bdcc1 Add HTTP trigger API and client
This implemenents create/read/update/delete/list for http triggers.
This isn't quite the final implementation: you can't look up old
versions by UUID since it only stores the latest update.  I'll get to
that later.
2016-09-21 15:56:29 -07:00
Soam Vasani fee2fb1d70 Helper func to connect to etcd 2016-09-20 21:58:53 -07:00
Soam Vasani 16a75c8887 Remove call to the validator function
(This will be better handled in a higher layer.)
2016-09-20 10:51:44 -07:00
Soam VasaniandGitHub d88e9837a3 Merge pull request #5 from platform9/controller
Controller
2016-09-20 00:58:13 -07:00
Soam Vasani 641cae0206 Fission error type 2016-09-20 00:55:31 -07:00
Soam Vasani 39ef1da415 Key methods for Resource types 2016-09-20 00:55:13 -07:00
Soam Vasani f02f58cd12 Controller API unit tests 2016-09-20 00:54:26 -07:00
Soam Vasani 72ff031624 Controller API client.
Just Functions so far.
2016-09-20 00:53:57 -07:00
Soam Vasani 14734f6435 HTTP API for Functions
So far, just Function create/read/update/delete/list.  FunctionApi
glues HTTP request/response to functionStore.
2016-09-20 00:45:13 -07:00
Soam Vasani be16c6a2aa Minor stuff: debug logs, unit test update 2016-09-20 00:44:19 -07:00
Soam Vasani a0cfadbd73 Fix deleteFile (missing deletes for etcd metadata)
Also move resource and serializer interfaces to types.go
2016-09-20 00:25:50 -07:00