Re: Preview of a OpenWhisk IDE & Debugger... and an help request

2020-02-04 Thread Michele Sciabarra
The main reason because I tried my own approach instead of using wskdebug, that 
I tried, is because I was unable to make it work from within a docker 
container. 

My setup is: Standalone OpenWhisk running in a docker container, because the 
debugger (and the IDE) runs in another docker container.  

I need this setup because I want to provide a very simple installation,  a 
wskide command that will setup the development environment.  If I run the 
debugger from the standalone openwhisk works. But I have problems to add also 
the IDE that requires also node. So the prerequisites to run the whole thing 
would be a java of a given version, a node of the right version and docker.

So I decided to go for a full dockerized solution. I have a launcher, written 
in go, that starts standalone openwhisk running in a docker container, and 
another container with the debugger and the editor (theia). In this setup, 
wskdebug does not work. It tries to do something with docker and does not work. 
I was unable to understand what is wrong, I tried to read the code but I do not 
follow it. 

For this reason I simply put an action in debug mode (using the runtime) and 
then I connected from the ide. It is more straightforward. There are still some 
issues to sync. But everything is open for discussion, I am more than happy if 
I can re-use wskdebug.

-- 
  Michele Sciabarra
  mich...@sciabarra.com

- Original message -
From: Alexander Klimetschek 
To: "dev@openwhisk.apache.org" 
Subject: Re: Preview of a OpenWhisk IDE & Debugger... and an help request
Date: Tuesday, February 04, 2020 5:02 PM

Hi Michele,

please note that wskdebug [1] is a debugger for any kind. Nodejs has the best 
out of the box support since that’s what we are exclusively using right now. 
Other languages can already be supported using the right command line arguments 
(ports, docker command etc), which is how Java worked. Given this new 
__OW_DEBUG_PORT env variable, it can be set with wskdebug using —dockerArgs. 
Contributions are welcome to make this more automatic based on the kind/image 
version of the action :-)

FYI, On the contribution front, I will work on the legal documents this or next 
week.

[1] https://github.com/adobe/wskdebug

Cheers,
Alex

Von: Michele Sciabarra 
Gesendet: Monday, February 3, 2020 2:27:15 AM
An: dev@openwhisk.apache.org 
Betreff: Re: Preview of a OpenWhisk IDE & Debugger... and an help request

This is basically also what I am trying to do.

I guess the difference is that you are doing this using the standard nodejs 
runtime while I am doing the same using the goproxy. I am sure it is also 
similar to the adobe/wskdebug that I tried to use, and works but it specific to 
the node and java runtimes, without actionloop.

My goal is to get the debugger for the "other" languages, most notabily 
typescript python and go.

Let's discuss on the call to see how we can align efforts.


--
  Michele Sciabarra
  mich...@sciabarra.com

- Original message -
From: Dominic Kim 
To: dev@openwhisk.apache.org
Subject: Re: Preview of a OpenWhisk IDE & Debugger... and an help request
Date: Monday, February 03, 2020 10:52 AM

Thank you for the details.
It seems what you are tying now is similar with our approach and can be
aligned with ours too as it is generic like you said.

We enabled the debugging of Nodejs runtime with chrome DevTools protocol
https://chromedevtools.github.io/devtools-protocol/.
Our UI communicates with the real remote OW deployment.
We implemented one proxy server to correlate a debugging session with a
corresponding action container.
Since each action container is not exposed to public, we also have a bridge
component on each invoker machine for location transparency.

If I understood correctly, each container will connect to the IDE in a
reverse way in your version and similarly it connects to the proxy via
bridge in our version.
SoI think two versions can coexist, if we make the interface extensible.

Maybe I can share more details at this interchange call.


Thanks
Best regards
Dominic.




2020년 2월 3일 (월) 오후 4:47, Michele Sciabarra 님이 작성:

> Hi Dominic
>
> the preliminary work I did was already submitted as a PR to build a
> standalone docker image (that is critical for my design).
>
> The rest the work is here:  https://github.com/sciabarracom/openwhisk-ide
> and uses the (upcoming) typescript runtime here
> https://github.com/sciabarracom/openwhisk-runtime-typescript. But do not
> use it yet as it is pretty much work in progress, no documentation nor it
> is even remotely stable.
>
> The key idea is to leverage the fact that actionloop launches a process
> for each action, and I am simplying putting the process in debug mode. Then
> I am using Eclipse Theia, that is vscode in a browser,
> https://theia-ide.org/ as an editor and  debugger interface.
>
> The key problem I have is to connect the action running under a debugger
> (problem solved) with the debugger 

