openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
798 stars 224 forks source link

ERROR: Language template: not supported, build a custom Dockerfile #880

Closed loretoparisi closed 3 years ago

loretoparisi commented 3 years ago

I have followed the template store docs, doing the following, but I had an error:

$ brew install faas
$ faas new --lang python3 http-status
2021/04/10 19:11:26 No templates found in current directory.
2021/04/10 19:11:26 Attempting to expand templates from https://github.com/openfaas/templates.git
2021/04/10 19:11:29 Fetched 13 template(s) : [csharp dockerfile go java11 java11-vert-x node node12 node14 php7 python python3 python3-debian ruby] from https://github.com/openfaas/templates.git
Folder: http-status created.
  ___                   _____           ____
 / _ \ _ __   ___ _ __ |  ___|_ _  __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) |  __/ | | |  _| (_| | (_| |___) |
 \___/| .__/ \___|_| |_|_|  \__,_|\__,_|____/
      |_|

Function created in folder: http-status
Stack file written: http-status.yml

Notes:
You have created a Python3 function using the Classic Watchdog.

To include third-party dependencies create a requirements.txt file.

For high-throughput applications, we recommend using the python3-flask
or python3-http templates.

and then

$ faas up --image faaspy --handler ./http-status --name faashelloworld
Language template:  not supported, build a custom Dockerfile
alexellis commented 3 years ago

Hi, you need to simply run faas-cli up without those other arguments.

Thanks for your interest in the project, I'll close this now.

alexellis commented 3 years ago

/msg: enduser

derek[bot] commented 3 years ago

Thank you for your interest in OpenFaaS. This project is maintained and made available for hobbyists and commercial users alike, so we need to balance our time across everyone's needs. Whilst we are excited in your interest in using OpenFaaS, we would also ask you to take a look at our contribution guide on Setting expectations, support and SLAs.

Commercial users can purchase support in order to get dedicated help from OpenFaaS Ltd, or they can book ad-hoc consulting hours to get an engineer to dedicate time to helping them.

If that is not a good fit for you at this time, please check out the OpenFaaS GitHub Sponsors options which are priced for practitioners like yourself. Organisations can also sponsor through their GitHub billing relationship.

When you become a sponsor as an indvidual, it will show this on your issues and PRs, so that the community can see that you are supporting our work, and can prioritise your needs.

If you are receiving this message after having received hands-on support from the OpenFaaS community, please join GitHub Sponsors to say thank you for our time.

Thank you for supporting OpenFaaS.

loretoparisi commented 3 years ago

@alexellis thank you Alex. Running faas-cli up without args cause the error Please provide a valid --image name for your Docker image.

alexellis commented 3 years ago

Please provide the whole stack.yml file here for us to look at

loretoparisi commented 3 years ago

Hello, ah that's the issue. Following the template store I just did

brew install faas
faas new --lang python3 http-status

that correctly created the directory http-status

.
├── __init__.py
├── handler.py
├── requirements.txt
└── template
    ├── csharp
    ├── dockerfile
    ├── go
    ├── java11
    ├── java11-vert-x
    ├── node
    ├── node12
    ├── node14
    ├── php7
    ├── python
    ├── python3
    ├── python3-debian
    └── ruby

but I do not see any stack.yml there. (There was no mention in the template store or maybe I did not see any). Thank you!

alexellis commented 3 years ago

Your YAML file is created where you run the command, don't cd into the http-status directory to run faas-cli up.

You may benefit from taking our eBook and workshop for OpenFaaS to understand how all this works and is supposed to be used. There's a promo to get 50 USD off until the end of the weekend.

https://gumroad.com/l/serverless-for-everyone-else

loretoparisi commented 3 years ago

@alexellis definitively I will take the ebook! Here is the yaml, in fact was outside that folder:

version: 1.0
provider:
  name: openfaas
  gateway: http://127.0.0.1:8080
functions:
  http-status:
    lang: python3
    handler: ./http-status
    image: http-status:latest