apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.56k stars 1.17k forks source link

Error while trying to run `ansible-playbook -i environments/$ENVIRONMENT routemgmt.yml` #5439

Closed AhmadrezaHadi closed 1 year ago

AhmadrezaHadi commented 1 year ago

Environment details:

Ubuntu 22. Hi, I'm very new to OpenWhisk and I was trying to go through this page, and after setting up the environment and couchDB. I tried to run ansible-playbook -i environments/$ENVIRONMENT routemgmt.yml (here) and I got the following error:

fatal: [ansible]: FAILED! => {"changed": true, "cmd": "./installRouteMgmt.sh /home/exouser/openwhisk/ansible/files/auth.whisk.system 172.17.0.1 /whisk.system /home/exouser/openwhisk/ansible/../bin/wsk", "delta": "0:00:00.013195", "end": "2023-09-01 18:57:44.714954", "msg": "non-zero return code", "rc": 1, "start": "2023-09-01 18:57:44.701759", "stderr": "", "stderr_lines": [], "stdout": "/home/exouser/openwhisk/ansible/../bin/wsk is missing", "stdout_lines": ["/home/exouser/openwhisk/ansible/../bin/wsk is missing"]}

[FAILED]
> ./installRouteMgmt.sh /home/exouser/openwhisk/ansible/files/auth.whisk.system 172.17.0.1 /whisk.system /home/exouser/openwhisk/ansible/../bin/wsk
non-zero return code
/home/exouser/openwhisk/ansible/../bin/wsk is missing

Does anybody know what I'm doing wrong? I installed the standalone version first and then configured wsk. Upon trying to run OpenWhisk with Ansible, I got this error.

Thanks!

style95 commented 1 year ago

That's because you don't have wsk cli. Have you run opnenwhisk.yaml?

It has a step to download cli. https://github.com/apache/openwhisk/blob/20f7d98fdfba275bc3e5c88be0b7cdec956df2aa/ansible/openwhisk.yml#L39

AhmadrezaHadi commented 1 year ago

Thank you for the pointer, I ran the openwhisk.yaml, and the CLI was working, but I was still getting the error. I was able to fix the problem the day after.

I don't know what the main source of this issue was, but I was trying to manually set up and configure CouchDB before deploying OpenWhisk using Ansible, which was wrong. I repeated the steps without manually configuring the database, and it worked just fine.