Re: Preview of a OpenWhisk IDE & Debugger... and an help request

2020-02-04 Thread Alexander Klimetschek
Hi Michele,

please note that wskdebug [1] is a debugger for any kind. Nodejs has the best 
out of the box support since that’s what we are exclusively using right now. 
Other languages can already be supported using the right command line arguments 
(ports, docker command etc), which is how Java worked. Given this new 
__OW_DEBUG_PORT env variable, it can be set with wskdebug using —dockerArgs. 
Contributions are welcome to make this more automatic based on the kind/image 
version of the action :-)

FYI, On the contribution front, I will work on the legal documents this or next 
week.

[1] https://github.com/adobe/wskdebug

Cheers,
Alex

Von: Michele Sciabarra 
Gesendet: Monday, February 3, 2020 2:27:15 AM
An: dev@openwhisk.apache.org 
Betreff: Re: Preview of a OpenWhisk IDE & Debugger... and an help request

This is basically also what I am trying to do.

I guess the difference is that you are doing this using the standard nodejs 
runtime while I am doing the same using the goproxy. I am sure it is also 
similar to the adobe/wskdebug that I tried to use, and works but it specific to 
the node and java runtimes, without actionloop.

My goal is to get the debugger for the "other" languages, most notabily 
typescript python and go.

Let's discuss on the call to see how we can align efforts.


--
  Michele Sciabarra
  mich...@sciabarra.com

- Original message -
From: Dominic Kim 
To: dev@openwhisk.apache.org
Subject: Re: Preview of a OpenWhisk IDE & Debugger... and an help request
Date: Monday, February 03, 2020 10:52 AM

Thank you for the details.
It seems what you are tying now is similar with our approach and can be
aligned with ours too as it is generic like you said.

We enabled the debugging of Nodejs runtime with chrome DevTools protocol
https://chromedevtools.github.io/devtools-protocol/.
Our UI communicates with the real remote OW deployment.
We implemented one proxy server to correlate a debugging session with a
corresponding action container.
Since each action container is not exposed to public, we also have a bridge
component on each invoker machine for location transparency.

If I understood correctly, each container will connect to the IDE in a
reverse way in your version and similarly it connects to the proxy via
bridge in our version.
SoI think two versions can coexist, if we make the interface extensible.

Maybe I can share more details at this interchange call.


Thanks
Best regards
Dominic.




2020년 2월 3일 (월) 오후 4:47, Michele Sciabarra 님이 작성:

> Hi Dominic
>
> the preliminary work I did was already submitted as a PR to build a
> standalone docker image (that is critical for my design).
>
> The rest the work is here:  https://github.com/sciabarracom/openwhisk-ide
> and uses the (upcoming) typescript runtime here
> https://github.com/sciabarracom/openwhisk-runtime-typescript. But do not
> use it yet as it is pretty much work in progress, no documentation nor it
> is even remotely stable.
>
> The key idea is to leverage the fact that actionloop launches a process
> for each action, and I am simplying putting the process in debug mode. Then
> I am using Eclipse Theia, that is vscode in a browser,
> https://theia-ide.org/ as an editor and  debugger interface.
>
> The key problem I have is to connect the action running under a debugger
> (problem solved) with the debugger client. So far I am just starting the
> action , asking to the action its IP and then connecting to it with the
> debugger. Problem is that the action may have a different IP
>
> I am now in the process of trying a different approach, where I
> communicate to the action the IP of the IDE and ask to the action to
> connect back, maybe creating a tunnel. In this way it could work in a more
> generic way, even with a production whisk, as the only requirement will be
> to have the client (that is itself a docker container) reachable by the
> action.
>
> --
>   Michele Sciabarra
>   mich...@sciabarra.com
>
> - Original message -
> From: Dominic Kim 
> To: dev@openwhisk.apache.org
> Subject: Re: Preview of a OpenWhisk IDE & Debugger... and an help request
> Date: Monday, February 03, 2020 7:07 AM
>
> Hi Michele.
> Thank you for sharing great works.
>
> We here(Naver) are also using a web based debugging feature and I would
> like to align ours with yours.
> Is there any reference that I can follow up your works?
> Did you open any PR?
>
> And I want to share our version at this tech interchange call.
>
>
> Best regards
> Dominic
>
>
> 2020년 2월 2일 (일) 오전 7:02, Michele Sciabarra 님이 작성:
>
> > Great suggestion. I know how to pass configuration parameters, what is
> the
> > configuration to set?
> >
> > --
> >   Michele Sciabarra
> >   mich...@sciabarra.com
> >
> > - Original message -
> > From: Rodric Rabbah 
> > To: dev@openwhisk.apache.org
> > Subject: Re: Preview of a OpenWhisk IDE & Debugger... and an help request
> > Date: Saturday, February 01, 2020 8:35 PM
> >
> > > The 

