Function templates and the synthetic function examples
- The way of using
faas-clito build a OpenFaaS function image- Offcial example: https://github.com/openfaas/python-flask-template
- In short, a functiom image is a combination of:
request handler+language runtime+function code. In OpenFaaSrequest handleris theof-watchdog(qfaas of-watchdog)language runtimeis the functiontemplate(this repo)
Here is an example to build a qfaas python function image
Please check the Dockerfile in each template to get more information
cd single-function/python
faas-cli build -f fun-py-flask-qfaas.yml
# > faas-cli deploy -f fun-py-flask-qfaas.yml # change the gateway IP:Port in yml file first
# or > faas-cli deploy -g IP:Port -f fun-py-flask-qfaas.yml
More templates comming soon...