Wskdebug, does it work in a docker image?

2020-02-19 Thread Michele Sciabarra
Hello, 

I am trying to build an openwhisk IDE, using eclipse theia as a starting point.
I already packages standalone openwhisk as a docker image, and I contributed 
the effort.
Theia runs from another docker image.

I am now trying to run wskdebug in the theia docker container.

Note I am able to run  "wsk" from theia  and I have also docker in the image 
and the docker socket mounted, so I can also do docker ps, docker create etc.

But if I try to install wskdebug in the image it fails.

You can easily replicate the issue with `docker run -ti node:10 bash` and then 
run `npm install -g @adobe/wskdebug`

I see errors like:


ngrok - error storing binary to local file { [Error: EACCES: permission denied, 
open 
'/usr/local/lib/node_modules/@adobe/wskdebug/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC1hbWQ2NC56aXA=.zip']
  errno: -13,
  code: 'EACCES',




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


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

2020-02-19 Thread Michele Sciabarra
But is it possible to use without ngrok? I mean, if I have to run everything 
behind a firewall with the standalone openwhisk, does it work?

-- 
  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: Wednesday, February 19, 2020 7:02 PM

Bertrand wrote:
> IIUC there's no bundling of ngrok with wskdebug and users have to download 
> ngrok separately?

Not quite. Their npm client library is bundled with wskdebug, and this is 
licensed under BSD-2-Clause.

When you run wskdebug you have the option to specify —ngrok on the command line 
which will by default use their free tier service, or you could also use their 
paid plans if you want to (I think). Free tier is enough for wskdebug though.

Cheers,
Alex


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

2020-02-19 Thread Alexander Klimetschek
Bertrand wrote:
> IIUC there's no bundling of ngrok with wskdebug and users have to download 
> ngrok separately?

Not quite. Their npm client library is bundled with wskdebug, and this is 
licensed under BSD-2-Clause.

When you run wskdebug you have the option to specify —ngrok on the command line 
which will by default use their free tier service, or you could also use their 
paid plans if you want to (I think). Free tier is enough for wskdebug though.

Cheers,
Alex


Re: [call for topics] OpenWhisk community call

2020-02-19 Thread Rodric Rabbah
Agenda:

- New features (new action proxy, typescript support)
- Pull request status & help needed
- Release plans (Dave)
- Containerless functions (preliminary results, POEM-2 plan)

at 10am eastern (about 30 minutes from now) on zoom
https://zoom.us/my/asfopenwhisk

-r

On Tue, Feb 18, 2020 at 12:13 PM Rodric Rabbah  wrote:

> Hello OpenWhisk community.
>
> I am hosting the Tech Interchange Call tomorrow, Wednesday February 19 at
> 10am
> Eastern. Call on Zoom:
>
> https://zoom.us/my/asfopenwhisk
>
> If you are interested in sharing something you've been working on, have
> some questions you'd like to discuss, or want to raise anything else with
> the community please let me know by end of your local business day Tuesday.
>
> -r
>


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

2020-02-19 Thread OpenWhisk Team Slack
2020-02-18 18:43:49 UTC - Castro Mbithii: Hi all, over the last 8 months, we 
have spent a good amount of time writing an article to address an issue I care 
about immensely and that I think we should all care about as developers, 
product builders, entrepreneurs, designers, academics, and technologists. It 
presents a back-of-the-envelope argument for *what exactly it would take to end 
world poverty and racial power imbalance in 1 generation* at macroscopic scale. 
I think it is indeed possible and will take $20T in GDP growth from majority 
world countries. How can we go beyond “Guns, Germs, and Steel” and “Poor 
Economics” and look at things from a more entrepreneurial / design perspective?

This article covers topics such as industry-driven conditional cash transfer 
for talent creation, majority world workforce development, and diverse globally 
distributed teams. I think that high tech industries’ demand for talent, rising 
global internet access (60%), and underutilized online learning material make a 
particularly interesting industry-driven development possible. I would greatly 
appreciate your thoughts and feedback even if you take just a brief skim of the 
listicle’s bullet points.


https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1582051429016800?thread_ts=1582051429.016800=C3UDXSFA6

2020-02-18 18:44:16 UTC - Castro Mbithii: Also we hosted a webinar with 6 
Nigerian, 1 Ugandan, and 1 Indian software developers to discuss the topic 

https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1582051456017000?thread_ts=1582051429.016800=C3UDXSFA6



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

2020-02-19 Thread OpenWhisk Team Slack
2020-02-18 06:26:44 UTC - Anuradha Natarajan: Hi All, a generic doubt, can we 
have print statements included in openwhisk actions to notify errors or 
completion of loops? i have a python action that does a "print 
stdout.readlines()" inside a loop however when invoking the action, got an 
error with the print statement
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007204061600?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:28:53 UTC - Dominic Kim: If you print any logs to stdout/stderr 
in an action, it will be stored as (info/error) logs for the action.
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007333061700?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:29:49 UTC - Dominic Kim: Btw, do you want to read lines from the 
standard out in an action?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007389061900?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:30:16 UTC - Anuradha Natarajan: yes
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007416062200?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:30:44 UTC - Dominic Kim: Welcome @Pranay.
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007444062700

2020-02-18 06:34:50 UTC - drholmie: You can see logs of an action using `wsk 
activation logs activation_id`. Also all openwhisk actions need to 
return a dictionary and in python your function definition should follow this 
format: `main(params)`
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582007690062800?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:41:18 UTC - Dominic Kim: I think it would be enough to print any 
logs if you want to notify errors or completion of loops.
What exactly do you want to achieve with stdout?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582008078063000?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:42:58 UTC - Anuradha Natarajan: to get into logs..
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582008178063200?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 06:48:44 UTC - Dominic Kim: @Anuradha Natarajan Could you share your 
code snippets?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582008524063400?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:18:35 UTC - Anuradha Natarajan: import paramiko
def main(args):
   hostname = '192.168.33.10'
   username = 'vagrant'
   password = 'vagrant'
   cmd=["sudo yum update -y","sudo yum install docker-ce -y","sudo systemctl 
start docker","docker pull websphere-liberty:webProfile8","sudo docker run -d 
-p 80:9080 -p 443:9443 websphere-liberty:webProfile8"]
   ssh_client = paramiko.SSHClient()
   ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
   ssh_client.connect(hostname=hostname,username=username,password=password)
   for x in cmd:
   stdin,stdout,stderr=ssh_client.exec_command(x)
   greeting = "Installed successfully docker and websphere container is running 
now"
   return {"greeting": greeting }
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010315063600?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:19:09 UTC - Anuradha Natarajan: my print was in the for-loop 
after the exec_command
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010349063800?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:19:29 UTC - Anuradha Natarajan: however openwhisk complained 
about the print statement and so had to remove it
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010369064000?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:25:01 UTC - Dominic Kim: Have you tried with 
`print(stdout.readlines())` ?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010701064200?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:25:52 UTC - Anuradha Natarajan: no
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010752064400?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:28:04 UTC - Dominic Kim: I suspect your default python runtime 
would be python:3
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010884064600?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:29:22 UTC - Anuradha Natarajan: after closing it with brackets, 
am able to invoke the action and the prints get in the logs section
+1 : Dominic Kim
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010962064800?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 07:29:30 UTC - Anuradha Natarajan: thanks :slightly_smiling_face:
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582010970065000?thread_ts=1582007204.061600=C3TPCAQG1

2020-02-18 12:37:29 UTC - Justin Halsall: Ah b*lls, would have hoped that that 
part would have been fixed by now
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582029449065400?thread_ts=1581701740.029400=C3TPCAQG1

2020-02-18 16:17:12 UTC - Will Plusnick: Sorry, dude!
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1582042632065700?thread_ts=1581701740.029400=C3TPCAQG1


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

2020-02-19 Thread Bertrand Delacretaz
On Wed, Feb 19, 2020 at 1:44 AM Alexander Klimetschek
 wrote:
> Their npm library used in wskdebug has the BSD-2-Clause license (not MIT) 
> [2], which should be fine for Apache.
> Not sure if that optional integration / use of their service needs another 
> legal check for ASF?...

IIUC there's no bundling of ngrok with wskdebug and users have to
download ngrok separately?

If that's correct that's totally fine from the ASF's point of view,
especially as ngrok is not required to use wskdebug.

-Bertrand


Re: [Contribution] wskdebug

2020-02-19 Thread Bertrand Delacretaz
Hi,

On Wed, Feb 19, 2020 at 1:35 AM Alexander Klimetschek
 wrote:
> ...Note that the granted source code zip [1] still has the Adobe copyright 
> headers.
> We would have to remove/replace them. Bertrand told me that I would have to 
> do this
> during the contribution process...

Yes, as per https://apache.org/legal/src-headers.html, it's best to
have those copyright headers removed and that must be done by "the
copyright owner (or owner's agent)", so those modifications should be
done by an Adobe employee.

OTOH I think it's fair for to add a mention of such contributions to
the CREDITS.txt file [1].

-Bertrand

[1] https://github.com/apache/openwhisk/blob/master/CREDITS.txt

-Bertrand