Reputation: 41
I followed the instructions in the documentation to download this preset they created for easily running Apache OpenWhisk for development purposes on Docker Compose.
I use make run
which works fine. Then make hello-world
will run the example action just as fine.
I read the .wskprops
file to see that it's running it in port 9090
and the auth value is 23bc46b1-...:123zO3...
. So I use wsk property set --apihost localhost:9090 --auth 23bc46...
.
But if I try using wsk action create someAction main.js
to create my own action it returns Unable to create action 'someAction': Put "https://localhost:31001/api/v1/namespaces/_/actions/test?overwrite=false": dial tcp [::1]:31001: connect: connection refused
.
These are the steps the Makefile appears to follow.
I'm not sure if perhaps I'm missing a step? How do I link running it and using it? The documentation doesn't seem to specify this. My knowledge of Docker Compose is naught, but I need to run this with the time I have available, I hoped this would be a simple solution. I've been stuck trying to run OpenWhisk in my local computer for a week, so any help would be massively appreciated!
Upvotes: 0
Views: 796
Reputation: 41
I figured it out! I got into the Makefile and printed WSK_CLI
to discover that it was using docker-compose/openwhisk-src/bin/wsk
instead of my own installation of wsk
.
So essentially, after running make run
, I can create an action using ./openwhisk-src/bin/wsk action -i create <action_name> <action.js>
. Note that the -i
is needed to get over the security simplifactions of running it locally for development purposes.
Upvotes: 0