Re: About Ruby2.5 runtime support proposal(in relation to #3725)
> > 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. > Yes if this PR goes well, I'm willing to do/consider both. Thanks for your insight. > diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json > index 44cb30f2..96a65001 100644 > --- a/ansible/files/runtimes.json > +++ b/ansible/files/runtimes.json > @@ -109,6 +109,17 @@ > "name": "action-php-v7.1" > } > } > +], > +"ruby": [ > +{ > +"kind": "ruby:2.5", > +"default": true, > +"deprecated": false, > +"image": { > +"prefix": "remore", > +"name": "openwhisk-runtime-ruby" > +} > +} > ] > Thank you for the better instruction. Definitely this looks nicer. Best, Kei
Re: About Ruby2.5 runtime support proposal(in relation to #3725)
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 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
About Ruby2.5 runtime support proposal(in relation to #3725)
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