Turn anything into a serverless function.. Docker ready!
jerverless is a serverless runner which will execute anything (binaries, commands or your scripts) as a serverless function. It simply pipes http POST data into STDIN of any executable vice versa.
How it works!
Example functions
How to create functions?
On Machine (or VM)
- Download jar
$ url --ssl -L https://github.com/jerverless/jerverless/releases/download/v0.0.1/org.jerverless-0.0.1.jar > jerverless.jar
- Create
jerverless.properties
exec = python helloworld.py
port = 8080
cors = true
- Create your program (eg:-
helloworld.py
)
name = raw_input()
print "Hello %s!" % name
- Start server!
$ java -jar org.jerverless-0.0.1.jar
- Test it!
$ curl -d Jerverless http://localhost:8080/function
Or simply use template and jump to last step!
Docker
- On your local machine, clone this repo and go to an examples directory of choice (eg: python):
git clone https://github.com/jerverless/jerverless.git
cd jerverless/examples/python
- Create the docker image:
docker build --no-cache -t jerverless-py .
- Run the app:
docker run -it -p 8080:8080 jerverless-py
- Navigate to 'https://localhost:8080/function' in your browser.
Kubernetes
-
Create docker image for your function and push to dockerhub
-
Add docker image name to
.yml
deployment
Project Status
- Initial work (Structure, basic server with runner)
- Multithreaded server mode
- Unit cases
- CLI commands
- Basic Samples
- Docs
- Beta Release!
Developer Guide
git clone <forked_url>
mvn clean package
java -jar target/org.jerverless-0.0.1.jar