openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Thomas <jthomas...@gmail.com>
Subject Re: About Ruby2.5 runtime support proposal(in relation to #3725)
Date Wed, 06 Jun 2018 10:26:55 GMT
This looks excellent - I've seen lots of people asking about Ruby support
before!

If you had time to write up generic instructions for creating a new
runtime, based on your experiences, it would help others add more. It has
been something we've been meaning to do since the PHP runtime.

Also, if you get time, adding a simple OpenWhisk Ruby client library to the
default runtime would be really useful from a "developer" experience POV.
Just making it easy for developers to invoke functions & triggers from the
runtime would be 80% of the methods needed.

Thanks for the contribution - looking forward to promoting this!


On 6 June 2018 at 10:39, Kei Sawada <k@swd.cc> wrote:

> Hi,
>
> This email is follow-up from #3725 which proposes Ruby2.5 runtime addition.
> https://github.com/apache/incubator-openwhisk/pull/3725
>
> > (perhaps including a small example on how to try it)
> Here is a quick introduction on how to use and test this runtime. Excuse me
> in advance for a little bit awkward installation step, I guess there would
> be better way to do this with fewer steps.
>
> ```
> # 1. Setting up both openwhisk and openwhisk-runtime-ruby
> git clone https://github.com/remore/incubator-openwhisk.git
> cd incubator-openwhisk
> git checkout origin/add-ruby-as-a-kind
> cd tools/vagrant
> ./hello  # fail here because pulling image from openwhisk/action-ruby-v2.5
> is not possible yet
> vagrant ssh
> git clone https://github.com/remore/openwhisk-runtime-ruby.git
> cd openwhisk-runtime-ruby/core/ruby2.5Action/
> docker build -t action-ruby-v2.5 -t whisk/action-ruby-v2.5
> openwhisk/action-ruby-v2.5 .
> exit  # go back to the host machine
> vagrant provision  # resume installation
>
> # 2. Creating a ruby action
> vagrant ssh
> cd openwhisk-runtime-ruby
> echo -e "def main(param)\n  {result: param}\nend" > my_action.rb
> wsk action update myAction my_action.rb --docker whisk/action-ruby-v2.5
> ./gradlew core:ruby2.5Action:distDocker
>
> # 3. Try it out
> wsk action invoke myAction --result -p message hello
>
> # 4. Test it
> cd ../openwhisk && ./gradlew install && cd ../openwhisk-runtime-ruby
> ./gradlew :tests:test --tests *actionContainers.
> Ruby25ActionContainerTests*
> ```
>
> Best,
> Kei
>



-- 
Regards,
James Thomas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message