Commit Graph

68 Commits (f2189a04680ead95aa267edbdad0e641376380c8)

Author SHA1 Message Date
Lingxian Kong f2189a0468 Fix logs query for executions
After function autoscaling support, it's impossible for qinling-engine
to get execution log because it doesn't know which pod it is talking
to.

So, it's neccessary for the runtime to return execution logs to
qinling engine.

The qinling client is not affected.

Change-Id: I96dfd00cc83d8b8a5e8c601ee3800b1ef1a45b1b
2017-08-29 23:54:30 +12:00
Jenkins e1a475708a Merge "Add scale up ability for function execution" 2017-08-28 04:40:25 +00:00
Lingxian Kong c74ac2faac Add scale up ability for function execution
Provide an API to do scale up operation, leave the container
monitoring to orchestrator underlay, although k8s already supports
HPA, but we should not rely on specific container orchestrator
capability for general purpose.

Partially implements: blueprint qingling-autoscaling
Change-Id: Iff1ff646a6df263b2770b8cebc74e80ab18c7613
2017-08-28 16:25:46 +12:00
Lingxian Kong c17a4b44da Concurrency support for python runtime
For testing purpose, just use multithreading support of Flask itself.

It's not recommended for production use.

Change-Id: I062c6f093e1c167a2ef9c8ad6747fc770e0139e8
2017-08-28 13:16:00 +12:00
Lingxian Kong 5580cb21b7 Documentation improvement
Partially implements: blueprint qinling-doc
Change-Id: Ia7224f2bf5d4f64b07265ea5d453b7af6974ce91
2017-08-25 10:37:21 +12:00
Jenkins 55a06cfb77 Fix delete function with running job associated
User should not delete a function with running jobs associated.

Change-Id: I627ac7ef057768e7c2d99f56e17da9eacbf4ad76
2017-08-22 15:36:34 +12:00
Jenkins f3df0936d5 Merge "Improve doc" 2017-08-21 23:41:05 +00:00
Lingxian Kong f122eceb71 Improve doc
Partially implements: blueprint qinling-doc
Change-Id: I715414735bdf88b33052c14c3ed241193f213dee
2017-08-22 11:18:19 +12:00
Lingxian Kong b7562a4bd3 Add unit test for execution operations
Partially implements: blueprint add-unit-tests

Change-Id: Ib418364ec7164d0bad0402501f14d8340be99c89
2017-08-22 11:15:45 +12:00
Jenkins 22b4443858 Merge "Add unit test for function operations" 2017-08-21 22:34:47 +00:00
Lingxian Kong eb91b6d6f3 Add unit test for function operations
Partially implements: blueprint add-unit-tests
Change-Id: I00c3c7beca8cda7057f63850026c0f3f0526f5dd
2017-08-22 10:06:33 +12:00
Lingxian Kong a6043729cb Improve doc
Change-Id: I22ac7943a9871bf6cfafb033b0523c6cf5a6b7cf
2017-08-14 15:36:50 +12:00
Jenkins 0d70eea3ac Merge "Update and replace http with https for doc links in qinling" 2017-08-14 02:44:46 +00:00
Jenkins c461df4565 Merge "[Trivialfix]Fix typos in qinling" 2017-08-14 02:43:53 +00:00
shangxiaobj 469e80b82e Update and replace http with https for doc links in qinling
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links

Change-Id: I7138f4fa1c519f9916aacc1e029e684917098fff
2017-08-13 19:28:54 -07:00
Lingxian Kong 343bc93d76 Doc improvement
Partially implements: blueprint qinling-doc
Change-Id: I3ef2b452302d886e1a86ccde6c07be5d4ac8d383
2017-08-14 14:15:37 +12:00
shangxiaobj a3e95af382 [Trivialfix]Fix typos in qinling
Fix all the typos found in qinling.

Change-Id: Id3dbfd9b5280ad6ed1ca6d3400a9a00a925e186a
2017-08-13 19:10:35 -07:00
Lingxian Kong 12fe9211f3 Re-orginze documentation
Change-Id: Ic0903cb9288e01682df01c3e69f934ed40c53a4f
2017-08-14 13:44:52 +12:00
Lingxian Kong 089f41de2b Support function execution log query
After execution is finished, Qinling provides API to query execution
log for audit, debug or other purposes.

Implements: blueprint qinling-logs
Change-Id: Ie92619bf238c8e72e15c350c65bfbbb88a065f97
2017-08-13 00:33:51 +12:00
Lingxian Kong 35e652f43a Fix job creation with pattern
Change-Id: I0222b853464f6bf3589f11477a0624d72c64a22b
2017-08-06 16:20:11 +12:00
Lingxian Kong 55c7e5f496 Do not get openstack session in container
If the function is triggered by job, it's very hard to get openstack
serssion based on trust id, unless the qinling service credentials are
passed which will lead to security issue.

So, this patch will remove 'context' param for user function.

Change-Id: Ib0e185ad9729cf59e308b7ded683911a92624ad0
2017-08-06 15:02:49 +12:00
Lingxian Kong 1763f29ce6 Fix log message
Change-Id: If30b192539981003149311c25d776f9a73819beb
2017-08-06 00:30:30 +12:00
Lingxian Kong b3c7f90777 Fix a command in README
Change-Id: If1cb3db4f81da7312c2f7276091915df716ccc3c
2017-08-05 23:46:00 +12:00
Lingxian Kong 13e2d13195 Fix getting update params
Change-Id: I0724417cfe974c23813117cf3733de89f8f5f1c5
2017-08-02 10:15:17 +12:00
Jenkins d768711939 Merge "Add job update api" 2017-08-01 05:01:46 +00:00
Lingxian Kong 16876649e5 Add job update api
By using update api, users could pause/cancel/resume jobs, or change
job execution pattern.

