2021-01-20 06:24:35 UTC - Aman Vijay: Hey everyone, I am starting up with openwhisk. While configuring it in my windows 10 based system what should be the API host and auth key wave : Rodric Rabbah https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611123875023900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:26:47 UTC - Dominic Kim: How did you set it up? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124007024900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:27:12 UTC - Aman Vijay: I followed the documentation. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124032025100?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:27:22 UTC - Aman Vijay: Cloned the zipped file https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124042025300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:27:42 UTC - Aman Vijay: Set up environment variables for wsk cli https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124062025500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:28:05 UTC - Dominic Kim: Are you mentioning the openwhisk-1.0.0 release about the "zipped" file? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124085025900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:28:53 UTC - Aman Vijay: 1.1.0 release https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124133026200?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:29:35 UTC - Dominic Kim: ok so you are mentioning this: <https://github.com/apache/openwhisk-cli/releases/tag/1.1.0> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124175026500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:29:47 UTC - Aman Vijay: Yes https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124187026700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:30:16 UTC - Dominic Kim: If you want to run OpenWhisk on your local or any other server, you need to build and deploy this <https://github.com/apache/openwhisk/releases> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124216026900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:30:31 UTC - Dominic Kim: What you mentioned is a CLI tool to interact with the openwhisk core. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124231027100?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:30:52 UTC - Dominic Kim: So the API host means the endpoint of your openwhisk setup. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124252027300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:31:26 UTC - Dominic Kim: And these auth keys are provided by default. <https://github.com/apache/openwhisk/blob/master/ansible/files/auth.guest> <https://github.com/apache/openwhisk/blob/master/ansible/files/auth.whisk.system> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124286027500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:32:29 UTC - Aman Vijay: Okay https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124349027700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:32:54 UTC - Aman Vijay: Thanks a lot +1 : Dominic Kim https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124374027900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:34:09 UTC - Aman Vijay: Any documentation is there for building and deployment in local? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124449028300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:34:12 UTC - Dominic Kim: If you want to just try OpenWhisk, I recommend using a standalone openwhisk> <https://github.com/apache/openwhisk/tree/master/core/standalone> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124452028500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:34:33 UTC - Dominic Kim: You can run OpenWhisk with a Jar file. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124473028700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:36:21 UTC - Aman Vijay: We will have to create jar? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124581028900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:36:51 UTC - Dominic Kim: It's not easy to figure out the reason with what you provided.. I believe you would get a response if asking to IBM supports. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124611029100?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 06:39:10 UTC - Dominic Kim: hm.. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124750029300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:39:13 UTC - Dominic Kim: try run this script. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124753029500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:39:14 UTC - Dominic Kim: <https://github.com/apache/openwhisk/blob/master/core/standalone/start.sh> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124754029700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:39:40 UTC - Dominic Kim: I haven't followed it up for some time, and it seems now it is working with a docker image. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124780029900?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:39:54 UTC - Dominic Kim: There is a standalone docker image. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124794030100?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:40:05 UTC - Dominic Kim: Be sure you run that script on linux. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124805030300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:40:27 UTC - Dominic Kim: It maps the docker socket to the container volume, so it should be linux. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124827030500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:40:50 UTC - Dominic Kim: Then you would get connected to this page. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124850030700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:41:35 UTC - Aman Vijay: Yeahh this playground I am able to access even in my windows based system https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124895031100?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:41:48 UTC - Dominic Kim: oh is it? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124908031300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:42:18 UTC - Aman Vijay: I have to create event based triggering functions https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124938031600?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:42:19 UTC - Dominic Kim: Then you want to use cli with that play ground? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124939031800?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:43:03 UTC - Aman Vijay: Yes https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124983032000?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:43:16 UTC - Dominic Kim: When you run that script, you would get this log. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611124996032200?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:43:25 UTC - Dominic Kim: ```$ ./start.sh cf40b92c7e64ee53d0ff6b01433c490c4be3ce5406d7f34272136b710bc6bc6d
ok: whisk auth set. Run 'wsk property get --auth' to see the new value. ok: whisk API host set to <http://openwhisk:3233>``` https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125005032400?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:43:49 UTC - Aman Vijay: Let's say I have to create a logic of reading data from a file and persisting it to db https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125029032600?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:44:08 UTC - Aman Vijay: How can I achieve this on my onpremise system https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125048032800?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:44:41 UTC - Dominic Kim: ok then you should follow this guide. <https://github.com/apache/openwhisk/blob/master/tools/ubuntu-setup/README.md> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125081033000?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:45:15 UTC - Dominic Kim: Alternatively you can run it on K8S as well. <https://github.com/apache/openwhisk-deploy-kube#deploying-openwhisk> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125115033300?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:45:32 UTC - Aman Vijay: Okay https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125132033500?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 06:45:38 UTC - Aman Vijay: Let me try that +1 : Dominic Kim https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611125138033700?thread_ts=1611123875.023900&cid=C3TPCAQG1 ---- 2021-01-20 09:24:18 UTC - Philipp Heuberger: just curious, what pieces of information are you missing? I'm just looking for pointers/best practices/tutorials to be able to figure it out myself. I'm not looking for technical support :slightly_smiling_face: https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611134658034100?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:25:39 UTC - Philipp Heuberger: I'm sure I'm not the only person in the world trying to invoke functions from other namespaces. there's got to be something on the interwebs that I just wasn't able to find so far https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611134739034300?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:33:17 UTC - Dominic Kim: First, the environment is different in IBM function with opensource openwhisk. In OpenWhisk, there is a cluster-wide option to provide the API_KEY as an environment variable. In such a case openwhisk client-js library will recognize that environment variable and you don't even configure those information to invoke another action in an action. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135197034500?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:33:31 UTC - Dominic Kim: But I am not sure IBM function enabled it. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135211034700?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:34:40 UTC - Dominic Kim: With the assumption that they didn't enable it, what you did is correct. So it is supposed to work. That's the reason why I said it's not easy to figure out the reason. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135280034900?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:37:48 UTC - Dominic Kim: ```const openwhisk = require('openwhisk'); function main(params) { let options = { apihost: 'myEndpoint', // such as <https://localhost> api_key: 'e57935f1-dd2e-4a02-ac1c-de5d589e666b:FkNoL5ebLqk5tnehn0fvctjDj136LXQShUDECgJf4uWY97Mp1GaMpOdp0xpH33S5', namespace: 'style95' }; let ow = openwhisk(options); const name = 'helloworld2'; const blocking = true; const result = true; const actionParams = {}; return ow.actions.invoke({name, blocking, result, params: actionParams}).then(result => { console.log('here is the invoked results', result); return result; }).catch(err => { console.error('failed to invoke actions', err); return err; }); }``` https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135468035100?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:37:53 UTC - Dominic Kim: This is what I used. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135473035300?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:38:59 UTC - Dominic Kim: In my cluster, even the following code works. ``` const openwhisk = require('openwhisk'); function main(params) { let ow = openwhisk(); const name = 'helloworld2'; const blocking = true; const result = true; const actionParams = {}; return ow.actions.invoke({name, blocking, result, params: actionParams}).then(result => { console.log('here is the invoked results', result); return result; }).catch(err => { console.error('failed to invoke actions', err); return err; }); }``` https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135539035600?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:42:17 UTC - Philipp Heuberger: I see, that's interesting. IBM has something like an environment variable, but it seems it's scoped to the namespace the function that is loading the openwhisk sdk sits in. they call it `__OW_IAM_NAMESPACE_API_KEY` . unfortunately this env var doesn't help me, as it is only for the namespace of the function making the call, not the function being activated https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135737035800?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:42:42 UTC - Philipp Heuberger: anyways, thanks a bunch for your perspective. seems there's no way around ibm support for me :slightly_smiling_face: https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135762036000?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:44:43 UTC - Dominic Kim: So you want to invoke an action in another namespace from your namespace. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135883036300?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:44:55 UTC - Dominic Kim: In such a case, you need to specify the configurations. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135895036500?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:45:37 UTC - Philipp Heuberger: > So you want to invoke an action in another namespace from your namespace. that's correct https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135937036700?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:45:40 UTC - Dominic Kim: And what you said implies IBM prohibited cross-namespaces invocation? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611135940036900?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:48:45 UTC - Philipp Heuberger: I don't know if it's prohibited. it's just that the api key that's available as environment var can't work in my scenario, because the api key is only scoped to the namespace of the current function. I thought, however, that the global IAM api key has access rights across all namespaces and allows me to invoke functions in another namespace +1 : Dominic Kim https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611136125037100?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 09:49:47 UTC - Philipp Heuberger: but as it turns out that global IAM api key doesn't work either. I could be doing it wrong or it could be that IBM doesn't support that functionality https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611136187037400?thread_ts=1610983393.013400&cid=C3TPCAQG1 ---- 2021-01-20 13:57:05 UTC - Alessandro Banfi: Yes but I tried to use the invoker built from the master with the controller provided by default with the helm cart provided into the <https://github.com/apache/openwhisk-deploy-kube|openwhisk-deploy-kube> repo. I will try to use the same version for both and I'll let you know. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1611151025037600?thread_ts=1610570671.496500&cid=C3TPCAQG1 ----