Closed roncrivera closed 5 years ago
This looks good @roncrivera
How was it tested?
{handler,index}.py
$ faas-cli new python3-debian --lang python3-debian --prefix riverron
Folder: python3-debian created.
___ _____ ____
/ _ \ _ __ ___ _ __ | ___|_ _ __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) | __/ | | | _| (_| | (_| |___) |
\___/| .__/ \___|_| |_|_| \__,_|\__,_|____/
|_|
Function created in folder: python3-debian Stack file written: python3-debian.yml
2. Built, published and deployed stack the usual way
$ faas-cli build [0] > Building python3-debian. Clearing temporary build folder: ./build/python3-debian/ Preparing ./python3-debian/ ./build/python3-debian/function Building: riverron/python3-debian:latest with python3-debian template. Please wait.. Sending build context to Docker daemon 7.68kB Step 1/17 : FROM python:3 ---> 7c5fd2af3815 Step 2/17 : RUN curl -sSL https://github.com/openfaas/faas/releases/download/0.9.6/fwatchdog > /usr/bin/fwatchdog && chmod +x /usr/bin/fwatchdog [...] [...] [...]
$ faas-cli deploy Deploying: python3-debian.
Deployed. 202 Accepted. URL: http://192.168.99.100:31112/function/python3-debian
3. Invoked the sample function
$ echo -n 'Hello OpenFaaS!' | faas-cli invoke python3-debian Hello OpenFaaS! $ faas-cli list Function Invocations Replicas python3-debian 3 1
Please let me know if the above test is enough or if there's additional test that needs to be done.
Thanks.
LGTM
The handler should return instead of printing result to match the Python3 example in the openfaas/templates repo.
Signed-off-by: Ron Rivera roncrivera@gmail.com