Change-Id: I05103316a91ad79c4d0593c4a02a400aac45a762
2017-08-01 16:50:19 +12:00
Lingxian Kong ff873c3f95 Fix authentication failure when token expires
OpenStack service session is generated when downloading code from
inside the container, but when the function is invoked at a deferred
time, the token may already be expiried.

Need to create the session when executing the function instead of
when downloading.

Change-Id: I8170bfb1c5f8b6cf88a744547db12cc12248aaca
2017-07-30 23:34:47 +12:00
Lingxian Kong a2213f3f6d Fix relationship of function service mapping
When deleting function, the service mapping record should be
deleted automatically.

Provide a helper script for resource clean up.

Change-Id: Ie3db454b5bcfb74a0826f01c4626fb45fca58478
2017-07-27 23:14:27 +12:00
Lingxian Kong 30c8e7dd60 Log improvement
Change-Id: Ia7e0dee3820179c22fb8281c62d0a8241b72b718
2017-07-27 16:22:53 +12:00
Lingxian Kong d23551c465 Fully support sync/async execution
Change-Id: I008025f710f8d61eb6f8a4998fe6990abdbc7203
2017-07-27 14:26:47 +12:00
Lingxian Kong 49c4c10adb Fix a bug in job periodic task
Change-Id: I4c26e08e3738023b1a7e7e8f0f2c1f59d7e80d79
2017-07-26 17:01:36 +12:00
Lingxian Kong 997c78131e Implement periodic task for jobs
Change-Id: I9093333cc9b1a64b5e386af87db80df5aa4dfb4b
2017-07-26 09:58:46 +12:00
Lingxian Kong 5baa3f1e45 Add jobs api
This is part-1 of jobs support in Qinling.

With job API, users can create a job with an existing function
that can be ran in cron job's fashion, but the job definition
has more capabilities than cron.

Change-Id: I0cb885dd6005ba024e3816bae9b79b0d3f35d335
2017-07-21 22:52:05 +12:00
Lingxian Kong ebe601b8f5 Disable python buffer for stdout/stderr
Change-Id: I6f4a0aaf192df76d21c72529c92b6419c9f4b08d
2017-07-17 23:47:23 +12:00
Lingxian Kong 0f7520b88c Python runtime improvement
Change-Id: I8a77324df07c2d98773c20aa04eb81cc54152be3
2017-07-17 15:02:14 +12:00
Lingxian Kong f870ac6871 Capture module load exception
Change-Id: I1f04351160fcdb0008a25f5898bfc6cc29a58055
2017-07-13 22:29:27 +12:00
Lingxian Kong c1e5ef378f Add additional information for README
Change-Id: I56747fbbddef120c3624fd11036b1317cc8c723e
2017-07-13 16:23:20 +12:00
wanghao 94b9d32ae6 Improve config options
Change-Id: I8f73a544333b02a4bc37736d850bf06cc09f8263
2017-07-12 10:53:12 +08:00
Lingxian Kong 00885b42ff Add UT for runtime API operation
Partially implements: blueprint add-unit-tests
Change-Id: I2bf92b36e4bee273171bd626638a61e313377a44
2017-07-11 13:08:58 +12:00
Lingxian Kong 81139c1c7c Add documentation to use qinling CLI
Change-Id: Iae4489b0c8b033773075aa6867e4ec65b7fe9af8
2017-07-07 15:49:57 +12:00
Lingxian Kong bf4ea1c02b Fix file pattern in git ignore
Change-Id: I81aa3ff848ef7bd200d9a7423f6fd4cbf8d18765
2017-07-05 00:10:09 +12:00
Lingxian Kong 928cb9ea9a Ignore .patch files
Change-Id: Ie2e9b24c17fb3d0d0ea7efe1af7a5cfd3076c3cc
2017-07-04 23:40:34 +12:00
liusheng b460a55df7 Fix minor typos
Change-Id: I7a42166e24e27083ab34c7dcea87c28a56bbf7f7
2017-07-04 15:42:20 +08:00
Lingxian Kong eae0caf17d Add basic test for engine
Partially implements: blueprint add-unit-tests

Change-Id: I7fff946e8c05cf50722afdc54be746bde9240d43
2017-07-04 15:42:17 +08:00
Jenkins 8d321927d3 Merge "Updated from global requirements" 2017-07-04 03:09:11 +00:00
Lingxian Kong 0f7362083f Updated from global requirements
Change-Id: Ib75da5b56ce71f33f433906df175e21f58cc947d
2017-07-04 15:00:21 +12:00
Lingxian Kong 1171944560 Add basic unit test structure
Partially implements: blueprint add-unit-tests

Change-Id: Ic96dcaf401f30bc098738818630777fc62040aca
2017-07-04 14:34:53 +12:00
Lingxian Kong 786f83d182 Support Keystone session in python runtime
Keystone session can be used directly in user function to access
OpenStack services.

Include openstack clients in python requirements as well.

Add a python function example.

Implements: blueprint qinling-openstack-clients
Change-Id: I4798c404cb57bafe14049f57ba8db7c7125106c7
2017-07-03 01:16:40 +12:00
Lingxian Kong 992c90e044 Support update runtime
If update image, will send asynchronous request to engine. If some
error happened during update, engine will rollback runtime
automatically.

Change-Id: I1598b1c04427dfdb7d573bbff8dc017f113c2fd2
2017-06-26 21:22:40 +12:00
Lingxian Kong 13f1e6f41e Support function update
Change-Id: Ib184236b28a4aa3684970654f2788c9e3677f822
2017-06-23 09:55:56 +12:00