Open alexellis opened 7 years ago
@alexellis
Will support to pull image automatically.
Currently, only us-west-1
is available, will support new region soon.
Thanks, will integrate with / fix it.
What is the canonical way for using faas-cli
with this? I tried the following, but had issues:
⇒ cat functions.yml
provider:
name: faas
gateway: http://<MYFIP>:8080
network: func_functions
functions:
nodeinfo:
image: functions/nodeinfo:latest
⇒ faas-cli deploy -f functions.yml
Deploying: nodeinfo.
Server returned unexpected status code 500 Error response from daemon: No such service: faas-function-nodeinfo
Unexpected status: 400, message:
400 Bad Request
I had the same issue after trying hyper pull functions/nodeinfo
as well.
It looks like it is looking for a service called faas-function-nodeinfo
?
I don't believe Hyper implemented delete yet so you could try --replace false
and see if you get further. I would expect the CLI to work for all providers.
Seems like the same issue even with --replace false
⇒ faas-cli deploy -f functions.yml --replace false
Deploying: nodeinfo.
Server returned unexpected status code 500 Error response from daemon: No such service: faas-function-nodeinfo
Unexpected status: 400, message:
400 Bad Request
⇒ hyper pull functions/nodeinfo
Using default tag: latest
latest: Pulling from functions/nodeinfo
..snip..
Digest: sha256:e6d14cf6bb833fda2cfa7088158efe37b1af1930ef9925094971ad1fd9b7047f
Status: Downloaded newer image for functions/nodeinfo:latest
⇒ faas-cli deploy -f functions.yml --replace false
Deploying: nodeinfo.
Server returned unexpected status code 500 Error response from daemon: No such service: faas-function-nodeinfo
Unexpected status: 400, message:
400 Bad Request
Ping..
@alexellis Thanks, will continue to follow the issue later.
This is great work - I've just tried it and am excited to say it worked very well.
The instructions were clear - but I did get an error with hyper compose initially before realising that you have to type "hyper compose up faas" rather than "hyper compose up"
hyper pull
Docker Swarm / Kubernetes will pull any image which isn't available in the library, I think this should be an action of the "deploy" endpoint in the provider.
I tried this out for a hashing algorithm (sha512sum) and functions/alpine:latest - it failed, but once I had done a
hyper pull
it was OK again.The function executed very quickly, but it seemed like I had some latency reaching the gateway from the UK:
I saw this line:
Can we maybe configure the region string via an environmental variable?
Before you can scale you can omit AlertManager, but a core part of the API gateway and the invocation count is based upon Prometheus. Checkout the "faas" project's compose file for details on how to add it back in.
Like like the "nats.async.yml" on FaaS-netes or "docker-compose.extended.yml" file for FaaS you should provide an alternative compose file with NATS Streaming and the queue worker too.
The UI is also reporting 0 replicas when I think it should show 1. So even before you can support multiple-replicas showing 1 could be better.