--> On the fly create docker containers.
--> Remote script execution inside created containers.
--> API's to create, run, pause, resume, stop, inspect and read remote script logs.
Build flask-lambda image using docker file.To use any other image change config.ini
Build egg or add project in pypath
Install docker sdk, flask and rocksdb
curl -i -X POST -H " Content-Type: multipart/form-data" -F " data=@test.py" http://localhost:5000/api/v1/scripts
{"response" : {"script_id" : 776 }}
GET : http://localhost:5000/api/v1/scripts/create-container/776
{"response" : {"script_id" : 776 }, "container_state" : " CREATED" }
GET : http://localhost:5000/api/v1/scripts/start-container/776
{"response" : {"script_id" : 776 }, "container_state" : " RUNNING" }
GET : http://localhost:5000/api/v1/scripts/read-logs/776
{"response" : {"script_id" : 776 }, "container_state" : " RUNNING" , "logs" : " hello\r\n bye\r\n " }
GET http://localhost:5000/api/v1/scripts/container-stats/776
{"response" : {"script_id" : " 776" }, "container_state" : " exited" }
GET http://localhost:5000/api/v1/scripts/pause-container/2567
{"response" : {"script_id" : 2567 }, "container_state" : " paused" }
GET http://localhost:5000/api/v1/scripts/resume-container/2567
{"response" : {"script_id" : " 2567" }, "container_state" : " running" }
GET http://localhost:5000/api/v1/scripts/stop-container/2567
{"response" : {"script_id" : 2567 }, "container_state" : " exited" }
GET http://localhost:5000/api/v1/scripts/delete-container/2567
{"response" : {"script_id" : " 2567" }, "container_state" : " DELETED" }