[slack-digest] [2020-02-03] #random

2020-02-04 Thread OpenWhisk Team Slack
2020-02-03 17:06:44 UTC - Rodric Rabbah: 

+1 : Nikhil
https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1580749604002200

2020-02-03 17:52:03 UTC - Markus Thömmes: 2/3 have a timeout of 1min or lower
https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1580752323002700

2020-02-03 17:53:41 UTC - Markus Thömmes: and half of all run for less than 
800ms
nods : Rodric Rabbah
https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1580752421003000

2020-02-03 23:53:49 UTC - Bruce Adams: Thinking of time limits, I am fascinated 
that CloudFlare’s main time limit is CPU not real time. Waiting for I/O is 
free, sort of. There is also a real time time limit, which is an order of 
magnitude longer than the CPU limit. The CloudFlare stuff is rather different 
than Lambda or OpenWhisk, but still interesting and useful.
https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1580774029007800



[slack-digest] [2020-02-03] #general

2020-02-04 Thread OpenWhisk Team Slack
2020-02-03 15:04:19 UTC - Tom Barber: @duynguyen I was looking at where you 
pointed to for docker repos
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580742259063400?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 15:04:28 UTC - Tom Barber: there's no option to add authentication, 
correct?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580742268063600?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 15:05:08 UTC - Tom Barber: oh, I guess you can do it with the spec
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580742308063800?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 15:05:34 UTC - Tom Barber: how do you tell openwhisk to use your 
custom spec?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580742334064000?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 16:57:24 UTC - Tom Barber: I need to pin imagePullSecrets to the 
user-action pod spec, can anyone point me to where thats built?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580749044064700

2020-02-03 16:59:08 UTC - Tom Barber: 

 hmm here it seems
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580749148064900

2020-02-03 17:01:15 UTC - Tom Barber: anyone know how that templating works?  I 
need to stick something like:

```imagePullSecrets:
  - name: regcred```
 in it
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580749275065400

2020-02-03 17:20:44 UTC - duynguyen: you could create a secret like:
```apiVersion: v1
kind: Secret
metadata:
  name: {{ .Release.Name }}-private-actions-registry.auth
type: 
data:
  .dockerconfigjson: content of dockerconfig```
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750444065600?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:21:17 UTC - duynguyen: in action pod spec just do:
```spec:
  imagePullSecrets:
  - name: {{ .Release.Name }}-private-actions-registry.auth```
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750477065800?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:21:26 UTC - Tom Barber: see... this is where I'm lost
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750486066000?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:21:31 UTC - Tom Barber: action pod spec
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750491066200?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:22:26 UTC - Tom Barber: I have the secret being generated, but 
I'm not seeing an action pod spec
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750546066400?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:24:25 UTC - duynguyen: oh that can simply be a file that you can 
add to invoker’s configMap, which is picked up to define how action containers 
should be
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750665066600?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:25:08 UTC - Tom Barber: fml for real?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750708066800?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:25:13 UTC - Tom Barber: whats the config option called?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580750713067000?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:31:03 UTC - Tom Barber: 

 I'm currently waiting on github to checkout the code cause I saw that
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751063067200?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:31:10 UTC - duynguyen: this could be useful: 

https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751070067400?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:32:14 UTC - Tom Barber: hmmm WHISK_POD_TEMPLATE
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751134067600?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:32:18 UTC - Tom Barber: worth a shot I guess
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751138067800?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:32:34 UTC - duynguyen: yep :+1:
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751154068000?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:32:44 UTC - Tom Barber: thanks @duynguyen
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751164068200?thread_ts=1579271529.008600=C3TPCAQG1

2020-02-03 17:34:56 UTC - Tom Barber: oooh, but this is inside the action and 
I'm using sls bleh
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1580751296068400?thread_ts=1579271529.008600=C3TPCAQG1