Closed hamedgibago closed 1 year ago
Try faas-cli deploy
without sudo
as you have used faas-cli
login without sudo
.
@nitishkumar71 Now error changed to 400 and is like this:
WARNING! You are not using an encrypted connection to the gateway, consider using HTTPS.
Unexpected status: 400, message: unable to pull image docker.io/test3/callme:latest: cannot pull: failed to resolve reference "docker.io/test3/callme:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Function 'callme' failed to deploy with status code: 400
It sounds like you haven't pushed your image.
I can't docker pull docker.io/test3/callme:latest
Remember to run faas-cli publish
or faas-cli build && faas-cli push
on another machine where you have Docker installed.
I now recommend using ttl.sh instead of docker.io, it allows you to push images for testing without authentication or signing up.
Alex
All the instructions for faasd are in the eBook - it sounds like you would benefit from a copy if you don't already have one, it also explains why we don't building images in the same VM as faasd.
Sorry for asking this simple question. I installed and ran OpenFaas from faasd, /hack/install.sh
file. After building callme
, I saw that in my images. I have docker installed in the same virtual machine (Ubuntu). Should I start image that added as test3/callme
? How could I call the method after running this docker image?
It just starts with this message:
2023/07/07 13:58:58 Version: 0.2.1 SHA: cd8dc9f4e98049150d8079a74a18cd5a2e311aeb
2023/07/07 13:58:58 Timeouts: read: 5s write: 5s hard: 0s health: 5s.
2023/07/07 13:58:58 Listening on port: 8080
2023/07/07 13:58:58 Writing lock-file to: /tmp/.lock
2023/07/07 13:58:58 Metrics listening on port: 8081
In my sudo faas-cli list
command I just see one function named Printer
, once I added it accidentally from UI before with some errors, and can see my aimed function callme
:
Function Invocations Replicas
printer 0 0
@nitishkumar71 Hi, do you have any suggestion?
Function need to be deployed in local instance of faasd
Expected Behaviour
Current Behaviour
I installed faasd from folder hack/install.sh. It runs as a service in my Ubuntu linux instance. Although I logged in from this command:
faas-cli login -u admin -p p8bWPnkAsJ0DP7Zl1dhj0Vqeq6PilwySXfuunRZXldIHCPAfs4FukTkv6X00mmz --gateway http://10.62.0.4:8080
And received this message:
But when I want to deploy my function to the gateway, it says
unauthorized access, status code 401
:sudo faas-cli deploy --image test3/callme --name callme --gateway 10.62.0.4:8080
Why do you need this?
Who is this for?
What company is this for? Are you listed in the ADOPTERS.md file?
Are you a GitHub Sponsor (Yes/No?)
Check at: https://github.com/sponsors/openfaas
List All Possible Solutions and Workarounds
Which Solution Do You Recommend?
Steps to Reproduce (for bugs)
1. 2. 3. 4.
Context
Your Environment
faas-cli version
):docker version
):Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
Operating System and version (e.g. Linux, Windows, MacOS):
https://blog.alexellis.io/quickstart-openfaas-cli/